Write Contract
Last updated
Last updated
The method is used to purchase a specific auction.
Data
Description
Restrictions
_buyNowId (uint256)
The ID of the auction to buy
must be a valid auction ID
the auction must be active
_tokenQuantity (uint256)
The number of tokens that we want to purchase.
must be a positive number
_referrer (address)
The address of the wallet from which we received the auction recommendation or the address of the person who registered us as an upline. If the user purchases the auction through a referral, the referrer will receive a commission from the transaction based on the agreed commission and referral level.
must be an address
_data (bytes)
Additional data, if needed.
By default, it is set to 0x00
Transaction Example
a. Money from the buyer sent to the Contract
b. Money sent from the Contract to Level 1 money Referral send
c. Money sent from the Contract to Level 2 money Referral send
d. Money sent from the Contract to Level 3 money Referral send
e. Money sent from the Contract to the Contract Fee address
f. Money sent from the Contract to the Auction operator
g. Token Transfered FROM: Address from where the token was sent
h. Token Transferred To: Address where the Token is sent
i. Token Transferred: ERC-1155 standard of the token
j. Token Transferred: Amount of tokens
k. Token Transferred: Token ID [number of the token ID]
l. Token Transferred: Token Contract Address
The method allows the contract owner or the operator of the auction to close the auction and collect tokens and funds from it. It is also used to withdraw the proceeds from a completed auction. The method is designed to handle various aspects of auction management, such as closing auctions prematurely, collecting tokens, and managing the distribution of auction assets. This functionality provides flexibility and control over the auction process, ensuring a smooth and efficient experience for both the auction participants and the contract operator.
Data
Description
Restrictions
_buyNowId (uint256)
The ID of the auction to be closed/collected.
must be a valid auction ID
_data (bytes)
Additional data, if needed.
By default, it is set to 0x00
Transaction Example:
a. Token Transfered FROM: Address from where the token was sent
b. Token Transferred To: Address where the Token is sent
c.Token Transferred: ERC-1155 standard of the token
d. Token Transferred: Amount of tokens (number of tokens sent back)
e. Token Transferred: Token ID [number of the token ID]
f. Token Transferred: Token Contract Address
Transaction Example:
a. Token Transfered FROM: Address from where the token was sent
b. Token Transferred To: Address where the Token is sent
c. Token Transferred: ERC-1155 standard of the token
d. Token Transferred: Amount of tokens
e. Token Transferred: Token ID [number of the token ID]
f. Token Transferred: Token Contract Address
The createAuction method in the smart contract is designed for initiating the creation of Buy Now auctions. It is necessary to have a Token in order to list an auction, which can be either acquired for resale purposes or self-generated.
Data
Description
Restrictions
_tokenContractAddress (address)
The address of the token contract where the token is located and will be listed for sale.
must be a Token Contract Address
_tokenId (uint256)
The ID of the token to be listed for sale in the auction.
tokenID must be greater than 0
must be an owner of the token
_tokenPrice (uint256)
The price set for a single token, expressed in the units of the specified token (e.g., 0.0001 BUSD is represented as 1e14 in our case).
must be a positive number
possible min price 0.0001 BUSD
_tokenQuantity (uint256)
The number of tokens to be sent for the auction.
cannot be 0
cannot be greater than owned tokens
_startBlock (uint256)
The block number at which the auction is scheduled to start.
must be a blockchain block
must be lower than endBlock
_endBlock (uint256)
The block number at which the auction is scheduled to end.
must be a blockchain block
must be higher than startBlock
_level1ReferralFee (uint256)
The amount of referral fee received by the person who refers the auction at level 1. Can be selected from 0 to 15% of the transaction amount. The sum of referral fees from all referrers cannot exceed 15%.
can be set from 0 to 15% (1% = 100)
the max sum of the referral fee must be set to 15%
_level2ReferralFee (uint256)
The amount of referral fee received by the person who refers the auction at level 2. Can be selected from 0 to 15% of the transaction amount. The sum of referral fees from all referrers cannot exceed 15%.
can be set from 0 to 15% (1% = 100)
the max sum of the referral fee must be set to 15%
_level3ReferralFee (uint256)
The amount of referral fee received by the person who refers the auction at level 3. Can be selected from 0 to 15% of the transaction amount. The sum of referral fees from all referrers cannot exceed 15%.
can be set from 0 to 15% (1% = 100)
the max sum of the referral fee must be set to 15%
_multipleDeposits (bool)
Specifies whether buyers can make multiple purchases in the auction.
can be only true or false
we can use "1" (true) or "0" (false)
data (bytes)
Additional data, if needed.
By default, it is set to 0x00
a. Token Transfered FROM: Address from where the token was sent
b. Token Transferred To: Address where the Token is sent
c. Token Transferred: ERC-1155 standard of the token
d. Token Transferred: Amount of tokens
e. Token Transferred: Token ID [number of the token ID]
f. Token Transferred: Token Contract Address
The onERC1155BatchReceived is a standard function within the ERC-1155 interface in the Solidity environment, similar to onERC1155Received. However, it is used to handle the batch (multiple) receipt of tokens by a contract. When an address receives a batch of tokens (either NFTs or MFTs) on its contract, if that contract includes the onERC1155BatchReceived method, it is automatically invoked. This allows the contract to respond to the receipt of multiple tokens in a single transaction and execute appropriate actions.
Data
Description
Restrictions
address (operator)
The address performing the token batch transfer operation.
must be an address
address (from)
The address from which the tokens were sent.
must be an address
uint256[] (tokenID)
An array of token identifiers.
must be a number
uint256[] (value)
An array of amounts of received tokens corresponding to the respective IDs.
must be a number
bytes
Additional data passed along with the transfer operation.
By default, it is set to 0x00
The onERC1155Received function returns a special four-byte code (bytes4), which serves as a confirmation that the contract successfully received the tokens. In summary, onERC1155BatchReceived allows a contract to react to the receipt of a batch of ERC-1155 tokens and execute specific actions in response to this batch event.
The onERC1155Received function is a standard function within the ERC-1155 interface in the Solidity environment, concerning non-fungible tokens (NFTs) or multi-fungible tokens (MFTs). This function is designed to handle the receipt of tokens by a contract. When an address receives tokens (either NFTs or MFTs) on its contract, if that contract includes the onERC1155Received function, it is automatically invoked. This allows the contract to respond to the receipt of new tokens and execute appropriate actions.
Data
Description
Restrictions
address (operator)
The address performing the token transfer operation.
must be an address
address (from)
The address from which the tokens were sent.
must be an address
uint256 (tokenID)
The token identifier.
must be a number
uint256 (value)
The ammount of received tokens.
must be number
bytes
Additional data passed along with the transfer operation.
By default, it is set to 0x00
The onERC1155Received function returns a special four-byte code (bytes4), which serves as a confirmation that the contract successfully received the tokens. In summary, onERC1155Received enables a contract to react to the receipt of ERC-1155 tokens and trigger specific actions in response to this event.
This method allows the contract's owner to renounce their ownership. This method is accessible only to the contract's owner.
This function enables the current owner to renounce ownership of the contract. Once this method is called, the owner will lose their privileges to manage the contract, and any methods that require owner permissions will no longer be accessible.
The setBusdAddress method allows the contract owner to update the address of the BUSD contract in the smart contract. This is important for connecting and interacting with the BUSD contract to perform operations such as token transfers, balance checks, and other financial transactions involving BUSD tokens. The owner can update the BUSD contract address if the contract is upgraded or replaced with a new version.
Data
Description
Restrictions
newAddress (address)
The new address of the BUSD contract to be set.
must be an address
The setReferralAddress method allows the contract owner to update the address of the referral contract in the smart contract. This is important for connecting and interacting with the referral contract to perform operations related to referral bonuses, commissions, or any other referral-related functionalities. The owner can update the referral contract address if the contract is upgraded or replaced with a new version or if they want to use a different referral contract for their application.
Data
Description
Restrictions
newAddress (address)
The new address of the referral contract to be set.
must be an address
The setRoyaltyAddress method allows the contract owner to update the address of the royalty contract in the smart contract. This is important for connecting and interacting with the royalty contract to perform operations related to royalty payments, revenue sharing, or any other royalty-related functionalities. The owner can update the royalty contract address if the contract is upgraded or replaced with a new version or if they want to use a different royalty contract for their application.
Data
Description
Restrictions
newAddress (address)
The new address of the royalty contract to be set.
must be an address
This method is used to set the transaction fee in the contract. It is accessible only to the contract's owner.
Data
Description
Restrictions
fee (uint256)
The amount of the transaction fee to be set.
Only for the Contract owner
Must be a positive number
The method is used to set the treasury address in the contract. The treasury address is the designated account where funds or tokens are stored for various purposes, such as collecting fees, managing reserves, or distributing rewards.
Data
Description
Restrictions
newAddress (address)
The new treasury address to be set.
You must be the Contract owner
Must be a wallet address
The method is available only to the current owner of the contract and allows changing the ownership of the contract
Data
Description
Restrictions
newOwner (address)
The address of the new contract owner.
must be a wallet address