bitbeckers
Contract for minting semi-fungible EIP1155 tokens
Extends { Upgradeable1155 } token with semi-fungible properties and the concept of units
Adds split bit strategy as described in EIP-1155
Methods
__SemiFungible1155_init
function __SemiFungible1155_init() external nonpayable
see { openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol }
balanceOf
function balanceOf(address account, uint256 id) external view returns (uint256)
See {IERC1155-balanceOf}. Requirements: - account
cannot be the zero address.
Parameters
Name | Type | Description |
---|
account | address | undefined |
id | uint256 | undefined |
Returns
Name | Type | Description |
---|
_0 | uint256 | undefined |
balanceOfBatch
function balanceOfBatch(address[] accounts, uint256[] ids) external view returns (uint256[])
See {IERC1155-balanceOfBatch}. Requirements: - accounts
and ids
must have the same length.
Parameters
Name | Type | Description |
---|
accounts | address[] | undefined |
ids | uint256[] | undefined |
Returns
Name | Type | Description |
---|
_0 | uint256[] | undefined |
burn
function burn(address account, uint256 id, uint256 value) external nonpayable
Parameters
Name | Type | Description |
---|
account | address | undefined |
id | uint256 | undefined |
value | uint256 | undefined |
burnBatch
function burnBatch(address account, uint256[] ids, uint256[] values) external nonpayable
Parameters
Name | Type | Description |
---|
account | address | undefined |
ids | uint256[] | undefined |
values | uint256[] | undefined |
isApprovedForAll
function isApprovedForAll(address account, address operator) external view returns (bool)
See {IERC1155-isApprovedForAll}.
Parameters
Name | Type | Description |
---|
account | address | undefined |
operator | address | undefined |
Returns
Name | Type | Description |
---|
_0 | bool | undefined |
owner
function owner() external view returns (address)
Returns the address of the current owner.
Returns
Name | Type | Description |
---|
_0 | address | undefined |
ownerOf
function ownerOf(uint256 tokenID) external view returns (address _owner)
Returns the owner of a given token ID.
Parameters
Name | Type | Description |
---|
tokenID | uint256 | The ID of the token to query. |
Returns
Name | Type | Description |
---|
_owner | address | The address of the owner of the token. |
proxiableUUID
function proxiableUUID() external view returns (bytes32)
Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. 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. This is guaranteed by the notDelegated
modifier.
Returns
Name | Type | Description |
---|
_0 | bytes32 | undefined |
renounceOwnership
function renounceOwnership() external nonpayable
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.
safeBatchTransferFrom
function safeBatchTransferFrom(address from, address to, uint256[] ids, uint256[] amounts, bytes data) external nonpayable
See {IERC1155-safeBatchTransferFrom}.
Parameters
Name | Type | Description |
---|
from | address | undefined |
to | address | undefined |
ids | uint256[] | undefined |
amounts | uint256[] | undefined |
data | bytes | undefined |
safeTransferFrom
function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes data) external nonpayable
See {IERC1155-safeTransferFrom}.
Parameters
Name | Type | Description |
---|
from | address | undefined |
to | address | undefined |
id | uint256 | undefined |
amount | uint256 | undefined |
data | bytes | undefined |
setApprovalForAll
function setApprovalForAll(address operator, bool approved) external nonpayable
See {IERC1155-setApprovalForAll}.
Parameters
Name | Type | Description |
---|
operator | address | undefined |
approved | bool | undefined |
supportsInterface
function supportsInterface(bytes4 interfaceId) external view returns (bool)
See {IERC165-supportsInterface}.
Parameters
Name | Type | Description |
---|
interfaceId | bytes4 | undefined |
Returns
Name | Type | Description |
---|
_0 | bool | undefined |
transferOwnership
function transferOwnership(address newOwner) external nonpayable
Transfers ownership of the contract to a new account (newOwner
). Can only be called by the current owner.
Parameters
Name | Type | Description |
---|
newOwner | address | undefined |
upgradeTo
function upgradeTo(address newImplementation) external nonpayable
Upgrade the implementation of the proxy to newImplementation
. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.
Parameters
Name | Type | Description |
---|
newImplementation | address | undefined |
upgradeToAndCall
function upgradeToAndCall(address newImplementation, bytes data) external payable
Upgrade the implementation of the proxy to newImplementation
, and subsequently execute the function call encoded in data
. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.
Parameters
Name | Type | Description |
---|
newImplementation | address | undefined |
data | bytes | undefined |
uri
function uri(uint256 tokenID) external view returns (string _uri)
Returns the metadata URI for a given token ID.This function retrieves the metadata URI for the specified token ID by calling the uri
function of the ERC1155URIStorageUpgradeable
contract.The metadata URI is a string that points to a JSON file containing information about the token, such as its name, symbol, and image.This function always returns the URI for the basetype so that it's managed in one place.
Parameters
Name | Type | Description |
---|
tokenID | uint256 | The ID of the token to retrieve the metadata URI for. |
Returns
Name | Type | Description |
---|
_uri | string | The metadata URI for the specified token ID. |
Events
AdminChanged
event AdminChanged(address previousAdmin, address newAdmin)
Parameters
Name | Type | Description |
---|
previousAdmin | address | undefined |
newAdmin | address | undefined |
ApprovalForAll
event ApprovalForAll(address indexed account, address indexed operator, bool approved)
Parameters
Name | Type | Description |
---|
account indexed | address | undefined |
operator indexed | address | undefined |
approved | bool | undefined |
BatchValueTransfer
event BatchValueTransfer(uint256[] claimIDs, uint256[] fromTokenIDs, uint256[] toTokenIDs, uint256[] values)
Emitted on transfer of values
between fromTokenIDs
to toTokenIDs
of claimIDs
Parameters
Name | Type | Description |
---|
claimIDs | uint256[] | undefined |
fromTokenIDs | uint256[] | undefined |
toTokenIDs | uint256[] | undefined |
values | uint256[] | undefined |
BeaconUpgraded
event BeaconUpgraded(address indexed beacon)
Parameters
Name | Type | Description |
---|
beacon indexed | address | undefined |
Initialized
event Initialized(uint8 version)
Parameters
Name | Type | Description |
---|
version | uint8 | undefined |
OwnershipTransferred
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
Parameters
Name | Type | Description |
---|
previousOwner indexed | address | undefined |
newOwner indexed | address | undefined |
TransferBatch
event TransferBatch(address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values)
Parameters
Name | Type | Description |
---|
operator indexed | address | undefined |
from indexed | address | undefined |
to indexed | address | undefined |
ids | uint256[] | undefined |
values | uint256[] | undefined |
TransferSingle
event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value)
Parameters
Name | Type | Description |
---|
operator indexed | address | undefined |
from indexed | address | undefined |
to indexed | address | undefined |
id | uint256 | undefined |
value | uint256 | undefined |
URI
event URI(string value, uint256 indexed id)
Parameters
Name | Type | Description |
---|
value | string | undefined |
id indexed | uint256 | undefined |
Upgraded
event Upgraded(address indexed implementation)
Parameters
Name | Type | Description |
---|
implementation indexed | address | undefined |
ValueTransfer
event ValueTransfer(uint256 claimID, uint256 fromTokenID, uint256 toTokenID, uint256 value)
Emitted on transfer of value
between fromTokenID
to toTokenID
of the same claimID
Parameters
Name | Type | Description |
---|
claimID | uint256 | undefined |
fromTokenID | uint256 | undefined |
toTokenID | uint256 | undefined |
value | uint256 | undefined |