UA Utils Tooling Overview
Configuration tools around setting up your UA Config and Wire Up Config
UA-Utils is a package made by us to make setting UA configurations easy.
https://github.com/LayerZero-Labs/ua-utils
Installation
npm
npm install @layerzerolabs/ua-utils
yarn
yarn add @layerzerolabs/ua-utils
This plugin also depends on some gnosis safe packages to be compatible with Safe setup.
npm
npm install --save-dev "@gnosis.pm/safe-core-sdk@^2.0.0" "@gnosis.pm/safe-core-sdk-types@^1.0.0" "@gnosis.pm/safe-ethers-lib@^1.0.0" "@gnosis.pm/safe-service-client@1.1.1"
yarn
yarn add @gnosis.pm/safe-core-sdk@^2.0.0 @gnosis.pm/safe-core-sdk-types@^1.0.0 @gnosis.pm/safe-ethers-lib@^1.0.0 @gnosis.pm/safe-service-client@1.1.1 --dev
The plugin depends on @nomiclabs/hardhat-ethers
, so you need to import both plugins in your hardhat.config.js
:
require('@nomiclabs/hardhat-ethers');
require('@layerzerolabs/ua-utils');
Or if you are using TypeScript, in your hardhat.config.ts
:
import '@nomiclabs/hardhat-ethers';
import '@layerzerolabs/ua-utils';
Requirements
This plugin uses the address[0]
from Mnemonic
provided in the .env
file. Please make sure the deployment/admin address is the address[0]
of your provided Mnemonic
phrase.
Naming Conventions
The network names in your hardhat.config
files should be named as the following formats to be compatible. View Naming conventions here.
UA Config
This config is used to Lock in UA Configuration. To use this script please fill in your Application Configuration according to your applications needs.
Wire Up Configuration
This config can be used to set the following on your UA contract:
function setFeeBp(uint16, bool, uint16)
function setDefaultFeeBp(uint16)
function setMinDstGas(uint16, uint16, uint)
function setUseCustomAdapterParams(bool)
function setTrustedRemote(uint16, bytes)
To use this script please fill in your Wire Up Configuration according to your applications needs.