Deploy LayerZero adapters
Deploy LayerZero adapters for multichain token bridging functionality. This endpoint creates adapter contracts that enable cross-chain token transfers.
const response: Promise<FireblocksResponse<DeployLayerZeroAdaptersResponse>> = fireblocks.tokenization.deployAndLinkAdapters(tokenizationApiDeployAndLinkAdaptersRequest);CompletableFuture<ApiResponse<List<AdapterProcessingResult>>> response = fireblocks.tokenization().deployAndLinkAdapters(deployLayerZeroAdaptersRequest, idempotencyKey);response = fireblocks.tokenization.deploy_and_link_adapters(deploy_layer_zero_adapters_request, idempotency_key);curl --request POST \
--url https://api.fireblocks.io/v1/tokenization/multichain/bridge/layerzero \
--header 'Content-Type: application/json' \
--data '
{
"vaultAccountId": "0",
"createParams": [
{
"tokenLinkId": "123-432-1234-1234-123456789012",
"delegateAddress": "0xABCDEF123456789abcdef1234567890abcdef12345678",
"defaultAdminAddress": "0xABC123456789abcdef1234567890abcdef12345678",
"pauserAddress": "0xDEFABC123456789abcdef1234567890abcdef12345678"
}
],
"displayName": "LayerZero Adapter",
"useGasless": false,
"feeLevel": "MEDIUM",
"fee": "2000",
"salt": "123456789"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
vaultAccountId: '0',
createParams: [
{
tokenLinkId: '123-432-1234-1234-123456789012',
delegateAddress: '0xABCDEF123456789abcdef1234567890abcdef12345678',
defaultAdminAddress: '0xABC123456789abcdef1234567890abcdef12345678',
pauserAddress: '0xDEFABC123456789abcdef1234567890abcdef12345678'
}
],
displayName: 'LayerZero Adapter',
useGasless: false,
feeLevel: 'MEDIUM',
fee: '2000',
salt: '123456789'
})
};
fetch('https://api.fireblocks.io/v1/tokenization/multichain/bridge/layerzero', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.fireblocks.io/v1/tokenization/multichain/bridge/layerzero",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'vaultAccountId' => '0',
'createParams' => [
[
'tokenLinkId' => '123-432-1234-1234-123456789012',
'delegateAddress' => '0xABCDEF123456789abcdef1234567890abcdef12345678',
'defaultAdminAddress' => '0xABC123456789abcdef1234567890abcdef12345678',
'pauserAddress' => '0xDEFABC123456789abcdef1234567890abcdef12345678'
]
],
'displayName' => 'LayerZero Adapter',
'useGasless' => false,
'feeLevel' => 'MEDIUM',
'fee' => '2000',
'salt' => '123456789'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.fireblocks.io/v1/tokenization/multichain/bridge/layerzero"
payload := strings.NewReader("{\n \"vaultAccountId\": \"0\",\n \"createParams\": [\n {\n \"tokenLinkId\": \"123-432-1234-1234-123456789012\",\n \"delegateAddress\": \"0xABCDEF123456789abcdef1234567890abcdef12345678\",\n \"defaultAdminAddress\": \"0xABC123456789abcdef1234567890abcdef12345678\",\n \"pauserAddress\": \"0xDEFABC123456789abcdef1234567890abcdef12345678\"\n }\n ],\n \"displayName\": \"LayerZero Adapter\",\n \"useGasless\": false,\n \"feeLevel\": \"MEDIUM\",\n \"fee\": \"2000\",\n \"salt\": \"123456789\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://api.fireblocks.io/v1/tokenization/multichain/bridge/layerzero")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"vaultAccountId\": \"0\",\n \"createParams\": [\n {\n \"tokenLinkId\": \"123-432-1234-1234-123456789012\",\n \"delegateAddress\": \"0xABCDEF123456789abcdef1234567890abcdef12345678\",\n \"defaultAdminAddress\": \"0xABC123456789abcdef1234567890abcdef12345678\",\n \"pauserAddress\": \"0xDEFABC123456789abcdef1234567890abcdef12345678\"\n }\n ],\n \"displayName\": \"LayerZero Adapter\",\n \"useGasless\": false,\n \"feeLevel\": \"MEDIUM\",\n \"fee\": \"2000\",\n \"salt\": \"123456789\"\n}"
response = http.request(request)
puts response.read_body[
{
"inputTokenLinkId": "<string>",
"adapterLinkId": "<string>"
}
]{
"error": {
"type": "VALIDATION",
"message": "Invalid input data or parameters"
}
}{
"error": {
"type": "NOT_FOUND",
"message": "The specified token link was not found"
}
}{
"error": {
"type": "UNPROCESSABLE_ENTITY",
"message": "An error occurred during token link preparation"
}
}{
"error": {
"type": "UNPROCESSABLE_ENTITY",
"message": "The token link is not of fungible type"
}
}{
"error": {
"type": "INTERNAL",
"message": "An unexpected error occurred during execution. Please try again later."
}
}Headers
A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours.
Body
The id of the vault account that initiated the request to deploy adapter for the token
"0"
Array of creation parameters for LayerZero adapters, one per tokenLink.
1Show child attributes
Show child attributes
The display name of the contract
"LayerZero Adapter"
Whether to use gasless deployment or not
false
Fee level for the write function transaction. interchangeable with the 'fee' field
LOW, MEDIUM, HIGH "MEDIUM"
Max fee amount for the write function transaction. interchangeable with the 'feeLevel' field
"2000"
The salt to calculate the deterministic address. Must be a number between 0 and 2^256 -1, for it to fit in the bytes32 parameter
"123456789"
Was this page helpful?
const response: Promise<FireblocksResponse<DeployLayerZeroAdaptersResponse>> = fireblocks.tokenization.deployAndLinkAdapters(tokenizationApiDeployAndLinkAdaptersRequest);CompletableFuture<ApiResponse<List<AdapterProcessingResult>>> response = fireblocks.tokenization().deployAndLinkAdapters(deployLayerZeroAdaptersRequest, idempotencyKey);response = fireblocks.tokenization.deploy_and_link_adapters(deploy_layer_zero_adapters_request, idempotency_key);curl --request POST \
--url https://api.fireblocks.io/v1/tokenization/multichain/bridge/layerzero \
--header 'Content-Type: application/json' \
--data '
{
"vaultAccountId": "0",
"createParams": [
{
"tokenLinkId": "123-432-1234-1234-123456789012",
"delegateAddress": "0xABCDEF123456789abcdef1234567890abcdef12345678",
"defaultAdminAddress": "0xABC123456789abcdef1234567890abcdef12345678",
"pauserAddress": "0xDEFABC123456789abcdef1234567890abcdef12345678"
}
],
"displayName": "LayerZero Adapter",
"useGasless": false,
"feeLevel": "MEDIUM",
"fee": "2000",
"salt": "123456789"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
vaultAccountId: '0',
createParams: [
{
tokenLinkId: '123-432-1234-1234-123456789012',
delegateAddress: '0xABCDEF123456789abcdef1234567890abcdef12345678',
defaultAdminAddress: '0xABC123456789abcdef1234567890abcdef12345678',
pauserAddress: '0xDEFABC123456789abcdef1234567890abcdef12345678'
}
],
displayName: 'LayerZero Adapter',
useGasless: false,
feeLevel: 'MEDIUM',
fee: '2000',
salt: '123456789'
})
};
fetch('https://api.fireblocks.io/v1/tokenization/multichain/bridge/layerzero', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.fireblocks.io/v1/tokenization/multichain/bridge/layerzero",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'vaultAccountId' => '0',
'createParams' => [
[
'tokenLinkId' => '123-432-1234-1234-123456789012',
'delegateAddress' => '0xABCDEF123456789abcdef1234567890abcdef12345678',
'defaultAdminAddress' => '0xABC123456789abcdef1234567890abcdef12345678',
'pauserAddress' => '0xDEFABC123456789abcdef1234567890abcdef12345678'
]
],
'displayName' => 'LayerZero Adapter',
'useGasless' => false,
'feeLevel' => 'MEDIUM',
'fee' => '2000',
'salt' => '123456789'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.fireblocks.io/v1/tokenization/multichain/bridge/layerzero"
payload := strings.NewReader("{\n \"vaultAccountId\": \"0\",\n \"createParams\": [\n {\n \"tokenLinkId\": \"123-432-1234-1234-123456789012\",\n \"delegateAddress\": \"0xABCDEF123456789abcdef1234567890abcdef12345678\",\n \"defaultAdminAddress\": \"0xABC123456789abcdef1234567890abcdef12345678\",\n \"pauserAddress\": \"0xDEFABC123456789abcdef1234567890abcdef12345678\"\n }\n ],\n \"displayName\": \"LayerZero Adapter\",\n \"useGasless\": false,\n \"feeLevel\": \"MEDIUM\",\n \"fee\": \"2000\",\n \"salt\": \"123456789\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://api.fireblocks.io/v1/tokenization/multichain/bridge/layerzero")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"vaultAccountId\": \"0\",\n \"createParams\": [\n {\n \"tokenLinkId\": \"123-432-1234-1234-123456789012\",\n \"delegateAddress\": \"0xABCDEF123456789abcdef1234567890abcdef12345678\",\n \"defaultAdminAddress\": \"0xABC123456789abcdef1234567890abcdef12345678\",\n \"pauserAddress\": \"0xDEFABC123456789abcdef1234567890abcdef12345678\"\n }\n ],\n \"displayName\": \"LayerZero Adapter\",\n \"useGasless\": false,\n \"feeLevel\": \"MEDIUM\",\n \"fee\": \"2000\",\n \"salt\": \"123456789\"\n}"
response = http.request(request)
puts response.read_body[
{
"inputTokenLinkId": "<string>",
"adapterLinkId": "<string>"
}
]{
"error": {
"type": "VALIDATION",
"message": "Invalid input data or parameters"
}
}{
"error": {
"type": "NOT_FOUND",
"message": "The specified token link was not found"
}
}{
"error": {
"type": "UNPROCESSABLE_ENTITY",
"message": "An error occurred during token link preparation"
}
}{
"error": {
"type": "UNPROCESSABLE_ENTITY",
"message": "The token link is not of fungible type"
}
}{
"error": {
"type": "INTERNAL",
"message": "An unexpected error occurred during execution. Please try again later."
}
}