-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: improve code docs #28
Conversation
it is in draft for discussion, it can be merged but is still VIP till we figure out all APIs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you check how hardhat plugin docs work: https://hardhat.org/hardhat-runner/plugins/nomicfoundation-hardhat-ethers
is that just readme or?
* Deploys a contract to multiple blockchain networks. | ||
* | ||
* @param contractName - The name of the contract to be deployed. | ||
* @param networkArgs - An object mapping network identifiers to their deployment arguments. Each network can have unique settings for the deployment. See [NetworkArguments]{@link https://github.com/ChainSafe/hardhat-plugin-multichain-deploy/docs/plugin/NetworkArguments}. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* @param networkArgs - An object mapping network identifiers to their deployment arguments. Each network can have unique settings for the deployment. See [NetworkArguments]{@link https://github.com/ChainSafe/hardhat-plugin-multichain-deploy/docs/plugin/NetworkArguments}. | |
* @param networkArgs - An object mapping network identifiers to their constructor arguments. Each network can have unique settings for the deployment. See [NetworkArguments]{@link https://github.com/ChainSafe/hardhat-plugin-multichain-deploy/docs/plugin/NetworkArguments}. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
explain what is the network identifier. Give example for one network
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The example will be provided in the example section to reduce clutter parameters section.
Note it is deployment
arguments as objects can contain constructor params and init params
docs/plugin/NetworkArguments.md
Outdated
```ts | ||
interface NetworkArgument<Abi extends ContractAbi = any> { | ||
args: ContractConstructorArgs<Abi>; | ||
initData?: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
explain initData?
packages/plugin/src/types.ts
Outdated
/** | ||
* Options used for contract deployment | ||
* | ||
* @property [salt] - Indicates whether salt is present, as Uint8Array or HexString. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
explain what salt does :)
packages/plugin/src/types.ts
Outdated
* Options used for contract deployment | ||
* | ||
* @property [salt] - Indicates whether salt is present, as Uint8Array or HexString. | ||
* @property [isUniquePerChain] - Indicates whether contract address is uniq per deployment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* @property [isUniquePerChain] - Indicates whether contract address is uniq per deployment. | |
* @property [isUniquePerChain] - Indicates whether contract address should be same or different on each chain |
is this ready @BeroBurny ? |
It is just readme.
It is not. Have some API changes incoming and some things are unfinished. |
docs/plugin/NetworkArguments.md
Outdated
networks: { | ||
sepolia: { ... }, | ||
goerli: { ... } | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we only use networks for origin chain id, we should say in docs that destination networks are not mandatory to be listed here
## Usages | ||
|
||
### TODO | ||
## Usage |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you add example how to use it with local network?
Proposal for JS docs to make it simpler with links that can be used for more
like in this case, the user can click on
NetworkArguments
and will be redirected to amd
file inside the git repository where you can read more about it