Finalize test migration: remove legacy dependencies and test helpers (#4797)
This commit is contained in:
@ -13,7 +13,7 @@ IMPORTANT: OpenZeppelin Contracts uses semantic versioning to communicate backwa
|
||||
[[install]]
|
||||
=== Installation
|
||||
|
||||
==== Hardhat, Truffle (npm)
|
||||
==== Hardhat (npm)
|
||||
|
||||
```console
|
||||
$ npm install @openzeppelin/contracts
|
||||
|
||||
@ -186,16 +186,15 @@ contract Box is Multicall {
|
||||
}
|
||||
----
|
||||
|
||||
This is how to call the `multicall` function using Truffle, allowing `foo` and `bar` to be called in a single transaction:
|
||||
This is how to call the `multicall` function using Ethers.js, allowing `foo` and `bar` to be called in a single transaction:
|
||||
[source,javascript]
|
||||
----
|
||||
// scripts/foobar.js
|
||||
|
||||
const Box = artifacts.require('Box');
|
||||
const instance = await Box.new();
|
||||
const instance = await ethers.deployContract("Box");
|
||||
|
||||
await instance.multicall([
|
||||
instance.contract.methods.foo().encodeABI(),
|
||||
instance.contract.methods.bar().encodeABI()
|
||||
instance.interface.encodeFunctionData("foo"),
|
||||
instance.interface.encodeFunctionData("bar")
|
||||
]);
|
||||
----
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
Not sure where to start? Use the interactive generator below to bootstrap your
|
||||
contract and learn about the components offered in OpenZeppelin Contracts.
|
||||
|
||||
TIP: Place the resulting contract in your `contracts` directory in order to compile it with a tool like Hardhat or Truffle. Consider reading our guide on xref:learn::developing-smart-contracts.adoc[Developing Smart Contracts] for more guidance!
|
||||
TIP: Place the resulting contract in your `contracts` or `src` directory in order to compile it with a tool like Hardhat or Foundry. Consider reading our guide on xref:learn::developing-smart-contracts.adoc[Developing Smart Contracts] for more guidance!
|
||||
|
||||
++++
|
||||
<script async src="https://wizard.openzeppelin.com/build/embed.js"></script>
|
||||
|
||||
Reference in New Issue
Block a user