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

Simple Token Sale

Simple Token Sale

*Visit desktop site to download or deploy

Version

1.0.0

Recent Use

🍞 0x3B4A downloaded

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. It takes an address as an argument and returns the balance of the token associated with that address. The function works by accessing the token contract and querying the balance of the address provided. (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 Simple-Token-Sale
copy icon

Recent Use

🍞 0x3B4A downloaded

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.