Function for convert a hex String to BigInt.
BigInt hexToBigInt(String hex) { if (hex.length == 0) return BigInt.from(0); return BigInt.parse(strip0xHex(hex), radix: 16); }