Write Contract
Last updated
Last updated
acceptBid
This method gives the auction operator the ability to manually approve bids that deviate from the floor price, enhancing the auction's flexibility and responsiveness to market dynamics. It provides an additional layer of control over the auction process.
Transaction example
closeAuction
This method serves a dual purpose, allowing the closure of an auction before its start (accessible only to the auction operator) and the collection of tokens and funds from the contract after its completion, catering to both bidders and the operator.
Transaction Example
a. Visible 2 transactions, the first is the treasury address but the second is the Operator address
b. Token Transfered FROM: Address from where the money was sent
c. Token Transferred To: Address where the money is sent
d. Token Transferred For: The amount of money that was sent
e. Token Transferred: the currency
f. Token Transfered FROM: Address from where the token was sent
g. Token Transferred To: Address where the Token is sent
h. Token Transferred: ERC-1155 standard of the token
i. Token Transferred: Amount of tokens
j. Token Transferred: Token ID [number of the token ID]
k. Token Transferred: Token Contract Address
Transaction Example
a.Visible 3 transactions, there are 3 levels of Referrals
b. Token Transfered FROM: Address from where the money was sent
c. Token Transferred To: Address where the money is sent
d. Token Transferred For: The amount of money that was sent
e. Token Transferred: the currency
f. Token Transfered FROM: Address from where the token was sent
g. Token Transferred To: Address where the Token is sent
h. Token Transferred: ERC-1155 standard of the token
i. Token Transferred: Amount of tokens
j. Token Transferred: Token ID [number of the token ID]
k. Token Transferred: Token Contract Address
Transaction Example
a. Token Transfered FROM: Address from where the money was sent
b. Token Transferred To: Address where the money is sent
c. Token Transferred For: The amount of money that was sent
d. Token Transferred: the currency
createAuction
This method is responsible for creating a bidding auction. To use this functionality, you must possess the tokens you want to sell or have created. The auction is characterized by setting a minimum price (floor price) that you wish to receive for the specific token. If no one attempts to bid higher than the floor price, the operator will have the option to consider an offer that falls below the floor price and decide whether to accept it for token sale or ignore it and retrieve the token back.
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
onERC1155BatchReceived
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.
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.
onERC1155Recevied
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.
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.
placeBid
The placeBid method allows users to participate in an auction by placing a bid. Users can also use this method to increase their current bid amount or the quantity of tokens they are bidding.
Transaction Example
a. Token Transfered FROM: Address from where the money was sent
b. Token Transferred To: Address where the money is sent
c. Token Transferred For: The amount of money that was sent
d. Token Transferred: the currency
removeBid
The removeBid method is responsible for removing a bid placed in an auction. This method allows users to withdraw their bids from an auction in which they are participating. This can be helpful if a user wants to cancel their participation or for mistake bids a higher price. After removing a bid, users can place a new bid if they wish.
renounceOwnership
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.
setAddresses
The setAddresses method is exclusively accessible to the contract owner. It empowers the owner to establish new addresses for the BUSD (Binance USD), Treasury Referral, and Royalty contracts.
setFinalizationBlockDelay
The setFinalizationBlockDelay method is exclusively accessible to the contract owner. It empowers the owner to define the time window within which the auction operator can accept bids.
setTreasuryFee
This method is used to set the transaction fee in the contract. It is accessible only to the contract's owner.
transferOwnership
The method is available only to the current owner of the contract and allows changing the ownership of the contract
Data
Description
Restrictions
_auctionId (uint256)
The unique identifier of the auction for which the bid is to be accepted.
must be a number
ID must exist
must be the auction operator
_bidder (address)
The address of the wallet from which the bid is being accepted.
must be the bidder of the auction
must be an address
Data
Description
Restrictions
_auctionId (uint256)
The unique identifier of the auction for which we want close/collect tokens and funds.
must be a number
ID must exist
must be the auction operator
_data (bytes)
Additional data, if needed.
By default, it is set to 0x00
Data
Description
Restrictions
_tokenId (uint256)
The unique identifier of the token to be auctioned
tokenID must be greater than 0
the INS creator must be an owner of the token
_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
_tokenQuantity (uint256)
The Number of tokens to be sent to the Bidding Auction
must be a number
must be a owner of the token
_maxBidTokenQuantity (uint256)
It can be ignored, it is used to limit the bid for a single user
cannot be grater than token Quantity
must be a number
_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
_tokenFloorPrice (uint256)
The floor price set for a single token, is 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
_level1ReferralFee (uint256)
The amount of referral fee received by the person who refers the auction at level 1. It 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%
_data (bytes)
Additional data, if needed.
By default, it is set to 0x00
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
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 number of received tokens.
must be number
bytes
Additional data passed along with the transfer operation.
By default, it is set to 0x00
Data
Description
Restrictions
_auctionId (uint256)
The unique identifier of the auction in which the user wants to place the bid.
must be a number
must be a valid auction id
_pricePerToken (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
_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 a valid address
Data
Description
Restrictions
_auctionId (uint256)
The ID of the auction from which the user wants to remove the bid.
must be a number
must be a valid ID
Data
Description
Restrictions
_busdAddress (address)
The fresh address for the BUSD contract.
Only for the Contract owner
must be an address
_treasuryAddress (address)
The updated address for the Treasury contract.
Only for the Contract owner
must be an address
_referralAddress (address)
The revised address for the Referral contract.
Only for the Contract owner
must be an address
_royaltyAddress (address)
The modified address for the Royalty contract.
Only for the Contract owner
must be an address
Data
Description
Restrictions
_finalizationBlockDelay (uint256)
The quantity of blocks by which the finalization of auctions should be delayed.
must be a number
Data
Description
Restrictions
_fee (uint256)
The amount of the transaction fee to be set.
Only for the Contract owner
Must be a positive number
Data
Description
Restrictions
newOwner (address)
The address of the new contract owner.
must be a wallet address