Skip to main content

Whitelist Extension (Whitelist)

Alongside the Coin Machine Extension, a colony may use the Whitelist extension to filter wallet addresses allowed to take part in a token sale on Coin Machine.

See here for more information.

Interface Methods

approveUsers(address[] memory _users, bool _status)

Sets user statuses in the whitelist

Parameters

NameTypeDescription
_usersaddress[]An array of user addresses
_statusboolThe whitelist status to set

deprecate(bool _deprecated)

Called when deprecating (or undeprecating) the extension

Parameters

NameTypeDescription
_deprecatedboolIndicates whether the extension should be deprecated or undeprecated

finishUpgrade()

Called when upgrading the extension

getAgreementHash():string _hash

Get the agreementHash

Return Parameters

NameTypeDescription
_hashstringThe agreement hash

getApproval(address _user):bool _status

Get the user's approval status

Parameters

NameTypeDescription
_useraddressThe address of the user

Return Parameters

NameTypeDescription
_statusboolThe user's approval status

getMetatransactionNonce(address userAddress):uint256 nonce

Gets the next nonce for a meta-transaction

Parameters

NameTypeDescription
userAddressaddressThe user's address

Return Parameters

NameTypeDescription
nonceuint256The nonce

getSignature(address _user):bool _status

Get the user's signature status

Parameters

NameTypeDescription
_useraddressThe address of the user

Return Parameters

NameTypeDescription
_statusboolThe user's signature status

getUseApprovals():bool _useApprovals

Get the useApprovals boolean

Return Parameters

NameTypeDescription
_useApprovalsboolWhether useApprovals is true

identifier():bytes32 _identifier

Returns the identifier of the extension

Return Parameters

NameTypeDescription
_identifierbytes32The extension's identifier

initialise(bool _useApprovals, string memory _agreementHash)

Initialise the extension

Parameters

NameTypeDescription
_useApprovalsboolWhether or not to require administrative approval
_agreementHashstringAn agreement hash (such as an IPFS URI)

install(address _colony)

Configures the extension

Parameters

NameTypeDescription
_colonyaddressThe colony in which the extension holds permissions

isApproved(address _user):bool _approved

Get the user's overall whitelist status

Parameters

NameTypeDescription
_useraddressThe address of the user

Return Parameters

NameTypeDescription
_approvedboolIs true when the user is approved

signAgreement(string memory _agreementHash)

The user's signature on the agreement

Parameters

NameTypeDescription
_agreementHashstringThe agreement hash being signed

uninstall()

Called when uninstalling the extension

version():uint256 _version

Returns the version of the extension

Return Parameters

NameTypeDescription
_versionuint256The extension's version number