Transient Labs Developer Docs
  • 👋Welcome!
  • 📑TL Creator Contracts
    • Creator Contracts Overview
    • Implementation Contracts
      • v3.x.x
      • v2.x.x
      • v1.x.x
    • Smart Contract Documentation
    • Common Features
      • Access Control
      • Royalties
      • Story Inscriptions
      • NFT Delegation
      • BlockList
    • ERC721TL
    • ERC1155TL
    • Shatter
    • ERC7160TL
    • Doppelganger
    • Collector's Choice
  • ⛔BlockList
    • BlockList Overview
    • Implementation Contracts
    • Deployments
    • Smart Contract Documentation
  • 🔖Story Inscriptions
    • Story Inscriptions Overview
    • Story Inscription Format
    • Smart Contract Documentation
  • 🖼️T.R.A.C.E.
    • T.R.A.C.E. Overview
    • Record Schema
    • Implementation
    • Smart Contract Documentation
      • TRACE
      • TRACERSRegistry
  • 🥞Stacks
    • Stacks Overview
    • Deployments
    • Smart Contract Documentation
  • 🎨Dynamic Art
    • Dynamic Art Overview
    • How to Create
    • How to Display
  • 🔗Integrations
    • Deploying TL Contracts
    • NFT Delegation
    • Integrating with Marketplaces
    • Metadata Structure
    • Inheriting TL Contracts
    • Onchain Art
    • Embeddable Components
  • ❔Miscellaneous
    • Supported Blockchains
    • tl-sol-tools
    • Licensing
    • Batch Upload Secret JSON
Powered by GitBook
On this page
  • Overview
  • Deployed Address
  • Available Contract Types
  • Generating Initialization Code
  • web3py
  • web3js
  • ethersjs
  • Viem
  • Cast
  • Smart Contract Documentation
  • Latest Version (1.0.0)
  • All Versions
  1. Integrations

Deploying TL Contracts

Deploy a TL Creator Contract, TRACE Contract, or BlockListRegistry from any dApp using our Universal Deployer contract factory.

PreviousHow to DisplayNextNFT Delegation

Last updated 1 year ago

Overview

As mentioned, all of our creator contracts are deployed via immutable proxies. In addition, T.R.A.C.E. and BlockListRegistry contracts are also deployed in this manner.

All of this is accomplished with our Universal Deployer contract factory. We've developed this as a public good and our primary contract deployment method.

You can simply deploy contracts by encoding some initialization code and calling a single on-chain function. the CREATE2 opcode is used in order to predetermine contract addresses and deploy the same exact contract across EVM chains to the same address (pretty neat huh?).

Enjoy!

Deployed Address

The Universal Deployer is deployed to all at 0x7c24805454F7972d36BEE9D139BD93423AA29f3f

Available Contract Types

  • BlockListRegistry

  • ERC721TL

  • ERC1155TL

  • SHATTER (Shatter)

  • ERC7160TL

  • DOPPEL (Doppelganger)

  • CHOICE (Collectors Choice)

  • TRACE**

** only available on TRACE supported chains

Generating Initialization Code

Whenever you deploy with this universal deployer, you need to pass calldata as bytes for intialization code of the contract. You can encode the parameters with the function signature using many different tools, including web3py, web3js, etherjs, viem, and foundry (cast). The following example shows how to accomplish this for an ERC721TL contract with cast.

web3py

# omitted imports and creating a contract
# for more, visit https://web3py.readthedocs.io/en/stable/quickstart.html

contract_address = "" # can use any address
erc721tl_abi = '' # can get from etherscan
contract = web3.eth.contract(address=contract_address, abi=erc721tl_abi)

init_code = contract.encodeABI(
    fn_name="initialize",
    args=[
        "Test 721",
        "T721",
        "personalization",
        "0x0000000000000000000000000000000000C0FFEE",
        1000,
        "0x0000000000000000000000000000000000C0FFEE",
        [],
        "0x0000000000000000000000000000000000000000",
        "0x0000000000000000000000000000000000000000"
    ]
)

print(init_code)

web3js

// see more here: https://web3js.readthedocs.io/en/v1.10.0/web3-eth-contract.html#methods-mymethod-encodeabi

console.log(contract.methods.initialize(
  "Test 721",
  "T721",
  "personalization",
  "0x0000000000000000000000000000000000C0FFEE",
  1000,
  "0x0000000000000000000000000000000000C0FFEE",
  [],
  "0x0000000000000000000000000000000000000000",
  "0x0000000000000000000000000000000000000000"
).encodeABI());

ethersjs

// see more here: https://docs.ethers.org/v5/api/utils/abi/interface/#Interface--encoding
import { ethers } from "ethers";

const iFace = new ethers.utils.Interface([
  "function initialize(string,string,string,address,uint256,address,address[],bool,address,address)"
]);

console.log(iFace.encodeFunctionData("initialize", [
  "Test 721",
  "T721",
  "personalization",
  "0x0000000000000000000000000000000000C0FFEE",
  1000,
  "0x0000000000000000000000000000000000C0FFEE",
  [],
  "0x0000000000000000000000000000000000000000",
  "0x0000000000000000000000000000000000000000"
]);

Viem

// see more here: https://viem.sh/docs/contract/encodeFunctionData

import { parseAbi, encodeFunctionData } from 'viem';

const abi = parseAbi([
  "function initialize(string,string,string,address,uint256,address,address[],bool,address,address)"
]);
const initCode = encodeFunctionData({
  abi,
  functionName: "initialize",
  args: [
    "Test 721",
    "T721",
    "personalization",
    "0x0000000000000000000000000000000000C0FFEE",
    BigInt(1000),
    "0x0000000000000000000000000000000000C0FFEE",
    [],
    "0x0000000000000000000000000000000000000000",
    "0x0000000000000000000000000000000000000000"
  ]
});
console.log(initCode);

Cast

cast calldata "initialize(string,string,string,address,uint256,address,address[],bool,address,address)" "Test 721" "T721" "personalization" 0x0000000000000000000000000000000000C0FFEE 1000 0x0000000000000000000000000000000000C0FFEE "[]" true 0x0000000000000000000000000000000000000000 0x0000000000000000000000000000000000000000 

Smart Contract Documentation

Latest Version (1.0.0)

All Versions

Version
Link

1.0.0

ERC-1167
supported chains
https://cdn.transientlabs.xyz/docs/universal-deployer/v1.0.0/
https://cdn.transientlabs.xyz/docs/universal-deployer/v1.0.0/
🔗
Page cover image