Browse Source

updating package.json to use public layerzerolabs/lz-sdk and layerzerolabs/sg-sdk packages

lz.sirΔrthurmoney() 2 years ago
parent
commit
fba2a57f76

+ 3 - 4
contracts/Bridge.sol

@@ -8,13 +8,12 @@ import "@openzeppelin/contracts/access/Ownable.sol";
 
 import "./Pool.sol";
 import "./Router.sol";
-// interfaces
-import "@layerzerolabs/contracts/contracts/interfaces/ILayerZeroReceiver.sol";
-import "@layerzerolabs/contracts/contracts/interfaces/ILayerZeroEndpoint.sol";
-import "@layerzerolabs/contracts/contracts/interfaces/ILayerZeroUserApplicationConfig.sol";
 
 // libraries
 import "@openzeppelin/contracts/math/SafeMath.sol";
+import "./interfaces/ILayerZeroReceiver.sol";
+import "./interfaces/ILayerZeroEndpoint.sol";
+import "./interfaces/ILayerZeroUserApplicationConfig.sol";
 
 contract Bridge is Ownable, ILayerZeroReceiver, ILayerZeroUserApplicationConfig {
     using SafeMath for uint256;

+ 3 - 5
contracts/OmnichainFungibleToken.sol

@@ -4,11 +4,9 @@ pragma solidity 0.7.6;
 
 import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
 import "@openzeppelin/contracts/access/Ownable.sol";
-
-import "@layerzerolabs/contracts/contracts/interfaces/ILayerZeroEndpoint.sol";
-import "@layerzerolabs/contracts/contracts/interfaces/ILayerZeroReceiver.sol";
-import "@layerzerolabs/contracts/contracts/interfaces/ILayerZeroUserApplicationConfig.sol";
-
+import "./interfaces/ILayerZeroReceiver.sol";
+import "./interfaces/ILayerZeroEndpoint.sol";
+import "./interfaces/ILayerZeroUserApplicationConfig.sol";
 
 //---------------------------------------------------------------------------
 // THIS CONTRACT IS OF BUSINESS LICENSE. CONTACT US BEFORE YOU USE IT.

+ 87 - 0
contracts/interfaces/ILayerZeroEndpoint.sol

@@ -0,0 +1,87 @@
+// SPDX-License-Identifier: BUSL-1.1
+
+pragma solidity >=0.5.0;
+
+import "./ILayerZeroUserApplicationConfig.sol";
+
+interface ILayerZeroEndpoint is ILayerZeroUserApplicationConfig {
+    // @notice send a LayerZero message to the specified address at a LayerZero endpoint.
+    // @param _dstChainId - the destination chain identifier
+    // @param _destination - the address on destination chain (in bytes). address length/format may vary by chains
+    // @param _payload - a custom bytes payload to send to the destination contract
+    // @param _refundAddress - if the source transaction is cheaper than the amount of value passed, refund the additional amount to this address
+    // @param _zroPaymentAddress - the address of the ZRO token holder who would pay for the transaction
+    // @param _adapterParams - parameters for custom functionality. e.g. receive airdropped native gas from the relayer on destination
+    function send(uint16 _dstChainId, bytes calldata _destination, bytes calldata _payload, address payable _refundAddress, address _zroPaymentAddress, bytes calldata _adapterParams) external payable;
+
+    // @notice used by the messaging library to publish verified payload
+    // @param _srcChainId - the source chain identifier
+    // @param _srcAddress - the source contract (as bytes) at the source chain
+    // @param _dstAddress - the address on destination chain
+    // @param _nonce - the unbound message ordering nonce
+    // @param _gasLimit - the gas limit for external contract execution
+    // @param _payload - verified payload to send to the destination contract
+    function receivePayload(uint16 _srcChainId, bytes calldata _srcAddress, address _dstAddress, uint64 _nonce, uint _gasLimit, bytes calldata _payload) external;
+
+    // @notice get the inboundNonce of a receiver from a source chain which could be EVM or non-EVM chain
+    // @param _srcChainId - the source chain identifier
+    // @param _srcAddress - the source chain contract address
+    function getInboundNonce(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (uint64);
+
+    // @notice get the outboundNonce from this source chain which, consequently, is always an EVM
+    // @param _srcAddress - the source chain contract address
+    function getOutboundNonce(uint16 _dstChainId, address _srcAddress) external view returns (uint64);
+
+    // @notice gets a quote in source native gas, for the amount that send() requires to pay for message delivery
+    // @param _dstChainId - the destination chain identifier
+    // @param _userApplication - the user app address on this EVM chain
+    // @param _payload - the custom message to send over LayerZero
+    // @param _payInZRO - if false, user app pays the protocol fee in native token
+    // @param _adapterParam - parameters for the adapter service, e.g. send some dust native token to dstChain
+    function estimateFees(uint16 _dstChainId, address _userApplication, bytes calldata _payload, bool _payInZRO, bytes calldata _adapterParam) external view returns (uint nativeFee, uint zroFee);
+
+    // @notice get this Endpoint's immutable source identifier
+    function getChainId() external view returns (uint16);
+
+    // @notice the interface to retry failed message on this Endpoint destination
+    // @param _srcChainId - the source chain identifier
+    // @param _srcAddress - the source chain contract address
+    // @param _payload - the payload to be retried
+    function retryPayload(uint16 _srcChainId, bytes calldata _srcAddress, bytes calldata _payload) external;
+
+    // @notice query if any STORED payload (message blocking) at the endpoint.
+    // @param _srcChainId - the source chain identifier
+    // @param _srcAddress - the source chain contract address
+    function hasStoredPayload(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (bool);
+
+    // @notice query if the _libraryAddress is valid for sending msgs.
+    // @param _userApplication - the user app address on this EVM chain
+    function getSendLibraryAddress(address _userApplication) external view returns (address);
+
+    // @notice query if the _libraryAddress is valid for receiving msgs.
+    // @param _userApplication - the user app address on this EVM chain
+    function getReceiveLibraryAddress(address _userApplication) external view returns (address);
+
+    // @notice query if the non-reentrancy guard for send() is on
+    // @return true if the guard is on. false otherwise
+    function isSendingPayload() external view returns (bool);
+
+    // @notice query if the non-reentrancy guard for receive() is on
+    // @return true if the guard is on. false otherwise
+    function isReceivingPayload() external view returns (bool);
+
+    // @notice get the configuration of the LayerZero messaging library of the specified version
+    // @param _version - messaging library version
+    // @param _chainId - the chainId for the pending config change
+    // @param _userApplication - the contract address of the user application
+    // @param _configType - type of configuration. every messaging library has its own convention.
+    function getConfig(uint16 _version, uint16 _chainId, address _userApplication, uint _configType) external view returns (bytes memory);
+
+    // @notice get the send() LayerZero messaging library version
+    // @param _userApplication - the contract address of the user application
+    function getSendVersion(address _userApplication) external view returns (uint16);
+
+    // @notice get the lzReceive() LayerZero messaging library version
+    // @param _userApplication - the contract address of the user application
+    function getReceiveVersion(address _userApplication) external view returns (uint16);
+}

+ 12 - 0
contracts/interfaces/ILayerZeroReceiver.sol

@@ -0,0 +1,12 @@
+// SPDX-License-Identifier: BUSL-1.1
+
+pragma solidity >=0.5.0;
+
+interface ILayerZeroReceiver {
+    // @notice LayerZero endpoint will invoke this function to deliver the message on the destination
+    // @param _srcChainId - the source endpoint identifier
+    // @param _srcAddress - the source sending contract address from the source chain
+    // @param _nonce - the ordered message nonce
+    // @param _payload - the signed payload is the UA bytes has encoded to be sent
+    function lzReceive(uint16 _srcChainId, bytes calldata _srcAddress, uint64 _nonce, bytes calldata _payload) external;
+}

+ 25 - 0
contracts/interfaces/ILayerZeroUserApplicationConfig.sol

@@ -0,0 +1,25 @@
+// SPDX-License-Identifier: BUSL-1.1
+
+pragma solidity >=0.5.0;
+
+interface ILayerZeroUserApplicationConfig {
+    // @notice set the configuration of the LayerZero messaging library of the specified version
+    // @param _version - messaging library version
+    // @param _chainId - the chainId for the pending config change
+    // @param _configType - type of configuration. every messaging library has its own convention.
+    // @param _config - configuration in the bytes. can encode arbitrary content.
+    function setConfig(uint16 _version, uint16 _chainId, uint _configType, bytes calldata _config) external;
+
+    // @notice set the send() LayerZero messaging library version to _version
+    // @param _version - new messaging library version
+    function setSendVersion(uint16 _version) external;
+
+    // @notice set the lzReceive() LayerZero messaging library version to _version
+    // @param _version - new messaging library version
+    function setReceiveVersion(uint16 _version) external;
+
+    // @notice Only when the UA needs to resume the message flow in blocking mode and clear the stored payload
+    // @param _srcChainId - the chainId of the source chain
+    // @param _srcAddress - the contract address of the source contract at the source chain
+    function forceResumeReceive(uint16 _srcChainId, bytes calldata _srcAddress) external;
+}

+ 3 - 4
contracts/mocks/LZEndpointMock.sol

@@ -1,11 +1,10 @@
 // SPDX-License-Identifier: BUSL-1.1
 
 pragma solidity 0.7.6;
-pragma abicoder v2;
 
-import "@layerzerolabs/contracts/contracts/interfaces/ILayerZeroReceiver.sol";
-import "@layerzerolabs/contracts/contracts/interfaces/ILayerZeroEndpoint.sol";
-import "@layerzerolabs/contracts/contracts/interfaces/ILayerZeroUserApplicationConfig.sol";
+import "../interfaces/ILayerZeroEndpoint.sol";
+import "../interfaces/ILayerZeroReceiver.sol";
+pragma abicoder v2;
 
 /*
 mocking multi endpoint connection.

+ 1 - 1
deploy/StargateToken.js

@@ -1,7 +1,7 @@
 const { getLayerZeroAddress } = require("../utils/layerzero")
 const CONFIG = require("../constants/config.json")
 const { isTestnet, isLocalhost } = require("../utils/network")
-const { getEndpointIdByName } = require("@layerzerolabs/core-sdk")
+const { getEndpointIdByName } = require("@layerzerolabs/lz-sdk")
 
 function getDependencies() {
     if (hre.network.name === "hardhat") {

+ 67 - 85
hardhat.config.js

@@ -13,20 +13,9 @@ require("hardhat-deploy");
 require("hardhat-deploy-ethers");
 require("hardhat-spdx-license-identifier");
 
-const { ChainId, setupNetwork } = require('@layerzerolabs/core-sdk')
-
 // const infuraProjectId = process.env.INFURA_PROJECT_ID;
 // console.log(`infuraProjectId: ${infuraProjectId}`);
 
-// This is a sample Hardhat task. To learn how to create your own go to
-// https://hardhat.org/guides/create-task.html
-task("accounts", "Prints the list of accounts", async (taskArgs, hre) => {
-    const accounts = await hre.ethers.getSigners();
-
-    for (const account of accounts) {
-        console.log(account.address);
-    }
-});
 
 // custom helper tasks
 require("./tasks/addLiquidity");
@@ -54,7 +43,28 @@ require("./tasks/getFeeVersion")
 require("./tasks")
 
 // You need to export an object to set up your config
-// Go to https://hardhat.org/config/ to learn more
+// Go to https://hardhat.org/config/ to learn more4
+
+
+function getMnemonic(networkName) {
+    if (networkName) {
+        const mnemonic = process.env['MNEMONIC_' + networkName.toUpperCase()]
+        if (mnemonic && mnemonic !== '') {
+            return mnemonic
+        }
+    }
+
+    const mnemonic = process.env.MNEMONIC
+    if (!mnemonic || mnemonic === '') {
+        return 'test test test test test test test test test test test junk'
+    }
+
+    return mnemonic
+}
+
+function accounts(chainKey) {
+    return { mnemonic: getMnemonic(chainKey) }
+}
 
 /**
  * @type import('hardhat/config').HardhatUserConfig
@@ -84,81 +94,53 @@ module.exports = {
     defaultNetwork: "hardhat",
 
     networks: {
-        hardhat: {
-            initialBaseFeePerGas: 0, // workaround from https://github.com/sc-forks/solidity-coverage/issues/652#issuecomment-896330136 . Remove when that issue is closed.
+        ethereum: {
+            url: "https://mainnet.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161", // public infura endpoint
+            chainId: 1,
+            accounts: accounts(),
+        },
+
+        avalanche: {
+            url: "https://api.avax.network/ext/bc/C/rpc",
+            chainId: 43114,
+            accounts: accounts(),
         },
 
-        //////////////////////// mainnets
-        ...setupNetwork({
-            // eth mainnet
-            eth: {
-                url: `https://eth-mainnet.alchemyapi.io/v2/${process.env.ALCHEMY_MAINNET_ETH_API_KEY}`,
-            } }, [ChainId.ETHEREUM]),
-        ...setupNetwork({
-            // bsc mainnet
-            bsc: {
-                url: `https://speedy-nodes-nyc.moralis.io/${process.env.MORALIS_MAINNET_BSC_API_KEY}`,
-            } }, [ChainId.BSC]),
-        ...setupNetwork({
-            // avax mainnet
-            avax: {
-                url: `https://speedy-nodes-nyc.moralis.io/${process.env.MORALIS_MAINNET_AVAX_API_KEY}`,
-            } }, [ChainId.AVALANCHE]),
-        ...setupNetwork({
-            // polygon mainnet
-            polygon: {
-                url: `https://polygon-mainnet.g.alchemy.com/v2/${process.env.ALCHEMY_MAINNET_POLYGON_API_KEY}`,
-            } }, [ChainId.POLYGON]),
-        ...setupNetwork({
-            // arbitrum mainnet
-            arbitrum: {
-                url: `https://arb-mainnet.g.alchemy.com/v2/${process.env.ALCHEMY_MAINNET_ARBITRUM_API_KEY}`,
-            } }, [ChainId.ARBITRUM]),
-        ...setupNetwork({
-            // optimism mainnet
-            optimism: {
-                url: `https://opt-mainnet.g.alchemy.com/v2/${process.env.ALCHEMY_MAINNET_OPTIMISM_API_KEY}`,
-            } }, [ChainId.OPTIMISM]),
-        ...setupNetwork({
-            // ftm mainnet
-            ftm: {
-                url: `https://speedy-nodes-nyc.moralis.io/${process.env.MORALIS_MAINNET_FTM_API_KEY}`,
-            } }, [ChainId.FANTOM]),
-        ...setupNetwork({
-            rinkeby: {
-                url: `https://rinkeby.infura.io/v3/${process.env.INFURA_API_KEY}`
-            }
-        }, [ChainId.RINKEBY, ChainId.RINKEBY_SANDBOX]),
-        ...setupNetwork({
-            "bsc-testnet": {
-                url: `${process.env.BSC_TESTNET_RPC}` // "https://data-seed-prebsc-2-s3.binance.org:8545"
-            }
-        }, [ChainId.BSC_TESTNET, ChainId.BSC_TESTNET_SANDBOX]),
-        ...setupNetwork({
-            fuji: {
-                url: `${process.env.FUJI_RPC}`
-            }
-        }, [ChainId.FUJI, ChainId.FUJI_SANDBOX]),
-        ...setupNetwork({
-            mumbai: {
-                url: `https://polygon-mumbai.g.alchemy.com/v2/${process.env.ALCHEMY_MUMBAI_API_KEY}` // "https://rpc-mumbai.maticvigil.com/",
-            }
-        }, [ChainId.MUMBAI, ChainId.MUMBAI_SANDBOX]),
-        ...setupNetwork({
-            arbrink: {
-                url: `https://arb-rinkeby.g.alchemy.com/v2/${process.env.ALCHEMY_ARBRINK_API_KEY}`
-            }
-        }, [ChainId.ARBITRUM_RINKEBY, ChainId.ARBITRUM_RINKEBY_SANDBOX]),
-        ...setupNetwork({
-            optkov: {
-                url: `https://opt-kovan.g.alchemy.com/v2/${process.env.ALCHEMY_OPTKOV_API_KEY}` // `https://optimism-kovan.infura.io/v3/${process.env.INFURA_API_KEY}`,
-            }
-        }, [ChainId.OPTIMISM_KOVAN, ChainId.OPTIMISM_KOVAN_SANDBOX]),
-        ...setupNetwork({
-            "ftm-testnet": {
-                url: `${process.env.FTM_TESTNET_RPC}`
-            }
-        }, [ChainId.FANTOM_TESTNET, ChainId.FANTOM_TESTNET_SANDBOX]),
+        rinkeby: {
+            url: "https://rinkeby.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161", // public infura endpoint
+            chainId: 4,
+            accounts: accounts(),
+        },
+        'bsc-testnet': {
+            url: 'https://data-seed-prebsc-1-s1.binance.org:8545/',
+            chainId: 97,
+            accounts: accounts(),
+        },
+        fuji: {
+            url: `https://api.avax-test.network/ext/bc/C/rpc`,
+            chainId: 43113,
+            accounts: accounts(),
+        },
+        mumbai: {
+            url: "https://rpc-mumbai.maticvigil.com/",
+            chainId: 80001,
+            accounts: accounts(),
+        },
+        'arbitrum-rinkeby': {
+            url: `https://rinkeby.arbitrum.io/rpc`,
+            chainId: 421611,
+            accounts: accounts(),
+        },
+        'optimism-kovan': {
+            url: `https://kovan.optimism.io/`,
+            chainId: 69,
+            accounts: accounts(),
+        },
+        'fantom-testnet': {
+            url: `https://rpc.testnet.fantom.network/`,
+            chainId: 4002,
+            accounts: accounts(),
+        }
     },
     mocha: {
         timeout: 500000,

+ 2 - 3
package.json

@@ -69,9 +69,8 @@
     "solidity-coverage": "^0.7.17"
   },
   "dependencies": {
-    "@layerzerolabs/core-sdk": "1.0.34-beta.74",
-    "@layerzerolabs/stargate-sdk": "1.0.22-beta.77",
-    "@layerzerolabs/contracts": "1.0.50",
+    "@layerzerolabs/lz-sdk": "^0.0.2",
+    "@layerzerolabs/sg-sdk": "^0.0.7",
     "@primitivefi/hardhat-dodoc": "^0.1.3",
     "abi-decoder": "^2.4.0",
     "ethereumjs-util": "^7.1.4",

+ 2 - 2
tasks/activateChainPaths.js

@@ -1,6 +1,6 @@
-const { POOLS } = require("@layerzerolabs/stargate-sdk")
+const { POOLS } = require("@layerzerolabs/sg-sdk")
 const { getEndpointId } = require("../utils/network")
-const { getEndpointIdByName } = require("@layerzerolabs/core-sdk")
+const { getEndpointIdByName } = require("@layerzerolabs/lz-sdk")
 
 task("activateChainPaths", "activate chain paths")
     .addParam("targetNetwork", "activate chain paths for this destination targetNetwork")

+ 2 - 2
tasks/createChainPaths.js

@@ -1,6 +1,6 @@
-const { POOLS } = require("@layerzerolabs/stargate-sdk")
+const { POOLS } = require("@layerzerolabs/sg-sdk")
 const { getEndpointId } = require("../utils/network")
-const { getEndpointIdByName } = require("@layerzerolabs/core-sdk")
+const { getEndpointIdByName } = require("@layerzerolabs/lz-sdk")
 
 task("createChainPaths", "given a Stargate router, create chainPaths for a token")
     .addParam("targetNetwork", "the stargate router address")

+ 1 - 1
tasks/createPools.js

@@ -1,4 +1,4 @@
-const { POOLS } = require("@layerzerolabs/stargate-sdk")
+const { POOLS } = require("@layerzerolabs/sg-sdk")
 const { getEndpointId } = require("../utils/network")
 
 task("createPools", "create the pools for the network").setAction(async (taskArgs) => {

+ 2 - 2
tasks/getChainPath.js

@@ -1,5 +1,5 @@
-const { ChainId } = require("@layerzerolabs/core-sdk")
-const { PoolId } = require("@layerzerolabs/stargate-sdk")
+const { ChainId } = require("@layerzerolabs/lz-sdk")
+const { PoolId } = require("@layerzerolabs/sg-sdk")
 
 task("getChainPath", "get chain path from the chainpaths map")
     .addParam("poolId", "the poolId")

+ 2 - 2
tasks/getFeeVersion.js

@@ -1,5 +1,5 @@
-const { ChainId } = require("@layerzerolabs/core-sdk")
-const { PoolId } = require("@layerzerolabs/stargate-sdk")
+const { ChainId } = require("@layerzerolabs/lz-sdk")
+const { PoolId } = require("@layerzerolabs/sg-sdk")
 
 task("getFeeVersion", "Get fee library version").setAction(async (taskArgs) => {
     let accounts = await ethers.getSigners()

+ 1 - 1
tasks/makeChainPathsActive.js

@@ -1,4 +1,4 @@
-const { getEndpointIdByName } = require("@layerzerolabs/core-sdk")
+const { getEndpointIdByName } = require("@layerzerolabs/lz-sdk")
 
 task("makeChainPathsActive", "activate the chainPaths for a pool")
     .addParam("poolId", "the pool id to create chain paths for")

+ 1 - 1
tasks/redeemLocal.js

@@ -1,4 +1,4 @@
-const { getEndpointIdByName } = require("@layerzerolabs/core-sdk")
+const { getEndpointIdByName } = require("@layerzerolabs/lz-sdk")
 
 module.exports = async function (taskArgs, hre) {
     let accounts = await ethers.getSigners()

+ 1 - 1
tasks/sendCredits.js

@@ -1,4 +1,4 @@
-const { CHAIN_ID } = require("@layerzerolabs/core-sdk")
+const { CHAIN_ID } = require("@layerzerolabs/lz-sdk")
 
 task("sendCredits", "sendCredits function from stargate to destination chainId")
     .addParam("poolId", "the poolId")

+ 2 - 2
tasks/sendCreditsAll.js

@@ -1,5 +1,5 @@
-const { CHAIN_ID } = require("@layerzerolabs/core-sdk")
-const { POOLS } = require("@layerzerolabs/stargate-sdk")
+const { CHAIN_ID } = require("@layerzerolabs/lz-sdk")
+const { POOLS } = require("@layerzerolabs/sg-sdk")
 
 task("sendCreditsAll", "sendCredits to each outgoing configured chainPath").setAction(async (taskArgs) => {
     const signers = await ethers.getSigners()

+ 1 - 1
tasks/sendStargateTokens.js

@@ -1,4 +1,4 @@
-const { CHAIN_ID } = require("@layerzerolabs/core-sdk")
+const { CHAIN_ID } = require("@layerzerolabs/lz-sdk")
 
 task("sendStargateTokens", "send StargateTokens cross chain")
     .addParam("targetNetwork", "the destination StargateToken chain id")

+ 1 - 1
tasks/testnetSwap.js

@@ -1,4 +1,4 @@
-const { CHAIN_ID } = require("@layerzerolabs/core-sdk")
+const { CHAIN_ID } = require("@layerzerolabs/lz-sdk")
 
 task("testnetSwap", "swap using stargate")
     .addParam("poolId", "the poolId")

+ 1 - 1
tasks/wireBridges.js

@@ -1,7 +1,7 @@
 const CONFIG = require("../constants/config.json")
 const { getDeploymentAddresses } = require("../utils/readDeployments")
 const { getEndpointId } = require("../utils/network")
-const { getEndpointIdByName } = require("@layerzerolabs/core-sdk")
+const { getEndpointIdByName } = require("@layerzerolabs/lz-sdk")
 
 task("wireBridges", "connect the local stargate to a remote stargate by configuring the remote bridge")
     .addParam("targetNetworks", "the remote Stargate instance named by network")

+ 1 - 1
tasks/wireStargateTokens.js

@@ -1,6 +1,6 @@
 const { getDeploymentAddresses } = require("../utils/readDeployments")
 const { getEndpointId } = require("../utils/network")
-const { getEndpointIdByName } = require("@layerzerolabs/core-sdk")
+const { getEndpointIdByName } = require("@layerzerolabs/lz-sdk")
 
 task("wireStargateTokens", "connect the local stargate to a remote stargate by configuring the remote bridge")
     .addParam("targetNetworks", "the remote Stargate instance named by network")

+ 1 - 1
test/Oft.test.js

@@ -224,7 +224,7 @@ describe("Oft:", function () {
 
     it("estimateSendTokensFee()", async function () {
         // 42 is the arbitrary dummy return value in our mocks
-        expect((await oft[0].estimateSendTokensFee(1, false, "0x"))[0]).to.equal(42)
+        expect((await oft[0].estimateSendTokensFee(1, "0x", false, "0x"))[0]).to.equal(42)
     })
 
     it("setSendVersion()", async function () {

+ 1 - 1
utils/getAddresses.js

@@ -1,4 +1,4 @@
-const {getNetworksForEnv} = require("@layerzerolabs/core-sdk");
+const {getNetworksForEnv} = require("@layerzerolabs/lz-sdk");
 const fs = require('fs');
 
 const environmentArg = process.argv[2]

+ 1 - 1
utils/layerzero.js

@@ -1,4 +1,4 @@
-const { LZ_ADDRESS } = require("@layerzerolabs/core-sdk")
+const { LZ_ADDRESS } = require("@layerzerolabs/lz-sdk")
 
 function getLayerZeroAddress(networkName) {
     if(!Object.keys(LZ_ADDRESS).includes(networkName)){

+ 1 - 1
utils/network.js

@@ -1,4 +1,4 @@
-const { CHAIN_STAGE, CHAIN_ID, ChainStage } = require("@layerzerolabs/core-sdk")
+const { CHAIN_STAGE, CHAIN_ID, ChainStage } = require("@layerzerolabs/lz-sdk")
 
 function getEndpointId() {
     if (isLocalhost()) {

File diff suppressed because it is too large
+ 129 - 154
yarn.lock


Some files were not shown because too many files changed in this diff