Global Transactions

Global BID (Bit5) and bid (Bit5Lending) functions allow our valued users to transfer any NFT from their collection to the issuer. We understand the importance of providing transparency and clarity on our platform. This can cause users to be unaware of this feature and potentially receive unexpected tokens.

To address this, we are committed to providing comprehensive information and documentation to our users. By doing this, we aim to give our users a clear understanding of how these functions work and prevent unexpected token transfers. We value the trust our users place in us and we strive to give them the best possible experience.

acceptGlobalOffer() Function:

solidity
Copy code
function acceptGlobalOffer(
    Order memory order,
    bytes memory signature,
    uint256 tokenId
)
    external
    isOrderValid(order, signature, OrderStatus.NOT_PROCESSED)
    whenNotPaused
    nonReentrant
{
    if (!order.isGlobal) {
        revert OfferIsNotGlobal();
    }

    uint256[] memory tokenIds = new uint256[](1);
    tokenIds[0] = tokenId;

    order.colleteralTokenIDs = tokenIds;
    _processOrder(order, signature);
    globalOfferTokenIds[signature] = tokenId;
}
acceptGlobalBid() Function:

solidity
Copy code
function acceptGlobalBid(
    Order memory order,
    bytes memory signature,
    uint256[] memory tokenIds
) 
    public
    whenNotPaused
    nonReentrant
    isOrderValid(order, signature)
{
    if (msg.sender == order.issuer) {
        revert CanNotBuyOwnedToken();
    }
    if (
        order.globalBidAmount - processedGlobalBids[signature] <
        tokenIds.length
    ) {
        revert NotEnoughGlobalBids();
    }

    for (uint256 i; i < tokenIds.length; i++) {
        order.tokenId = tokenIds[i];
        processedGlobalBids[signature] += 1;
        _acceptBid(order, signature);
    }
}
acceptGlobalBidAsOwner() Function:

solidity
Copy code
function acceptGlobalBidAsOwner(
    Order memory order,
    bytes memory signature,
    uint256[] memory tokenIds,
    address _nftOwner
)
    public
    whenNotPaused
    nonReentrant
    onlyOwner
    isOrderValid(order, signature)
{
    if (msg.sender == order.issuer) {
        revert CanNotBuyOwnedToken();
    }
    if (
        order.globalBidAmount - processedGlobalBids[signature] <
        tokenIds.length
    ) {
        revert NotEnoughGlobalBids();
    }

    for (uint256 i; i < tokenIds.length; i++) {
        order.tokenId = tokenIds[i];
        processedGlobalBids[signature] += 1;
        _acceptGlobalBidAsOwner(order, signature, _nftOwner);
    }
}

Last updated