Hi Injective team,
I'm Gul, a Solidity developer. I'm particularly interested in Injective because of its innovative cross-chain bridge (Peggy) and the real-world utility of the contracts.
I noticed that the Solidity contracts (especially in the Peggy module, like Peggy.sol) currently have limited or no NatSpec comments (the standard /// @notice, @dev, @param, etc. format). Adding proper NatSpec would greatly improve:
- Code readability for developers and auditors
- Onboarding for new contributors
- Integration with tools like Solidity doc generators or IDE hover tips
- Overall best practices in the project
I'd love to help by contributing NatSpec documentation. To start small and avoid overstepping, I propose beginning with 3-4 key functions in Peggy.sol, such as:
- deposit / depositBatch
- submitBatch (or equivalent batch processing)
- valsetUpdate / validator set functions
- A withdrawal/claim function
Example of what I have in mind (just a preview):
/// @notice Deposits ERC20 tokens to be bridged to the Injective chain.
/// @dev Locks tokens in the contract and emits a Deposit event for relayers to attest.
/// Reverts on unsupported token, zero amount, or insufficient allowance.
/// @param _token The ERC20 token address to bridge.
/// @param _amount The amount of tokens to deposit.
/// @param _receiver The Injective destination address (bytes32).
function deposit(address _token, uint256 _amount, bytes32 _receiver) external;
If this aligns with your priorities and style, I can submit a PR with these initial changes. I'm also happy to expand to the full Peggy.sol, InjToken.sol, or other contracts if useful.
Any feedback, preferred NatSpec style guidelines, or priorities would be super helpful!
Thanks for the awesome project and for considering this contribution. Looking forward to your thoughts.
Best regards,
Gul
Hi Injective team,
I'm Gul, a Solidity developer. I'm particularly interested in Injective because of its innovative cross-chain bridge (Peggy) and the real-world utility of the contracts.
I noticed that the Solidity contracts (especially in the Peggy module, like Peggy.sol) currently have limited or no NatSpec comments (the standard
/// @notice,@dev,@param, etc. format). Adding proper NatSpec would greatly improve:I'd love to help by contributing NatSpec documentation. To start small and avoid overstepping, I propose beginning with 3-4 key functions in Peggy.sol, such as:
Example of what I have in mind (just a preview):
If this aligns with your priorities and style, I can submit a PR with these initial changes. I'm also happy to expand to the full Peggy.sol, InjToken.sol, or other contracts if useful.
Any feedback, preferred NatSpec style guidelines, or priorities would be super helpful!
Thanks for the awesome project and for considering this contribution. Looking forward to your thoughts.
Best regards,
Gul