AirdropERC20

Methods

DEFAULT_ADMIN_ROLE

function DEFAULT_ADMIN_ROLE() external view returns (bytes32)

Returns

Name
Type
Description

_0

bytes32

undefined

addAirdropRecipients

function addAirdropRecipients(IAirdropERC20.AirdropContent[] _contents) external payable

Parameters

Name
Type
Description

_contents

IAirdropERC20.AirdropContent[]

undefined

airdrop

function airdrop(uint256 paymentsToProcess) external nonpayable

Lets contract-owner send ERC20 or native tokens to a list of addresses.

Parameters

Name
Type
Description

paymentsToProcess

uint256

undefined

contractType

Returns the type of the contract.

Returns

Name
Type
Description

_0

bytes32

undefined

contractVersion

Returns the version of the contract.

Returns

Name
Type
Description

_0

uint8

undefined

getAllAirdropPayments

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

Returns

Name
Type
Description

contents

IAirdropERC20.AirdropContent[]

undefined

getAllAirdropPaymentsFailed

Returns all pending airdrop failed.

Returns

Name
Type
Description

contents

IAirdropERC20.AirdropContent[]

undefined

getAllAirdropPaymentsPending

Returns all pending airdrop payments.

Returns

Name
Type
Description

contents

IAirdropERC20.AirdropContent[]

undefined

getAllAirdropPaymentsProcessed

Returns all pending airdrop processed.

Returns

Name
Type
Description

contents

IAirdropERC20.AirdropContent[]

undefined

getRoleAdmin

Returns the admin role that controls the specified role.

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

Parameters

Name
Type
Description

role

bytes32

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

Returns

Name
Type
Description

_0

bytes32

undefined

getRoleMember

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

Name
Type
Description

role

bytes32

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

index

uint256

Index in list of current members for the role.

Returns

Name
Type
Description

member

address

Address of account that has role

getRoleMemberCount

Returns total number of accounts that have a role.

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

Parameters

Name
Type
Description

role

bytes32

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

Returns

Name
Type
Description

count

uint256

Total number of accounts that have role

grantRole

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

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

Parameters

Name
Type
Description

role

bytes32

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

account

address

Address of the account to which the role is being granted.

hasRole

Checks whether an account has a particular role.

Returns true if account has been granted role.

Parameters

Name
Type
Description

role

bytes32

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

account

address

Address of the account for which the role is being checked.

Returns

Name
Type
Description

_0

bool

undefined

hasRoleWithSwitch

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

Name
Type
Description

role

bytes32

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

account

address

Address of the account for which the role is being checked.

Returns

Name
Type
Description

_0

bool

undefined

initialize

Initiliazes the contract, like a constructor.

Parameters

Name
Type
Description

_defaultAdmin

address

undefined

multicall

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

Parameters

Name
Type
Description

data

bytes[]

undefined

Returns

Name
Type
Description

results

bytes[]

undefined

owner

Returns the owner of the contract.

Returns

Name
Type
Description

_0

address

undefined

payeeCount

Returns

Name
Type
Description

_0

uint256

undefined

processedCount

Returns

Name
Type
Description

_0

uint256

undefined

renounceRole

Revokes role from the account.

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

Parameters

Name
Type
Description

role

bytes32

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

account

address

Address of the account from which the role is being revoked.

revokeRole

Revokes role from an account.

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

Parameters

Name
Type
Description

role

bytes32

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

account

address

Address of the account from which the role is being revoked.

setOwner

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

Parameters

Name
Type
Description

_newOwner

address

The address to set as the new owner of the contract.

Events

AirdropPayment

Emitted when an airdrop payment is made to a recipient.

Parameters

Name
Type
Description

recipient indexed

address

undefined

content

IAirdropERC20.AirdropContent

undefined

Initialized

Parameters

Name
Type
Description

version

uint8

undefined

OwnerUpdated

Parameters

Name
Type
Description

prevOwner indexed

address

undefined

newOwner indexed

address

undefined

RecipientsAdded

Emitted when airdrop recipients are uploaded to the contract.

Parameters

Name
Type
Description

_contents

IAirdropERC20.AirdropContent[]

undefined

RoleAdminChanged

Parameters

Name
Type
Description

role indexed

bytes32

undefined

previousAdminRole indexed

bytes32

undefined

newAdminRole indexed

bytes32

undefined

RoleGranted

Parameters

Name
Type
Description

role indexed

bytes32

undefined

account indexed

address

undefined

sender indexed

address

undefined

RoleRevoked

Parameters

Name
Type
Description

role indexed

bytes32

undefined

account indexed

address

undefined

sender indexed

address

undefined

Last updated