Skip to content
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

script to modify the state history retention period via the safe sdk #2012

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

alysiahuggins
Copy link
Contributor

Closes #2008

This PR:

  • adds a script to modify the state history retention period via the safe sdk so that the admin, which is a multisig wallet, can execute the transaction
  • adds instructions in the readme above

* @param {string} value - The value to be sent with the transaction
* @returns {Promise<any>} - A promise that resolves to the Safe transaction object
*/
async function createSafeTransaction(

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we could move this to utils.ts as it can be used by other files in the future

);

console.log(
`The other owners of the Safe Multisig wallet need to sign the transaction via the Safe UI https://app.safe.global/transactions/queue?safe=sep:${safeAddress}`,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Proposal created successfully. The other owners of the Safe Multisig wallet need to sign the transaction via the Safe UI https://app.safe.global/transactions/queue?safe=sep:${safeAddress}

* @param {number} retention_period - The state history retention period in seconds
* @returns {string} - Encoded transaction data
*/
function createStateHistoryRetentionPeriodTxData(retention_period: number): string {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: does this have to be a function? it is just two lines so we can prob merge this with proposeSetStateHistoryRetentionTransaction

): Promise<LocalSafeTransaction> {
// Prepare the safe transaction data with the contract address, data, and value
let safeTransactionData = createSafeTransactionData(contractAddress, data, value);
console.log("data hex: ", data);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

console.log("Safe Transaction Data hex: ", data)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

modify the stateHistoryRetentionPeriod in via the safe sdk
2 participants