ETH Price: $3,413.15 (-0.73%)

Contract

0xFaC100450Af66d838250EA25a389D8Cd09062629
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To

There are no matching entries

Please try again later

Advanced mode:
Parent Transaction Hash Method Block
From
To
View All Internal Transactions
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
GenericFactory

Compiler Version
v0.5.10+commit.5a6ea5b1

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
/**
 *Submitted for verification at Etherscan.io on 2019-07-01
*/

/**
 *Submitted for verification at Etherscan.io on 2019-07-01
*/

pragma solidity ^0.5.0;


contract CounterfactualFactory
{
	function _create2(bytes memory _code, bytes32 _salt)
	internal returns(address)
	{
		bytes memory code = _code;
		bytes32      salt = _salt;
		address      addr;
		// solium-disable-next-line security/no-inline-assembly
		assembly
		{
			addr := create2(0, add(code, 0x20), mload(code), salt)
			if iszero(extcodesize(addr)) { revert(0, 0) }
		}
		return addr;
	}

	function _predictAddress(bytes memory _code, bytes32 _salt)
	internal view returns (address)
	{
		return address(bytes20(keccak256(abi.encodePacked(
			bytes1(0xff),
			address(this),
			_salt,
			keccak256(_code)
		)) << 0x60));
	}
}

contract GenericFactory is CounterfactualFactory
{
	event NewContract(address indexed addr);

	function predictAddress(bytes memory _code, bytes32 _salt)
	public view returns(address)
	{
		return _predictAddress(_code, _salt);
	}

	function createContract(bytes memory _code, bytes32 _salt)
	public returns(address)
	{
		address addr = _create2(_code, _salt);
		emit NewContract(addr);
		return addr;
	}

	function createContractAndCallback(bytes memory _code, bytes32 _salt, bytes memory _callback)
	public returns(address)
	{
		address addr = createContract(_code, _salt);
		// solium-disable-next-line security/no-low-level-calls
		(bool success, bytes memory reason) = addr.call(_callback);
		require(success, string(reason));
		return addr;
	}

}

Contract Security Audit

Contract ABI

API
[{"constant":true,"inputs":[{"name":"_code","type":"bytes"},{"name":"_salt","type":"bytes32"}],"name":"predictAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_code","type":"bytes"},{"name":"_salt","type":"bytes32"}],"name":"createContract","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_code","type":"bytes"},{"name":"_salt","type":"bytes32"},{"name":"_callback","type":"bytes"}],"name":"createContractAndCallback","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"anonymous":false,"inputs":[{"indexed":true,"name":"addr","type":"address"}],"name":"NewContract","type":"event"}]

608060405234801561001057600080fd5b50610541806100206000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c8063482f2024146100465780638563a8f614610108578063c45bb77f146101ae575b600080fd5b6100ec6004803603604081101561005c57600080fd5b810190602081018135600160201b81111561007657600080fd5b82018360208201111561008857600080fd5b803590602001918460018302840111600160201b831117156100a957600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955050913592506102df915050565b604080516001600160a01b039092168252519081900360200190f35b6100ec6004803603604081101561011e57600080fd5b810190602081018135600160201b81111561013857600080fd5b82018360208201111561014a57600080fd5b803590602001918460018302840111600160201b8311171561016b57600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955050913592506102f2915050565b6100ec600480360360608110156101c457600080fd5b810190602081018135600160201b8111156101de57600080fd5b8201836020820111156101f057600080fd5b803590602001918460018302840111600160201b8311171561021157600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092958435959094909350604081019250602001359050600160201b81111561026b57600080fd5b82018360208201111561027d57600080fd5b803590602001918460018302840111600160201b8311171561029e57600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955061033d945050505050565b60006102eb838361048d565b9392505050565b6000806102ff84846104e3565b6040519091506001600160a01b038216907f387ea218537e939551af33bbc2dd6c53b1fee55d377a0dce288258f972cb3a9c90600090a29392505050565b60008061034a85856102f2565b905060006060826001600160a01b0316856040518082805190602001908083835b6020831061038a5780518252601f19909201916020918201910161036b565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146103ec576040519150601f19603f3d011682016040523d82523d6000602084013e6103f1565b606091505b50915091508181906104815760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561044657818101518382015260200161042e565b50505050905090810190601f1680156104735780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50919695505050505050565b8151602092830120604080516001600160f81b0319818601523060601b6021820152603581019390935260558084019290925280518084039092018252607590920190915280519101206001600160a01b031690565b815160009083908390839082906020850183f59050803b61050357600080fd5b9594505050505056fea265627a7a72305820d9c2518f148aec803fd40f5380427c84f28ae6993288d839a91ebacbedb4f74464736f6c634300050a0032

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100415760003560e01c8063482f2024146100465780638563a8f614610108578063c45bb77f146101ae575b600080fd5b6100ec6004803603604081101561005c57600080fd5b810190602081018135600160201b81111561007657600080fd5b82018360208201111561008857600080fd5b803590602001918460018302840111600160201b831117156100a957600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955050913592506102df915050565b604080516001600160a01b039092168252519081900360200190f35b6100ec6004803603604081101561011e57600080fd5b810190602081018135600160201b81111561013857600080fd5b82018360208201111561014a57600080fd5b803590602001918460018302840111600160201b8311171561016b57600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955050913592506102f2915050565b6100ec600480360360608110156101c457600080fd5b810190602081018135600160201b8111156101de57600080fd5b8201836020820111156101f057600080fd5b803590602001918460018302840111600160201b8311171561021157600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092958435959094909350604081019250602001359050600160201b81111561026b57600080fd5b82018360208201111561027d57600080fd5b803590602001918460018302840111600160201b8311171561029e57600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955061033d945050505050565b60006102eb838361048d565b9392505050565b6000806102ff84846104e3565b6040519091506001600160a01b038216907f387ea218537e939551af33bbc2dd6c53b1fee55d377a0dce288258f972cb3a9c90600090a29392505050565b60008061034a85856102f2565b905060006060826001600160a01b0316856040518082805190602001908083835b6020831061038a5780518252601f19909201916020918201910161036b565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146103ec576040519150601f19603f3d011682016040523d82523d6000602084013e6103f1565b606091505b50915091508181906104815760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561044657818101518382015260200161042e565b50505050905090810190601f1680156104735780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50919695505050505050565b8151602092830120604080516001600160f81b0319818601523060601b6021820152603581019390935260558084019290925280518084039092018252607590920190915280519101206001600160a01b031690565b815160009083908390839082906020850183f59050803b61050357600080fd5b9594505050505056fea265627a7a72305820d9c2518f148aec803fd40f5380427c84f28ae6993288d839a91ebacbedb4f74464736f6c634300050a0032

