Skip to content

Commit

Permalink
Change owner script
Browse files Browse the repository at this point in the history
  • Loading branch information
aaron-alderman committed Jul 19, 2023
1 parent 955ad5d commit 1d0b287
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions scripts/change-owner.ts
Original file line number Diff line number Diff line change
@@ -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>('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 transaciton confirmation');

await tx.wait();

console.log('Ownership transferred. Tx hash: ', tx.blockHash);
}

// 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;
});

0 comments on commit 1d0b287

Please sign in to comment.