Welcome to Dev3
  • ➕Create a Dev3 App
  • 🤖SDK
    • 📖Introduction
    • ⚙️Initialization
    • ➡️Importing Contracts
    • 🤝User Authentication
      • Options
    • 🔍Query Contracts
      • Function Parameters
    • ⚡Execute Contracts
      • Execution Options
    • 🛠️Deploy Contracts
      • Deployment Options
    • 📖Address Book
    • ❓FAQ
      • Out of gas error
  • INTEGRATIONS
    • 🔷Chainlink Feeds
    • 🔷Chainlink Subscriptions
      • 🎲VRF Subscriptions
      • 🧮Functions Subscriptions
      • 🤖Upkeep Subscriptions
    • 🎆OriginTrail DKG
    • 📽️OriginTrail DKG Video Tutorial
    • 📊Polyflow Analytics
  • Pricing
    • 💸Dev3 Pricing Plans
    • 💸Polyflow Pricing Plans
  • 🚀Guides
    • 👾Launching an NFT Collection
      • Step 1: Upload assets
      • Step 2: Upload metadata
      • Step 3: Deploy contracts
  • 🏫Resources
    • 👨‍💻Developer Resources
Powered by GitBook
On this page
  • arbitraryData
  • screenConfig
  • callerAddress
  • redirectUrl
  1. SDK
  2. Deploy Contracts

Deployment Options

Deployment options are explained in more detail here.

An options object can be passed to a deployment request to set some of the parameters of the deployment flow. In the example in the chapter before, we've set the empty configuration, since all the parameters are optional. Options you can configure are listed below:

{
    arbitraryData?: Map<string, object>;
    screenConfig?: ScreenConfig;
    callerAddress?: string;
    redirectUrl?: string;
}

arbitraryData

Key-value mapping of any data you want to attach to the deployment request. The data will simply be sent back in the result object upon the successful request completion. Depending on your use-case, you might want to add important info here, related to your existing application parameters.

If the value is not provided, the empty data is sent with the request and received back when the request is processed.

Example value:

const data = new Map<string, string>();
data['user-id'] = 'my internal user id';

const options = {
    // ... rest of the options
    arbitraryData: data
}

screenConfig

Configures the execution screen and sets the text labels that are going to be visible when processing the deployment request on the front-end. If someone else is going to process your deployment request by opening the generated deployment request link, then you can use this data to customize how the deployment screen will look like. You can configure the message shown before the contract is deployed, and the success message shown after the contract was actually deployed.

If the value is not provided, the default action messages will be shown when you redirect the user to our action execution screen.

const options = {
    // ... rest of the options
    screenConfig: {
        before_action_message: "This message will be shown to your user before he executes the request.",
        after_action_message: "THis message will be shown to your user after he executes the action successfully."
    }
}

You can put any text value in these parameters, links, thank you messages, or whatever else might be useful for your case.

callerAddress

The wallet address, which has to be used when deploying the contract. If the user connects with another wallet address, the request will be rejected.

If the value is not provided, the user can log in with any wallet address and continue processing the request.

Example value:

const options = {
    // ... rest of the options
    callerAddress: "0x4Ed918C7800F5dc34d2C774f6EA5fbd15f1a94a7"
}

redirectUrl

If the value is not provided, the actionUrl generated by the SDK will be automatically built to redirect the user to our wallet connection screen, and this is the recommended approach.

Example value:

const options = {
    // ... rest of the options
    redirectUrl: "https://your-frontend/deploy/${id}"
    
    // your frontend will have to be capable of loading the request with the 
    // given ID and process the transaction after which the transaction 
    // execution hash has to be submitted using the special API call.
    // If you want to use our prebuilt frontend, simply skip the redirectUrl
    // and we will generate the redirect link for you!
}
PreviousDeploy ContractsNextAddress Book

Last updated 2 years ago

If you want to take over the flow of how the user connects the wallet and deploys the contract, you can specify the redirect URL here. Our system expects your redirect URL to contain the ${id} component which is going to be interpolated to the real request ID. This ID is important because your frontend must fetch the request state and also update the status of the request by specifying this ID value. To create your own frontend you'll have to integrate our API and refer to the.

🤖
🛠️
space