This way, we could support both string address as a default and an object type for more detailed (cluster based) information. However, the program's IDL may also exist in other clusters, which makes the current IDL (the one we got the other deployment addresses from) useless (because the IDL in the cluster should be fetched). For this reason, it made more sense to store this information in the metadata field compared to the top-level address field:
Problem
It's currently not possible to store program address information for other clusters.
Solution
Initially, I thought of making the top-level
address
field an enum:This way, we could support both string address as a default and an object type for more detailed (cluster based) information. However, the program's IDL may also exist in other clusters, which makes the current IDL (the one we got the other deployment addresses from) useless (because the IDL in the cluster should be fetched). For this reason, it made more sense to store this information in the
metadata
field compared to the top-leveladdress
field:Summary of changes
Add
metadata.deployments
field that optionally stores deployment addresses inmainnet
,testnet
,devnet
andlocalnet
.