Skip to main content

AirdropERC1155

Methods

DEFAULT_ADMIN_ROLE

function DEFAULT_ADMIN_ROLE() external view returns (bytes32)

Returns

NameTypeDescription
_0bytes32undefined

addAirdropRecipients

function addAirdropRecipients(IAirdropERC1155.AirdropContent[] _contents) external nonpayable

Parameters

NameTypeDescription
_contentsIAirdropERC1155.AirdropContent[]undefined

airdrop

function airdrop(address _tokenAddress, address _tokenOwner, IAirdropERC1155.AirdropContent[] _contents) external nonpayable

Parameters

NameTypeDescription
_tokenAddressaddressundefined
_tokenOwneraddressundefined
_contentsIAirdropERC1155.AirdropContent[]undefined

airdrop

function airdrop(uint256 paymentsToProcess) external nonpayable

Lets contract-owner send ERC721 NFTs to a list of addresses.

Parameters

NameTypeDescription
paymentsToProcessuint256undefined

contractType

function contractType() external pure returns (bytes32)

Returns the type of the contract.

Returns

NameTypeDescription
_0bytes32undefined

contractVersion

function contractVersion() external pure returns (uint8)

Returns the version of the contract.

Returns

NameTypeDescription
_0uint8undefined

getAllAirdropPayments

function getAllAirdropPayments() external view returns (struct IAirdropERC1155.AirdropContent[] contents)

Returns all airdrop payments set up -- pending, processed or failed.

Returns

NameTypeDescription
contentsIAirdropERC1155.AirdropContent[]undefined

getAllAirdropPaymentsFailed

function getAllAirdropPaymentsFailed() external view returns (struct IAirdropERC1155.AirdropContent[] contents)

Returns all pending airdrop failed.

Returns

NameTypeDescription
contentsIAirdropERC1155.AirdropContent[]undefined

getAllAirdropPaymentsPending

function getAllAirdropPaymentsPending() external view returns (struct IAirdropERC1155.AirdropContent[] contents)

Returns all pending airdrop payments.

Returns

NameTypeDescription
contentsIAirdropERC1155.AirdropContent[]undefined

getAllAirdropPaymentsProcessed

function getAllAirdropPaymentsProcessed() external view returns (struct IAirdropERC1155.AirdropContent[] contents)

Returns all pending airdrop processed.

Returns

NameTypeDescription
contentsIAirdropERC1155.AirdropContent[]undefined

getRoleAdmin

function getRoleAdmin(bytes32 role) external view returns (bytes32)

Returns the admin role that controls the specified role.

See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.

Parameters

NameTypeDescription
rolebytes32keccak256 hash of the role. e.g. keccak256("TRANSFER_ROLE")

Returns

NameTypeDescription
_0bytes32undefined

getRoleMember

function getRoleMember(bytes32 role, uint256 index) external view returns (address member)

Returns the role-member from a list of members for a role, at a given index.

Returns member who has role, at index of role-members list. See struct {RoleMembers}, and mapping {roleMembers}

Parameters

NameTypeDescription
rolebytes32keccak256 hash of the role. e.g. keccak256("TRANSFER_ROLE")
indexuint256Index in list of current members for the role.

Returns

NameTypeDescription
memberaddressAddress of account that has role

getRoleMemberCount

function getRoleMemberCount(bytes32 role) external view returns (uint256 count)

Returns total number of accounts that have a role.

Returns count of accounts that have role. See struct {RoleMembers}, and mapping {roleMembers}

Parameters

NameTypeDescription
rolebytes32keccak256 hash of the role. e.g. keccak256("TRANSFER_ROLE")

Returns

NameTypeDescription
countuint256Total number of accounts that have role

grantRole

function grantRole(bytes32 role, address account) external nonpayable

Grants a role to an account, if not previously granted.

Caller must have admin role for the role. Emits {RoleGranted Event}.

Parameters

NameTypeDescription
rolebytes32keccak256 hash of the role. e.g. keccak256("TRANSFER_ROLE")
accountaddressAddress of the account to which the role is being granted.

hasRole

