sendERC721Nft method

Future<String> sendERC721Nft({
  1. required String recipient,
  2. required String from,
  3. required int tokenId,
  4. required String contractAddress,
  5. required Uint8List seed,
})

Send ERC721

Implementation

Future<String> sendERC721Nft({
  required String recipient,
  required String from,
  required int tokenId,
  required String contractAddress,
  required Uint8List seed,
}) async {
  final function = LocalContractFunctionWithValues(
    name: "transferFrom",
    parameters: [
      FunctionParamWithValue(
        name: "from",
        type: FunctionParamAddress(),
        value: from,
      ),
      FunctionParamWithValue(
        name: "to",
        type: FunctionParamAddress(),
        value: recipient,
      ),
      FunctionParamWithValue(
        name: "tokenId",
        type: FunctionParamInt(),
        value: tokenId,
      ),
    ],
    stateMutability: StateMutability.nonpayable,
    outputTypes: [],
  );

  return await interactWithContract(
    contractAddress: contractAddress,
    function: function,
    sender: from,
    seed: seed,
    feeInfo: null,
  );
}