File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ Please refer `examples` directory.
38
38
39
39
### setup
40
40
41
- ```
41
+ ``` C++
42
42
#define INFURA_HOST "rinkeby.infura.io"
43
43
#define INFURA_PATH "/<YOUR_INFURA_ID>"
44
44
@@ -47,7 +47,7 @@ Web3 web3(INFURA_HOST, INFURA_PATH);
47
47
48
48
### call web3 methods
49
49
50
- ```
50
+ ```C++
51
51
char result[128];
52
52
53
53
web3.Web3ClientVersion(result);
@@ -59,7 +59,7 @@ USE_SERIAL.println(result);
59
59
60
60
### ` call ` to Contract
61
61
62
- ```
62
+ ``` C++
63
63
Contract contract (&web3, CONTRACT_ADDRESS);
64
64
strcpy(contract.options.from, MY_ADDRESS);
65
65
strcpy(contract.options.gasPrice,"2000000000000");
@@ -71,7 +71,7 @@ USE_SERIAL.println(result);
71
71
72
72
### `sendTransaction` to Contract
73
73
74
- ```
74
+ ```C++
75
75
Contract contract(&web3, CONTRACT_ADDRESS);
76
76
contract.SetPrivateKey((uint8_t*)PRIVATE_KEY);
77
77
uint32_t nonceVal = (uint32_t)web3.EthGetTransactionCount((char *)MY_ADDRESS);
You can’t perform that action at this time.
0 commit comments