Documentation ¶
Index ¶
- type Contract
- type CyclicImportError
- type FilesystemLoader
- type Loader
- type Preprocessor
- func (p *Preprocessor) AddContractSource(contractName, contractSource string, target flow.Address, args []cadence.Value) error
- func (p *Preprocessor) ContractBySource(contractSource string) *Contract
- func (p *Preprocessor) ContractDeploymentOrder() ([]*Contract, error)
- func (p *Preprocessor) ResolveImports() error
- type Resolver
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Contract ¶
type Contract struct {
// contains filtered or unexported fields
}
func (*Contract) Dependencies ¶
func (*Contract) TranspiledCode ¶
type CyclicImportError ¶
type CyclicImportError struct {
Cycles [][]*Contract
}
func (*CyclicImportError) Error ¶
func (e *CyclicImportError) Error() string
type FilesystemLoader ¶
type FilesystemLoader struct{}
func (FilesystemLoader) Normalize ¶
func (f FilesystemLoader) Normalize(base, relative string) string
type Preprocessor ¶
type Preprocessor struct {
// contains filtered or unexported fields
}
func NewPreprocessor ¶
func NewPreprocessor(loader Loader, aliases map[string]string) *Preprocessor
func (*Preprocessor) AddContractSource ¶
func (p *Preprocessor) AddContractSource( contractName, contractSource string, target flow.Address, args []cadence.Value, ) error
func (*Preprocessor) ContractBySource ¶
func (p *Preprocessor) ContractBySource(contractSource string) *Contract
func (*Preprocessor) ContractDeploymentOrder ¶
func (p *Preprocessor) ContractDeploymentOrder() ([]*Contract, error)
func (*Preprocessor) ResolveImports ¶
func (p *Preprocessor) ResolveImports() error
type Resolver ¶ added in v0.18.0
type Resolver struct {
// contains filtered or unexported fields
}
Resolver handles resolving imports in Cadence code
func NewResolver ¶ added in v0.18.0
NewResolver creates a new resolver
func (*Resolver) HasFileImports ¶ added in v0.18.0
HasFileImports checks if there is a file import statement present in Cadence code
func (*Resolver) ResolveImports ¶ added in v0.18.0
func (r *Resolver) ResolveImports( codePath string, contracts []project.Contract, aliases project.Aliases, ) ([]byte, error)
ResolveImports resolves imports in code to addresses
resolving is done based on code file path and is resolved to addresses defined in configuration for contracts or their aliases
Click to show internal directories.
Click to hide internal directories.