Nucleus
  • Overview
    • Welcome to Nucleus
    • Official Links
    • FAQ
  • Nucleus Architecture
    • Overview
    • Vault Framework
    • Cross-chain Infrastructure
    • Withdrawals
    • Revenue Strategies
      • Market-agnostic Lending
      • Cross-chain Intents
      • Ownership by Default
    • Reward Distribution
    • Nucleus Points
    • Deployed Assets
    • Smart Contracts
      • README
      • CONTRACTS
        • contents
        • atomic-queue
          • Contents
          • AtomicQueue
          • AtomicSolver
          • AtomicSolverV2
          • AtomicSolverV3
          • IAtomicSolver
        • base
          • Boring Vault
            • BoringVault
          • Decoders and Sanitizers
            • Contents
            • IonPoolDecoderAndSanitizer
          • Roles
            • Contents
            • Cross Chain
              • Cross Chain OP Teller With Multi Asset Support
                • CrossChainOPTellerWithMultiAssetSupport
                • ICrossDomainMessenger
              • Cross Chain Teller Base
                • BridgeData
                • CrossChainTellerBase
              • MultiChainLayerZeroTellerWithMultiAssetSupport
              • Multi Chain Teller Base
                • Chain
                • MultiChainTellerBase
                • MultiChainTellerBase_GasLimitExceeded
                • MultiChainTellerBase_GasTooLow
                • MultiChainTellerBase_MessagesNotAllowedFrom
                • MultiChainTellerBase_MessagesNotAllowedFromSender
                • MultiChainTellerBase_MessagesNotAllowedTo
                • MultiChainTellerBase_ZeroMessageGasLimit
              • OAppAuth
                • Contents
                • OAppAuth
                • OAppAuthCore
                • OAppAuthReceiver
                • OAppAuthSender
            • AccountantWithRateProviders
            • ManagerWithMerkleVerification
            • TellerWithMultiAssetSupport
        • helper
          • Contents
          • Constants
          • ArcticArchitectureLens
          • Deployer
          • GenericRateProvider
        • interfaces
          • BalancerVault
          • AggregationRouterV5
          • BeforeTransferHook
          • DecoderCustomTypes
          • ICreateX
          • IPriceFeed
          • PriceRouter
          • IRateProvider
          • INonFungiblePositionManager
          • Contents
          • IStaking
            • ILiquidityPool
            • ILRTDepositPool
            • IRestakeManager
            • IStaderConfig
            • IStakePoolManager
            • ISTETH
            • ISWETH
            • IUNSTETH
            • IUserWithdrawManager
            • IWEETH
            • IWithdrawRequestNft
            • IWSTETH
          • IUniswap v3 Router
            • IUniswapV3Router
            • IUniswapV3SwapCallback
        • micro-managers
          • Contents
          • DexSwapperUManager
          • DexAggregatorUManager
          • UManager
        • migration
          • Contents
          • CellarMigrationAdaptor
        • oracles
          • EthPerTokenRateProvider
          • Contents
          • EthPerWstEthRateProvider
  • Security
    • Audits
Powered by GitBook
On this page
  • State Variables
  • isDeployer
  • Functions
  • constructor
  • deployContract
  • getAddress
  • convertNameToBytes32
  • Events
  • ContractDeployed
  • Errors
  • Deployer__NotADeployer

Was this helpful?

  1. Nucleus Architecture
  2. Smart Contracts
  3. CONTRACTS
  4. helper

Deployer

PreviousArcticArchitectureLensNextGenericRateProvider

Was this helpful?

Inherits: Auth

State Variables

isDeployer

mapping(address => bool) public isDeployer;

Functions

constructor

constructor(address _owner, Authority _auth) Auth(_owner, _auth);

deployContract

Deploy some contract to a deterministic address.

Should be of form: "ContractName Version 0.0" Where the numbers after version are VERSION . SUBVERSION

function deployContract(
    string calldata name,
    bytes memory creationCode,
    bytes calldata constructorArgs,
    uint256 value
)
    external
    requiresAuth
    returns (address);

Parameters

Name
Type
Description

name

string

string used to derive salt for deployment

creationCode

bytes

the contract creation code to deploy - can be obtained by calling type(contractName).creationCode

constructorArgs

bytes

the contract constructor arguments if any - must be of form abi.encode(arg1, arg2, ...)

value

uint256

non zero if constructor needs to be payable

getAddress

function getAddress(string calldata name) external view returns (address);

convertNameToBytes32

function convertNameToBytes32(string calldata name) public pure returns (bytes32);

Events

ContractDeployed

Emitted on deployContract calls.

event ContractDeployed(string name, address contractAddress, bytes32 creationCodeHash);

Parameters

Name
Type
Description

name

string

string name used to derive salt for deployment

contractAddress

address

the newly deployed contract address

creationCodeHash

bytes32

keccak256 hash of the creation code - useful to determine creation code is the same across multiple chains

Errors

Deployer__NotADeployer

error Deployer__NotADeployer();
Git Source