Closed nomanmurtaza786 closed 3 years ago
You can use the generated erc20 token from this library:
import 'package:http/http.dart';
import 'package:web3dart/contracts/erc20.dart';
import 'package:web3dart/web3dart.dart';
Future<void> main() async {
final client = Web3Client(yourClient, Client());
final usdcContract = Erc20(
address: EthereumAddress.fromHex(usdcAddress),
client: client,
chainId: 1);
final maxAmount = BigInt.two.pow(256) - BigInt.one;
await usdcContract.approve(yourAllowanceTarget, maxAmount,
credentials: yourCredentials);
}
Hi Simon, Any idea how can I send Allowance approval?
https://0x.org/docs/guides/how-to-set-your-token-allowances