operations

package
v0.9.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 6, 2026 License: MIT Imports: 12 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var OpEVMDeployLinkToken = contract.NewDeploy(contract.DeployParams[struct{}]{
	Name:             "evm-link-token-deploy",
	Description:      "Deploys LINK token (burn/mint ERC677) contract",
	Version:          &types.BurnMintLinkTokenTypeAndVersion.Version,
	ContractMetadata: link_token.LinkTokenMetaData,
	BytecodeByTypeAndVersion: map[string]contract.Bytecode{
		types.BurnMintLinkTokenTypeAndVersion.String(): {
			EVM: common.FromHex(link_token.LinkTokenBin),
		},
	},
})
View Source
var OpEVMDeployStaticLinkToken = contract.NewDeploy(contract.DeployParams[struct{}]{
	Name:             "evm-static-link-token-deploy",
	Description:      "Deploys static LINK token (non-burn/mint) contract",
	Version:          &types.StaticLinkTokenTypeAndVersion.Version,
	ContractMetadata: link_token_interface.LinkTokenMetaData,
	BytecodeByTypeAndVersion: map[string]contract.Bytecode{
		types.StaticLinkTokenTypeAndVersion.String(): {
			EVM: common.FromHex(link_token_interface.LinkTokenBin),
		},
	},
})

OpEVMDeployStaticLinkToken deploys a non-burn/mint static LINK token contract.

View Source
var OpSolanaDeployLinkToken = operations.NewOperation(
	"solana-link-token-deploy",
	semver.MustParse("1.0.0"),
	"Deploys LINK token (SPL token) on a Solana chain",
	func(b operations.Bundle, chain cldf_solana.Chain, input SolanaLinkDeployInput) (SolanaLinkDeployOutput, error) {
		instructions, err := solTokenUtil.CreateToken(
			b.GetContext(),
			solana.TokenProgramID,
			input.MintKey.PublicKey(),
			chain.DeployerKey.PublicKey(),
			input.Decimals,
			chain.Client,
			cldf_solana.SolDefaultCommitment,
		)
		if err != nil {
			return SolanaLinkDeployOutput{}, fmt.Errorf("failed to generate token instructions: %w", err)
		}
		if err = chain.Confirm(instructions, solCommonUtil.AddSigners(input.MintKey)); err != nil {
			return SolanaLinkDeployOutput{}, fmt.Errorf("failed to confirm token deployment: %w", err)
		}

		return SolanaLinkDeployOutput{Address: input.MintKey.PublicKey().String()}, nil
	},
)

OpSolanaDeployLinkToken deploys a LINK SPL token on a Solana chain.

Functions

This section is empty.

Types

type SolanaLinkDeployInput

type SolanaLinkDeployInput struct {
	MintKey  solana.PrivateKey
	Decimals uint8
}

type SolanaLinkDeployOutput

type SolanaLinkDeployOutput struct {
	Address string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL