operations

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: May 29, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var OpEVMDeployLinkToken = opsevm.NewEVMDeployOperation(
	"evm-link-token-deploy",
	semver.MustParse("1.0.0"),
	"Deploys LINK token (burn/mint ERC677) contract",
	linkcontracts.LinkToken,
	link_token.LinkTokenMetaData,
	&opsevm.ContractOpts{
		Version:          &semvers.V1_0_0,
		EVMBytecode:      common.FromHex(link_token.LinkTokenBin),
		ZkSyncVMBytecode: link_token.ZkBytecode,
	},
	func(_ any) []any { return []any{} },
)

OpEVMDeployLinkToken deploys a burn/mint ERC677 LINK token contract, with ZkSync support.

View Source
var OpEVMDeployStaticLinkToken = opsevm.NewEVMDeployOperation(
	"evm-static-link-token-deploy",
	semver.MustParse("1.0.0"),
	"Deploys static LINK token (non-burn/mint) contract",
	linkcontracts.StaticLinkToken,
	link_token_interface.LinkTokenMetaData,
	&opsevm.ContractOpts{
		Version:     &semvers.V1_0_0,
		EVMBytecode: common.FromHex(link_token_interface.LinkTokenBin),
	},
	func(_ any) []any { return []any{} },
)

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