Skip to content

Commit 669baed

Browse files
committed
docs: update function annotations
1 parent 2d07c10 commit 669baed

4 files changed

+12
-2
lines changed

scripts/governance/execute-createProposalWithSolution-txdata.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ const { sendTransaction, prepareProposalTransaction } = require('./helpers');
88
* @param categoryId category id for the proposal
99
* @param actionParamsRaw action params for the proposal as stringified JSON
1010
* @param solutionHash hash of the solution for the proposal
11-
* @returns {Promise<{createProposalWithSolution: *}>}
1211
*/
1312
const main = async (proposalFilePath, categoryId, actionParamsRaw, solutionHash = '') => {
1413
if (network.name === 'tenderly') {

scripts/governance/get-decoded-action-data.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,11 @@ async function main() {
7979
decodeParamData(opts);
8080
}
8181

82+
/**
83+
* Function to decode action parameters from a governance proposal
84+
* @param {Object} options - options object containing categoryId and data
85+
* @returns an array of processed values, converting bytes to UTF8 where applicable
86+
*/
8287
function decodeParamData(options) {
8388
const actionParamTypes = PROPOSAL_CATEGORY[options.categoryId].actionParamTypes;
8489

scripts/governance/get-encoded-action-data.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,13 @@ function processArg(arg, type, argsIndex) {
138138
return arg;
139139
}
140140

141+
/**
142+
* Encodes the action parameters for a given governance proposal category.
143+
*
144+
* @param {string} categoryId - The ID of the governance proposal category.
145+
* @param {Array} actionParams - The parameters to be encoded, in the order specified by the category.
146+
* @returns {string} The encoded action data in a hex string format.
147+
*/
141148
function getEncodedAction(categoryId, actionParams) {
142149
const { actionParamTypes, description } = PROPOSAL_CATEGORY[categoryId];
143150

scripts/governance/simulate-createProposalWithSolution-txdata.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ const { simulateTransaction, prepareProposalTransaction, verifyDecodedCreateProp
99
* @param categoryId category id for the proposal
1010
* @param actionParamsRaw action params for the proposal as stringified JSON
1111
* @param solutionHash hash of the solution for the proposal
12-
* @returns {Promise<{createProposalWithSolution: *}>}
1312
*/
1413
const main = async (proposalFilePath, categoryId, actionParamsRaw, solutionHash = '') => {
1514
if (network.name === 'tenderly') {

0 commit comments

Comments
 (0)