Skip to content
Merged
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
1 change: 1 addition & 0 deletions cmd/init_cardano.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ func init() {
initCardanoCmd.Flags().StringVar(&initOptions.Network, "network", "mainnet", "The name of the network to connect to")
initCardanoCmd.Flags().StringVar(&initOptions.Socket, "socket", "", "Socket to mount for the cardano node to connect to")
initCardanoCmd.Flags().StringVar(&initOptions.BlockfrostKey, "blockfrost-key", "", "Blockfrost key")
initCardanoCmd.Flags().StringVar(&initOptions.BlockfrostBaseURL, "blockfrost-base-url", "", "Blockfrost base URL (for run-your-own blockfrost setups)")

initCmd.AddCommand(initCardanoCmd)
}
14 changes: 8 additions & 6 deletions internal/blockchain/cardano/connector/cardanoconnect/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,10 @@ type ConnectorConfig struct {
}

type BlockchainConfig struct {
BlockfrostKey string `yaml:"blockfrostKey,omitempty"`
Socket string `yaml:"socket,omitempty"`
Network string `yaml:"network,omitempty"`
BlockfrostKey string `yaml:"blockfrostKey,omitempty"`
BlockfrostBaseURL string `yaml:"blockfrostBaseUrl,omitempty"`
Socket string `yaml:"socket,omitempty"`
Network string `yaml:"network,omitempty"`
}

type ContractsConfig struct {
Expand Down Expand Up @@ -137,9 +138,10 @@ func (c *Cardanoconnect) GenerateConfig(stack *types.Stack, org *types.Organizat
},
Connector: &ConnectorConfig{
Blockchain: &BlockchainConfig{
BlockfrostKey: stack.BlockfrostKey,
Network: stack.Network,
Socket: socket,
BlockfrostKey: stack.BlockfrostKey,
BlockfrostBaseURL: stack.BlockfrostBaseURL,
Network: stack.Network,
Socket: socket,
},
Contracts: &ContractsConfig{
ComponentsPath: "/cardanoconnect/contracts/components",
Expand Down
1 change: 1 addition & 0 deletions internal/stacks/stack_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ func (s *StackManager) InitStack(options *types.InitOptions) (err error) {
ChainIDPtr: &options.ChainID,
Network: options.Network,
BlockfrostKey: options.BlockfrostKey,
BlockfrostBaseURL: options.BlockfrostBaseURL,
Socket: options.Socket,
RemoteNodeURL: options.RemoteNodeURL,
RequestTimeout: options.RequestTimeout,
Expand Down
1 change: 1 addition & 0 deletions pkg/types/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ type InitOptions struct {
Network string
Socket string
BlockfrostKey string
BlockfrostBaseURL string
DisableTokenFactories bool
RequestTimeout int
ReleaseChannel string
Expand Down
1 change: 1 addition & 0 deletions pkg/types/stack.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ type Stack struct {
Network string `json:"network,omitempty"`
Socket string `json:"socket,omitempty"`
BlockfrostKey string `json:"blockfrostKey,omitempty"`
BlockfrostBaseURL string `json:"blockfrostBaseURL,omitempty"`
RemoteNodeURL string `json:"remoteNodeURL,omitempty"`
DisableTokenFactories bool `json:"disableTokenFactories,omitempty"`
RequestTimeout int `json:"requestTimeout,omitempty"`
Expand Down
Loading