Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NONEVM] - 1104 runtime shared contract addresses hardcoder #1034

Draft
wants to merge 1 commit into
base: NONEVM-1104-shared-contract-addresses
Choose a base branch
from
Draft
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
19 changes: 14 additions & 5 deletions pkg/solana/config/chain_reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,20 @@ type ChainContractReader struct {
}

type ReadDefinition struct {
ChainSpecificName string `json:"chainSpecificName"`
ReadType ReadType `json:"readType,omitempty"`
InputModifications commoncodec.ModifiersConfig `json:"inputModifications,omitempty"`
OutputModifications commoncodec.ModifiersConfig `json:"outputModifications,omitempty"`
PDADefiniton codec.PDATypeDef `json:"pdaDefinition,omitempty"` // Only used for PDA account reads
ChainSpecificName string `json:"chainSpecificName"`
ReadType ReadType `json:"readType,omitempty"`
InputModifications commoncodec.ModifiersConfig `json:"inputModifications,omitempty"`
OutputModifications commoncodec.ModifiersConfig `json:"outputModifications,omitempty"`
PDADefiniton codec.PDATypeDef `json:"pdaDefinition,omitempty"` // Only used for PDA account reads
RuntimeSharedAddressHardcoders *RuntimeSharedAddressHardcoders `json:"runtimeSharedAddressHardcoders,omitempty"`
}

// RuntimeSharedAddressHardcoders is a used to help to handle contract abstraction where multiple plugin contracts were collapsed into one
type RuntimeSharedAddressHardcoders struct {
// InputHardCoder is used to specify a path to which a shared address will be hardcoded.
InputHardCoder commoncodec.HardCodeModifierConfig `json:"inputHardCoder"`
// OutputHardCoder is used to specify a path to which a shared address will be hardcoded.
OutputHardCoder commoncodec.HardCodeModifierConfig `json:"outputHardCoder"`
}

type ReadType int
Expand Down
Loading