Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,11 @@ At times you may need to register additional vault factories for a Geyser.
yarn hardhat register-vault-factory --network goerli --geyser 0xdD1B3DD2eAB8376963F964B84f0D13DfC206178f --vault-factory 0x5C7bCEA7a607A6FC065B148A4B7F8F18e83b1d27
```

### Transfer Ownership
Ownable contracts can be transferred using the following script:
```
yarn hardhat transfer-ownership --network goerli --contract 0xdD1B3DD2eAB8376963F964B84f0D13DfC206178f --owner 0xEDBcCA5DfD692bab7656Ab2D4F499B43fA26480B
```

## Contribute

Expand Down
12 changes: 12 additions & 0 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,18 @@ task('register-vault-factory', 'register a vault factory instance with a Geyser'
console.log(`Transaction hash: ${res.hash}`);
})

task('transfer-ownership', 'transfers a contract that implements Ownable to a new owner')
.addParam('contract', 'address of Ownable contract')
.addParam('owner', 'address of new owner')
.setAction(async ({ contract, owner }, { ethers }) => {
const ownable = await ethers.getContractAt(
'@openzeppelin/contracts/access/Ownable.sol:Ownable',
contract,
)
const res = await ownable.transferOwnership(owner)
console.log(`Transaction hash: ${res.hash}`);
})

task('lookup-proxy-admin', 'gets the proxy admin of the given contract')
.addPositionalParam('address', 'the proxy contract address')
.setAction(async ({ address }, { ethers, run, upgrades, network }) => {
Expand Down