import { pad0xBegin } from "../../../utils/common/utils";
import { triggerContractByContractName } from "../../../utils/ethers/contractHelper";
/**
 * Equipment transfer
 * @param landId Land Id
 * @param signer Signer
 * @param from Equipment owner
 * @param to Recipient
 * @param tokenId Equipment TokenId
 * @param callback Callback
 * @returns any
 */
export const equipmentTransfer = (landId, signer, from, to, tokenId, callback) => {
    return triggerContractByContractName(landId, signer, "objectOwnership", "transferFrom", [from, to, pad0xBegin(tokenId)], callback);
};
/**
 * Divest the props on the index slot on the tokenid apostle
 * @param landId Land Id
 * @param signer Signer
 * @param tokenId Apostle token Id
 * @param index The index of slot
 * @param callback Callback
 * @returns any
 */
export const equipmentUnequip = (landId, signer, tokenId, index, callback) => {
    return triggerContractByContractName(landId, signer, "apostleBaseV5", "divest", [pad0xBegin(tokenId), index], callback);
};
