Address Contract Partially Verified
Address
0x3b30FC8474c82C476232D730d53E13aC7dF0929C
Balance
0 ETH
Nonce
1
Code Size
1532 bytes
Creator
0x8426cc3b...C5e3 at tx 0xae7e7b52...e504ed
Indexed Transactions
0
Contract Bytecode
1532 bytes
0x608060405234801561001057600080fd5b50600436106100625760003560e01c806319c788c914610067578063715018a61461007c5780638da5cb5b14610084578063c093afdb146100ad578063dc39683d146100c0578063f2fde38b146100d3575b600080fd5b61007a6100753660046103bf565b6100e6565b005b61007a610110565b6000546001600160a01b03165b6040516001600160a01b03909116815260200160405180910390f35b600154610091906001600160a01b031681565b61007a6100ce3660046104a0565b610124565b61007a6100e13660046103bf565b61029c565b6100ee610315565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b610118610315565b610122600061036f565b565b80518251146101855760405162461bcd60e51b815260206004820152602260248201527f6275726e5472616974733a20417272617973206c656e677468206d69736d61746044820152610c6d60f31b60648201526084015b60405180910390fd5b60005b825181101561025a5760015483516001600160a01b039091169063f5298aca9033908690859081106101bc576101bc610504565b60200260200101518585815181106101d6576101d6610504565b60209081029190910101516040516001600160e01b031960e086901b1681526001600160a01b03909316600484015260248301919091526044820152606401600060405180830381600087803b15801561022f57600080fd5b505af1158015610243573d6000803e3d6000fd5b5050505080806102529061051a565b915050610188565b507f6b560470cec3d423819c2917993e454091737198b2bbb88bf2c4139035df1eae33838342604051610290949392919061057e565b60405180910390a15050565b6102a4610315565b6001600160a01b0381166103095760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161017c565b6103128161036f565b50565b6000546001600160a01b031633146101225760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161017c565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000602082840312156103d157600080fd5b81356001600160a01b03811681146103e857600080fd5b9392505050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261041657600080fd5b8135602067ffffffffffffffff80831115610433576104336103ef565b8260051b604051601f19603f83011681018181108482111715610458576104586103ef565b60405293845285810183019383810192508785111561047657600080fd5b83870191505b848210156104955781358352918301919083019061047c565b979650505050505050565b600080604083850312156104b357600080fd5b823567ffffffffffffffff808211156104cb57600080fd5b6104d786838701610405565b935060208501359150808211156104ed57600080fd5b506104fa85828601610405565b9150509250929050565b634e487b7160e01b600052603260045260246000fd5b600060001982141561053c57634e487b7160e01b600052601160045260246000fd5b5060010190565b600081518084526020808501945080840160005b8381101561057357815187529582019590820190600101610557565b509495945050505050565b6001600160a01b03851681526080602082018190526000906105a290830186610543565b82810360408401526105b48186610543565b9150508260608301529594505050505056fea26469706673582212207077f83c669b3ee49047753d95f1ef250bbf135fd9849d7db613a04854dba6be64736f6c634300080c0033
Verified Source Code Partial Match
Compiler: v0.8.12+commit.f00d7308
EVM: london
Optimization: Yes (200 runs)
TraitsBurner.sol 64 lines
// SPDX-License-Identifier: GPL-3.0
// solhint-disable-next-line
pragma solidity 0.8.12;
import "./interface/IERC1155Factory.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
/// @title Bulls and Apes Project - Traits Burner Helper
/// @author BAP Dev Team
/// @notice Handle the burning of Traits as deposit to be used off-chain
contract TraitsBurner is Ownable {
/// @notice Master contract instance
IERC1155Factory public traitsContract;
/// @notice Event for Utilities burned on chain as deposit
event TraitsBurnedOnChain(
address user,
uint256[] utilityIds,
uint256[] amounts,
uint256 timestamp
);
/// @notice Deploys the contract and sets the instances addresses
/// @param traitsContractAddress: Address of the Master Contract
constructor(
address traitsContractAddress
) {
traitsContract = IERC1155Factory(traitsContractAddress);
}
/// @notice Handle the burning of Traits as deposit to be used off-chain
/// @param traitsIds: IDs of the Traits to burn
/// @param amounts: Amounts to burn for each Utility
/// @dev This contract must be approved by the user to spend the Traits
function burnTraits(
uint256[] memory traitsIds,
uint256[] memory amounts
) external {
require(
traitsIds.length == amounts.length,
"burnTraits: Arrays length mismatch"
);
for (uint256 i = 0; i < traitsIds.length; i++) {
traitsContract.burn(msg.sender, traitsIds[i], amounts[i]);
}
emit TraitsBurnedOnChain(
msg.sender,
traitsIds,
amounts,
block.timestamp
);
}
/// @notice Set the Traits Contract address
/// @param traitsContractAddress: Address of the Traits Contract
function setTraitsContractAddress(
address traitsContractAddress
) external onlyOwner {
traitsContract = IERC1155Factory(traitsContractAddress);
}
}
IERC1155Factory.sol 12 lines
// SPDX-License-Identifier: GPL-3.0
// solhint-disable-next-line
pragma solidity 0.8.12;
interface IERC1155Factory {
function burn(
address account,
uint256 id,
uint256 value
) external;
}
Context.sol 24 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)
pragma solidity ^0.8.0;
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}
Ownable.sol 83 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)
pragma solidity ^0.8.0;
import "../utils/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_transferOwnership(_msgSender());
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_checkOwner();
_;
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
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);
}
}
Read Contract
owner 0x8da5cb5b → address
traitsContract 0xc093afdb → address
Write Contract 4 functions
These functions modify contract state and require a wallet transaction to execute.
burnTraits 0xdc39683d
uint256[] traitsIds
uint256[] amounts
renounceOwnership 0x715018a6
No parameters
setTraitsContractAddress 0x19c788c9
address traitsContractAddress
transferOwnership 0xf2fde38b
address newOwner
Recent Transactions
No transactions found for this address