Skip to main content

TestGuestList

A basic guest list contract for testing.

For a Vyper implementation of this contract containing additional functionality, see https://github.com/banteg/guest-list/blob/master/contracts/GuestList.vy

Functions

constructor

  function constructor(
) public

Create the test guest list, setting the message sender as bouncer.

Note that since this is just for testing, you're unable to change bouncer.

setGuests

  function setGuests(
address[] _guests,
bool[] _invited
) external

Invite guests or kick them from the party.

Parameters:

NameTypeDescription
_guestsaddress[]The guests to add or update.
_invitedbool[]A flag for each guest at the matching index, inviting or
uninviting the guest.

authorized

  function authorized(
address _guest,
uint256 _amount
) external returns (bool)

Check if a guest with a bag of a certain size is allowed into the party.

Note that _amount isn't checked to keep test setup simple, since from the vault tests' perspective this is a pass/fail call anyway.

Parameters:

NameTypeDescription
_guestaddressThe guest's address to check.
_amountuint256Not used. The amount of tokens the guest is bringing.