function hasRole(bytes32 role, address account) external view returns (bool)

Checks whether an account has a particular role.

Returns true if account has been granted role.

Parameters

NameTypeDescription
rolebytes32keccak256 hash of the role. e.g. keccak256("TRANSFER_ROLE")
accountaddressAddress of the account for which the role is being checked.

Returns

NameTypeDescription
_0boolundefined

hasRoleWithSwitch

function hasRoleWithSwitch(bytes32 role, address account) external view returns (bool)

Checks whether an account has a particular role; role restrictions can be swtiched on and off.

Returns true if account has been granted role. Role restrictions can be swtiched on and off: - If address(0) has ROLE, then the ROLE restrictions don't apply. - If address(0) does not have ROLE, then the ROLE restrictions will apply.

Parameters

NameTypeDescription
rolebytes32keccak256 hash of the role. e.g. keccak256("TRANSFER_ROLE")
accountaddressAddress of the account for which the role is being checked.

Returns

NameTypeDescription
_0boolundefined

initialize

function initialize(address _defaultAdmin) external nonpayable

Initiliazes the contract, like a constructor.

Parameters

NameTypeDescription
_defaultAdminaddressundefined

multicall

function multicall(bytes[] data) external nonpayable returns (bytes[] results)

Receives and executes a batch of function calls on this contract.

Parameters

NameTypeDescription
databytes[]undefined

Returns

NameTypeDescription
resultsbytes[]undefined

owner

function owner() external view returns (address)

Returns the owner of the contract.

Returns

NameTypeDescription
_0addressundefined

payeeCount

function payeeCount() external view returns (uint256)

Returns

NameTypeDescription
_0uint256undefined

processedCount

function processedCount() external view returns (uint256)

Returns

NameTypeDescription
_0uint256undefined

renounceRole

function renounceRole(bytes32 role, address account) external nonpayable

Revokes role from the account.

Caller must have the role, with caller being the same as account. Emits {RoleRevoked Event}.

Parameters

NameTypeDescription
rolebytes32keccak256 hash of the role. e.g. keccak256("TRANSFER_ROLE")
accountaddressAddress of the account from which the role is being revoked.

revokeRole

function revokeRole(bytes32 role, address account) external nonpayable

Revokes role from an account.

Caller must have admin role for the role. Emits {RoleRevoked Event}.

Parameters

NameTypeDescription
rolebytes32keccak256 hash of the role. e.g. keccak256("TRANSFER_ROLE")
accountaddressAddress of the account from which the role is being revoked.

setOwner

function setOwner(address _newOwner) external nonpayable

Lets an authorized wallet set a new owner for the contract.

Parameters

NameTypeDescription
_newOwneraddressThe address to set as the new owner of the contract.

Events

AirdropPayment

event AirdropPayment(address indexed recipient, IAirdropERC1155.AirdropContent content)

Emitted when an airdrop payment is made to a recipient.

Parameters

NameTypeDescription
recipient indexedaddressundefined
contentIAirdropERC1155.AirdropContentundefined

Initialized

event Initialized(uint8 version)

Parameters

NameTypeDescription
versionuint8undefined

OwnerUpdated

event OwnerUpdated(address indexed prevOwner, address indexed newOwner)

Parameters

NameTypeDescription
prevOwner indexedaddressundefined
newOwner indexedaddressundefined

RecipientsAdded

event RecipientsAdded(IAirdropERC1155.AirdropContent[] _contents)

Emitted when airdrop recipients are uploaded to the contract.

Parameters

NameTypeDescription
_contentsIAirdropERC1155.AirdropContent[]undefined

RoleAdminChanged

event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole)

Parameters

NameTypeDescription
role indexedbytes32undefined
previousAdminRole indexedbytes32undefined
newAdminRole indexedbytes32undefined

RoleGranted

event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender)

Parameters

NameTypeDescription
role indexedbytes32undefined
account indexedaddressundefined
sender indexedaddressundefined

RoleRevoked

event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender)

Parameters

NameTypeDescription
role indexedbytes32undefined
account indexedaddressundefined
sender indexedaddressundefined