web3dart_go_core 0.0.1 copy "web3dart_go_core: ^0.0.1" to clipboard
web3dart_go_core: ^0.0.1 copied to clipboard

discontinued

Dart library to connect to Core Coin clients. Send transactions and interact with smart contracts!

example/main.dart

const String privateKey =
    'a2fd51b96dc55aeb14b30d55a6b3121c7b9c599500c1beb92a389c3377adc86e';
const String rpcUrl = 'http://localhost:7545';

Future<void> main() async {
  // start a client we can use to send transactions
  // final client = Web3Client(rpcUrl, Client());

  // final credentials = await client.credentialsFromPrivateKey(privateKey);
  // final address = await credentials.extractAddress();

  // print(address.hexEip55);
  // // print(await client.getBalance(address));

  // await client.sendTransaction(
  //   credentials,
  //   Transaction(
  //     to: XCBAddress.fromHex('0xC914Bb2ba888e3367bcecEb5C2d99DF7C7423706'),
  //     energyPrice: EtherAmount.inWei(BigInt.one),
  //     maxGas: 100000,
  //     value: EtherAmount.fromUnitAndValue(EtherUnit.ether, 1),
  //   ),
  // );

  // await client.dispose();
}
1
likes
20
pub points
0%
popularity

Publisher

unverified uploader

Dart library to connect to Core Coin clients. Send transactions and interact with smart contracts!

License

MIT (LICENSE)

Dependencies

collection, convert, ed448_goldilock, flutter, http, isolate, json_rpc_2, meta, pointycastle, stream_channel, typed_data, uuid

More

Packages that depend on web3dart_go_core