deployer

package
v0.64.8 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2026 License: Apache-2.0 Imports: 12 Imported by: 1 module, 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 (
	EOA_UNIVERSAL_DEPLOYER_ADDRESS = common.HexToAddress("0x9c5a87452d4FAC0cbd53BDCA580b20A45526B3AB")
	UNIVERSAL_DEPLOYER_ADDRESS     = common.HexToAddress("0x1b926fbb24a9f78dcdd3272f2d86f5d0660e59c0")
	UNIVERSAL_DEPLOYER_2_ADDRESS   = common.HexToAddress("0x8a5bc19e22d6ad55a2c763b93a75d09f321fe764")
	UNIVERSAL_DEPLOYER_FUNDING     = big.NewInt(1).Mul(big.NewInt(300), big.NewInt(100_000_000_000_000))
	UNIVERSAL_DEPLOYER_TX          = "" /* 536-byte string literal not displayed */

	// expected bytecode for the universal deployer 2. If this changes for whatever reason then the universal
	// deployer's addresses of contracts it's deployed will change, and so will UNIVERSAL_DEPLOYER_2_ADDRESS.
	//
	// do not change this value. it is here to integrity check within the UniversalDeployer. if you do change
	// it however, then make sure to also update UNIVERSAL_DEPLOYER_2_ADDRESS.
	//
	// this value was originally copied from typings/contracts/factories/UniversalDeployer2__factory.ts
	// from https://github.com/0xsequence/sequence.js/blob/master/packages/deployer
	UNIVERSAL_DEPLOYER_2_BYTECODE = common.FromHex("0x608060405234801561001057600080fd5b5061013d806100206000396000f3fe60806040526004361061001e5760003560e01c80639c4ae2d014610023575b600080fd5b6100cb6004803603604081101561003957600080fd5b81019060208101813564010000000081111561005457600080fd5b82018360208201111561006657600080fd5b8035906020019184600183028401116401000000008311171561008857600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955050913592506100cd915050565b005b60008183516020850134f56040805173ffffffffffffffffffffffffffffffffffffffff83168152905191925081900360200190a050505056fea264697066735822122033609f614f03931b92d88c309d698449bb77efcd517328d341fa4f923c5d8c7964736f6c63430007060033")

	UNIVERSAL_DEPLOYER_2_ABI = ethcontract.MustParseABI(`[
    {
      "anonymous": true,
      "inputs": [
        {
          "indexed": false,
          "internalType": "address",
          "name": "_addr",
          "type": "address"
        }
      ],
      "name": "Deploy",
      "type": "event"
    },
    {
      "inputs": [
        {
          "internalType": "bytes",
          "name": "_creationCode",
          "type": "bytes"
        },
        {
          "internalType": "uint256",
          "name": "_instance",
          "type": "uint256"
        }
      ],
      "name": "deploy",
      "outputs": [],
      "stateMutability": "payable",
      "type": "function"
    }
  ]`)
)
View Source
var (
	EIP2470_EOA_DEPLOYER_ADDRESS = common.HexToAddress("0xBb6e024b9cFFACB947A71991E386681B1Cd1477D")
	EIP2470_DEPLOYER_ADDRESS     = common.HexToAddress("0xce0042B868300000d44A59004Da54A005ffdcf9f")
	EIP2470_DEPLOYER_TX          = "" /* 736-byte string literal not displayed */
	EIP2470_DEPLOYER_FUNDING     = big.NewInt(1).Mul(big.NewInt(300), big.NewInt(100_000_000_000_000))

	EIP2470_DEPLOYER_ABI = ethcontract.MustParseABI(`[
    {
        "constant": false,
        "inputs": [
            {
                "internalType": "bytes",
                "name": "_initCode",
                "type": "bytes"
            },
            {
                "internalType": "bytes32",
                "name": "_salt",
                "type": "bytes32"
            }
        ],
        "name": "deploy",
        "outputs": [
            {
                "internalType": "address payable",
                "name": "createdContract",
                "type": "address"
            }
        ],
        "payable": false,
        "stateMutability": "nonpayable",
        "type": "function"
    }
  ]`)
)

Functions

func ComputeCreate2Address

func ComputeCreate2Address(contractABI abi.ABI, contractBin []byte, contractInstance uint, contractArgs ...interface{}) (common.Address, []byte, error)

Types

type EIP2470Deployer

type EIP2470Deployer struct {
	Wallet *ethwallet.Wallet
	// contains filtered or unexported fields
}

func NewEIP2470Deployer

func NewEIP2470Deployer(wallet *ethwallet.Wallet) (*EIP2470Deployer, error)

func (*EIP2470Deployer) ComputeCreate2Address

func (e *EIP2470Deployer) ComputeCreate2Address(contractABI abi.ABI, contractBin []byte, contractInstance *big.Int, contractArgs ...any) (common.Address, []byte, error)

func (*EIP2470Deployer) Deploy

func (e *EIP2470Deployer) Deploy(ctx context.Context, contractABI abi.ABI, contractBin []byte, contractInstance *big.Int, txParams any, gasLimit uint, contractArgs ...any) (common.Address, error)

type UniversalDeployer

type UniversalDeployer struct {
	Wallet *ethwallet.Wallet
	// contains filtered or unexported fields
}

func NewUniversalDeployer

func NewUniversalDeployer(wallet *ethwallet.Wallet) (*UniversalDeployer, error)

func (*UniversalDeployer) Deploy

func (u *UniversalDeployer) Deploy(ctx context.Context, contractABI abi.ABI, contractBin []byte, contractInstance uint, txParams interface{}, gasLimit uint, contractArgs ...interface{}) (common.Address, error)

Jump to

Keyboard shortcuts

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