The Fundraiser Facet dandles the creation, funding, and completion of Fundraisers.
Call Functions
function fund(
uint32 id,
uint256 amount,
LibTransfer.From mode
) external payable nonReentrant returns (uint256);
Fund a Fundraiser in exchange for Pods.
function createFundraiser(
address payee,
address token,
uint256 amount
) external payable;
Creates a Fundraiser. Can only be called by the owner of Beanstalk.
View Functions
function remainingFunding(uint32 id) public view returns (uint256);
Returns the remaining number of tokens to raise.
function totalFunding(uint32 id) public view returns (uint256);
Returns the total amount of tokens raised so far.
function fundingToken(uint32 id) public view returns (address);
Returns the address of the token that can be sent to the Fundraiser.
function fundraiser(uint32 id)
public
view
returns (Storage.Fundraiser memory);
Returns the Fundraiser struct.
function numberOfFundraisers() public view returns (uint32);
Returns the number of Fundraisers.
Events
event CreateFundraiser(
uint32 indexed id,
address fundraiser,
address token,
uint256 amount
);
Emitted when a Fundraiser is created.
event FundFundraiser(
address indexed account,
uint32 indexed id,
uint256 amount
);
Emitted when a Farmer calls fund
.
event CompleteFundraiser(uint32 indexed id);
Emitted when a Fundraiser is fully funded.
Last updated