generated from codama-idl/renderers-demo
-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Currently, the program address is generated as a const with a typed Address for the default key. There is no way to update this value. Some programs use separate addresses for local development/devnet vs mainnet. Currently those programs would need a copy of the generated clients for each cluster.
One potential solution could be to export let {program id} = "key" as Address and provide a setter to allow users to update the id. That would be a very simple change to the program template:
export let {{ programAddressConstant }} = '{{ program.publicKey }}' as Address;
export function {{ setProgramAddressFucntion }} (address: Address) {
{{ programAddressConstant }} = address;
}Metadata
Metadata
Assignees
Labels
No labels