Deployed Bytecode Sourcemap

765:779:0:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;765:779:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;864:138;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;864:138:0;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;864:138:0;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;864:138:0;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;-1:-1;;;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;864:138:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;864:138:0;;-1:-1:-1;;864:138:0;;;-1:-1:-1;864:138:0;;-1:-1:-1;;864:138:0:i;:::-;;;;-1:-1:-1;;;;;864:138:0;;;;;;;;;;;;;;1007:177;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1007:177:0;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;1007:177:0;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;1007:177:0;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;-1:-1;;;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;1007:177:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;1007:177:0;;-1:-1:-1;;1007:177:0;;;-1:-1:-1;1007:177:0;;-1:-1:-1;;1007:177:0:i;1189:350::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1189:350:0;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;1189:350:0;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;1189:350:0;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;-1:-1;;;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;1189:350:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;1189:350:0;;;;;;;;;-1:-1:-1;1189:350:0;;;;-1:-1:-1;1189:350:0;;;;-1:-1:-1;;;;5:28;;2:2;;;46:1;43;36:12;2:2;1189:350:0;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;1189:350:0;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;-1:-1;;;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;1189:350:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;1189:350:0;;-1:-1:-1;1189:350:0;;-1:-1:-1;;;;;1189:350:0:i;864:138::-;945:7;968:29;984:5;991;968:15;:29::i;:::-;961:36;864:138;-1:-1:-1;;;864:138:0:o;1007:177::-;1083:7;1099:12;1114:22;1123:5;1130;1114:8;:22::i;:::-;1146:17;;1099:37;;-1:-1:-1;;;;;;1146:17:0;;;;;;;;1175:4;1007:177;-1:-1:-1;;;1007:177:0:o;1189:350::-;1300:7;1316:12;1331:28;1346:5;1353;1331:14;:28::i;:::-;1316:43;;1424:12;1438:19;1461:4;-1:-1:-1;;;;;1461:9:0;1471;1461:20;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;1461:20:0;;;;;;;;;;;;;;;;;;;;;;;;14:1:-1;21;16:31;;;;75:4;69:11;64:16;;144:4;140:9;133:4;115:16;111:27;107:43;104:1;100:51;94:4;87:65;169:16;166:1;159:27;225:16;222:1;215:4;212:1;208:12;193:49;7:242;;16:31;36:4;31:9;;7:242;;1423:58:0;;;;1494:7;1510:6;1486:32;;;;;-1:-1:-1;;;1486:32:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;1486:32:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1530:4:0;;1189:350;-1:-1:-1;;;;;;1189:350:0:o;517:241::-;721:16;;;;;;;651:91;;;-1:-1:-1;;;;;;651:91:0;;;;699:4;747;651:91;;;;;;;;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;651:91:0;;;;;;;641:102;;;;;-1:-1:-1;;;;;625:128:0;;517:241::o;136:376::-;419:11;;208:7;;244:5;;274;;208:7;;274:5;;412:4;402:15;;208:7;391:46;383:54;;464:4;452:17;442:2;;483:1;480;473:12;442:2;503:4;136:376;-1:-1:-1;;;;;136:376:0:o

Swarm Source

bzzr://d9c2518f148aec803fd40f5380427c84f28ae6993288d839a91ebacbedb4f744

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.