diff --git a/scripts/change-owner.ts b/scripts/change-owner.ts new file mode 100644 index 0000000..c1b5349 --- /dev/null +++ b/scripts/change-owner.ts @@ -0,0 +1,25 @@ +import { getContractAt } from './helper'; +import marketAddresses from '../deployments/SY-swETH.json'; +import { SwETHSY } from '../typechain-types'; +import { PENDLE_MULTISIG } from './consts'; + +async function main() { + const SY = await getContractAt('SwETHSY', marketAddresses.SY); + + console.log('Transferring ownership to: ', PENDLE_MULTISIG); + + const tx = await SY.transferOwnership(PENDLE_MULTISIG, false, false); // direct=false, renounce=false + + console.log('Waiting for transaction confirmation'); + + await tx.wait(); + + console.log('Ownership transferred'); +} + +// We recommend this pattern to be able to use async/await everywhere +// and properly handle errors. +main().catch((error) => { + console.error(error); + process.exitCode = 1; +});