Skip to content

Commit

Permalink
Merge pull request #66 from therealsainath/master
Browse files Browse the repository at this point in the history
Changing deprecated load and deploy methods to non-deprecated one
  • Loading branch information
gtebrean authored Mar 10, 2023
2 parents 9a1bfe7 + 078e86a commit 68d10c9
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/advanced/ethereum_name_service.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ You can use ENS names anywhere you wish to transact in web3j. In practice this m

```java
YourSmartContract contract = YourSmartContract.load(
"0x<address>|<ensName>", web3j, credentials, GAS_PRICE, GAS_LIMIT);
"0x<address>|<ensName>", web3j, credentials, contractGasProvider);
```

Also, when performing Ether transfers, such as using the command line
Expand Down
4 changes: 2 additions & 2 deletions docs/getting_started/deploy_interact_smart_contracts.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ Credentials credentials = WalletUtils.loadCredentials("password", "/path/to/wall

YourSmartContract contract = YourSmartContract.deploy(
<web3j>, <credentials>,
GAS_PRICE, GAS_LIMIT,
<contractGasProvider>,
<param1>, ..., <paramN>).send(); // constructor params
```

Or use an existing contract:

```java
YourSmartContract contract = YourSmartContract.load(
"0x<address>|<ensName>", <web3j>, <credentials>, GAS_PRICE, GAS_LIMIT);
"0x<address>|<ensName>", <web3j>, <credentials>, <contractGasProvider>);
```

To transact with a smart contract:
Expand Down
4 changes: 2 additions & 2 deletions docs/smart_contracts/construction_and_deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Construction and deployment of smart contracts happens with the *deploy* method:

```java
YourSmartContract contract = YourSmartContract.deploy(
<web3j>, <credentials>, GAS_PRICE, GAS_LIMIT,
<web3j>, <credentials>, <contractGasProvider>,
[<initialValue>,]
<param1>, ..., <paramN>).send();
```
Expand All @@ -19,7 +19,7 @@ simply pass in it's address:

```java
YourSmartContract contract = YourSmartContract.load(
"0x<address>|<ensName>", web3j, credentials, GAS_PRICE, GAS_LIMIT);
"0x<address>|<ensName>", web3j, credentials, contractGasProvider);
```

Deploying and interacting with smart contracts
Expand Down
2 changes: 1 addition & 1 deletion docs/smart_contracts/interacting_with_smart_contract.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ However, you may wish to modify the transaction manager, which you can pass to t

```java
YourSmartContract contract = YourSmartContract.deploy(
<web3j>, <transactionManager>, GAS_PRICE, GAS_LIMIT,
<web3j>, <transactionManager>, <contractGasProvider>,
<param1>, ..., <paramN>).send();
```

Expand Down

0 comments on commit 68d10c9

Please sign in to comment.