Request form
Cookbook may introduce a token in the future. Share and contribute to be eligible for future airdrops.
close icon
relevant tag icon
Zap Protocol's Token Sale
copy icon
Zap-Protocol
• version 1.0.0
erc20
defi
token
sale

Zap Protocol's Token Sale

A token sale for a basic erc20 token.

*Visit desktop site to download or deploy

Version

1.0.0

Last Publish

2/21/2023
Any contract you deploy is yours.
Fully owned and controlled by your wallet.
Documentation
Source Code
transfer(address,uint256) :
This function allows users to transfer a specified amount of tokens from one address to another. The function takes two parameters, the address of the recipient and the amount of tokens to be transferred. The function then checks the balance of the sender to ensure that they have enough tokens to make the transfer. If the sender has enough tokens, the transfer is executed and the recipient's balance is updated accordingly. If the sender does not have enough tokens, the transfer is not executed and an error is returned. (autogenerated documentation)
balanceOf(address) :
This function allows users to check their balance of a particular token on the Ethereum blockchain. It takes an address as an argument and returns the balance of the token associated with that address. The function works by querying the blockchain for the balance of the token associated with the address and returning the result. (autogenerated documentation)
buyZap() :
This function allows users to buy a token called Zap using Ether. The function requires that the user sends a value greater than 0 in Ether, and then calculates the amount of Zap tokens that the user will receive based on the rate set in the function. The function then checks that the amount of Zap tokens available in the contract is greater than or equal to the amount of tokens the user is trying to buy. If this is true, the function will transfer the amount of Zap tokens to the user and emit an event to log the transaction. (autogenerated documentation)
withdrawTok() :
This function allows the owner of the contract to withdraw all of the tokens held by the contract. It does this by calling the transfer function of the token contract, passing in the owner address as the recipient and the balance of the contract as the amount to be transferred. (autogenerated documentation)
withdrawEther() :
This function allows the owner of the contract to withdraw all of the Ether stored in the contract. It works by transferring the balance of the contract to the owner's address. (autogenerated documentation)

Get Cookin'
share iconShare

copy iconDownload Source
copy iconnpx cookbookdev i Zap-Protocol's-Token-Sal
copy icon

Last Publish

2/21/2023

Version

1.0.0

Cookbook is free.
Any contract you deploy is yours.
Your contract is owned and controlled by you.