This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// you will need the following import | |
// import 'package:flutter/services.dart'; | |
Future<DeployedContract> loadContract() async { | |
String abiCode = await rootBundle.loadString("assets/abi.json"); | |
String contractAddress = "0x8A30f78133176ed5E6CcB0AE8429AEEBf4c82Ffc"; | |
final contract = DeployedContract(ContractAbi.fromJson(abiCode, "MetaCoin"), | |
EthereumAddress.fromHex(contractAddress)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:http/http.dart'; | |
import 'package:web3dart/web3dart.dart'; | |
class _MyHomePageState extends State<MyHomePage> { | |
Client httpClient; | |
Web3Client ethClient; | |
@override | |
void initState() { | |
super.initState(); |
NewerOlder