This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Extend any upgradeable program's ProgramData account directly. | |
| * Pass the program address and this script derives the ProgramData PDA automatically. | |
| * | |
| * Usage: | |
| * PROGRAM_ADDRESS=<pubkey> ADDITIONAL_BYTES=4096 npx ts-node --transpile-only scripts/extend-program-by-address.ts | |
| * npx ts-node --transpile-only scripts/extend-program-by-address.ts <PROGRAM_ADDRESS> [ADDITIONAL_BYTES] | |
| * | |
| * Optional: | |
| * RESOLVE_ONLY=1 ... # print derived addresses and exit without sending |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // SPDX-License-Identifier: MIT | |
| pragma solidity ^0.8.9; | |
| import "@openzeppelin/contracts@4.8.2/token/ERC20/ERC20.sol"; | |
| import "@openzeppelin/contracts@4.8.2/token/ERC20/extensions/ERC20Burnable.sol"; | |
| import "@openzeppelin/contracts@4.8.2/access/Ownable.sol"; | |
| import "@openzeppelin/contracts@4.8.2/token/ERC20/extensions/draft-ERC20Permit.sol"; | |
| import "@openzeppelin/contracts@4.8.2/token/ERC20/extensions/ERC20Votes.sol"; | |
| /// @custom:security-contact dickmasterson@gmail.com |