SurfDeployer
0x0264b3a5ee24fa5daf4386979e8897126658fd53
Verification
Verified
v0.8.13+commit.abaa5c0e
Type
Contract
1,215 bytes
ABI entries
11
2 read · 4 write
License
none
Contract information
- Address
- 0x0264b3a5ee24fa5daf4386979e8897126658fd53
- Chain
- Robinhood Chain (4663)
- Compiler
- v0.8.13+commit.abaa5c0e
- Optimization
- Enabled
- Creator
- 0x58DbB1eED3…044E53CA5c
- Creation tx
- 0xf9e68c6df8…f447a6ce6d
Token
Not a token
This contract does not expose ERC-20 metadata.
Read contract (2)
gasFee() → uint256
owner() → address
Events (2)
DeployedOwnershipTransferred
ABI
[
{
"inputs": [
{
"internalType": "uint256",
"name": "_gasFee",
"type": "uint256"
},
{
"internalType": "address",
"name": "_feeRecipient",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [],
"name": "TransferFailed",
"type": "error"
},
{
"inputs": [],
"name": "Unauthorized",
"type": "error"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "sender",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "contractAddress",
"type": "address"
}
],
"name": "Deployed",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "previousOwner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "OwnershipTransferred",
"type": "event"
},
{
"inputs": [],
"name": "deploy",
"outputs": [],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [],
"name": "gasFee",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "owner",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "renounceOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "transferOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_gasFee",
"type": "uint256"
},
{
"internalType": "address",
"name": "_feeRecipient",
"type": "address"
}
],
"name": "updateConfig",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
]Source code
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;
import "@openzeppelin/contracts/access/Ownable.sol";
contract SurfContract {}
contract SurfDeployer is Ownable {
address internal feeRecipient;
uint256 public gasFee;
event Deployed(address indexed sender, address indexed contractAddress);
error TransferFailed();
error Unauthorized();
constructor(uint256 _gasFee, address _feeRecipient) {
feeRecipient = _feeRecipient;
gasFee = _gasFee;
}
function deploy() external payable {
if (msg.value != gasFee) {
revert Unauthorized();
}
SurfContract contractAddress = new SurfContract();
(bool success, ) = feeRecipient.call{value: msg.value}("");
if (!success) {
revert TransferFailed();
}
emit Deployed(address(msg.sender), address(contractAddress));
}
function updateConfig(
uint256 _gasFee,
address _feeRecipient
) external onlyOwner {
feeRecipient = _feeRecipient;
gasFee = _gasFee;
}
}
Chain explorer2972msChain node82ms