Skip to content

Commit 17912d6

Browse files
Update README.md (simolus3#227)
1 parent 4b809ec commit 17912d6

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import 'package:web3dart/web3dart.dart';
2828
Credentials fromHex = EthPrivateKey.fromHex("c87509a[...]dc0d3");
2929
3030
// Or generate a new key randomly
31-
var rng = new Random.secure();
31+
var rng = Random.secure();
3232
Credentials random = EthPrivateKey.createRandom(random)(rng);
3333
3434
// In either way, the library can derive the public key and the address
@@ -45,7 +45,7 @@ support for version 3 wallets commonly generated by other Ethereum clients:
4545
import 'dart:io';
4646
import 'package:web3dart/web3dart.dart';
4747
48-
String content = new File("wallet.json").readAsStringSync();
48+
String content = File("wallet.json").readAsStringSync();
4949
Wallet wallet = Wallet.fromJson(content, "testpassword");
5050
5151
Credentials unlocked = wallet.privateKey;
@@ -80,8 +80,8 @@ import 'package:web3dart/web3dart.dart';
8080
8181
var apiUrl = "http://localhost:7545"; //Replace with your API
8282
83-
var httpClient = new Client();
84-
var ethClient = new Web3Client(apiUrl, httpClient);
83+
var httpClient = Client();
84+
var ethClient = Web3Client(apiUrl, httpClient);
8585
8686
var credentials = ethClient.credentialsFromPrivateKey("0x...");
8787
@@ -98,7 +98,7 @@ transactions:
9898
import 'package:web3dart/web3dart.dart';
9999
100100
/// [...], you need to specify the url and your client, see example above
101-
var ethClient = new Web3Client(apiUrl, httpClient);
101+
var ethClient = Web3Client(apiUrl, httpClient);
102102
103103
var credentials = ethClient.credentialsFromPrivateKey("0x...");
104104

0 commit comments

Comments
 (0)