Deploy LayerZero adapters
Deploy LayerZero adapters for multichain token bridging functionality. This endpoint creates adapter contracts that enable cross-chain token transfers.
POST
/
tokenization
/
multichain
/
bridge
/
layerzero
TypeScript
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
Body
application/json
Was this page helpful?
⌘I
TypeScript
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."
}
}