diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..e69de29 diff --git a/evm/.gitignore b/evm/.gitignore new file mode 100644 index 0000000..e7ed0ed --- /dev/null +++ b/evm/.gitignore @@ -0,0 +1,6 @@ +cache +lib +node_modules +out +venus-protocol +wormhole diff --git a/evm/Makefile b/evm/Makefile new file mode 100644 index 0000000..ea90b4d --- /dev/null +++ b/evm/Makefile @@ -0,0 +1,25 @@ +.PHONY: dependencies wormhole_dependencies venus_dependencies + +all: build + +.PHONY: dependencies +dependencies: forge_dependencies venus_dependencies wormhole_dependencies + +.PHONY: forge_dependencies +forge_dependencies: lib/forge-std + +lib/forge-std: + forge install foundry-rs/forge-std --no-git + +.PHONY: venus_dependencies +venus_dependencies: venus-protocol + +venus-protocol: + git clone --depth 1 --branch develop --single-branch https://github.com/VenusProtocol/venus-protocol + +.PHONY: wormhole_dependencies +wormhole_dependencies: wormhole/ethereum/build + +wormhole/ethereum/build: + git clone --depth 1 --branch dev.v2 --single-branch https://github.com/certusone/wormhole.git +# cd wormhole/ethereum && npm ci && npm run build && make .env diff --git a/evm/foundry.toml b/evm/foundry.toml new file mode 100644 index 0000000..414080b --- /dev/null +++ b/evm/foundry.toml @@ -0,0 +1,11 @@ +[profile.default] +src = 'src' +out = 'out' +libs = ['lib'] + +# See more config options https://github.com/foundry-rs/foundry/tree/master/config + + +remappings = [ + "@openzeppelin/=node_modules/@openzeppelin/", +] \ No newline at end of file diff --git a/evm/package.json b/evm/package.json new file mode 100644 index 0000000..2225bf3 --- /dev/null +++ b/evm/package.json @@ -0,0 +1,28 @@ +{ + "name": "wormhole-lending-example-1-evm", + "version": "0.0.1", + "description": "EVM Contracts for Wormhole Lending Example 1", + "main": "index.js", + "directories": { + "lib": "lib", + "test": "test" + }, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "ISC", + "devDependencies": { + "chai": "^4.3.6", + "ethers": "^5.7.1" + }, + "dependencies": { + "@openzeppelin/contracts": "^4.7.3", + "@types/chai": "^4.3.3", + "@types/mocha": "^9.1.1", + "elliptic": "^6.5.4", + "mocha": "^10.0.0", + "ts-mocha": "^10.0.0", + "typescript": "^4.8.3" + } +} diff --git a/evm/src/CrossChainBorrowLend.sol b/evm/src/CrossChainBorrowLend.sol new file mode 100644 index 0000000..78fa143 --- /dev/null +++ b/evm/src/CrossChainBorrowLend.sol @@ -0,0 +1,635 @@ +// SPDX-License-Identifier: UNLICENSED +pragma solidity ^0.8.0; + +import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; +import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; + +import "./interfaces/IWormhole.sol"; +import "./libraries/external/BytesLib.sol"; + +import "./CrossChainBorrowLendStructs.sol"; +import "./CrossChainBorrowLendGetters.sol"; +import "./CrossChainBorrowLendMessages.sol"; + +contract CrossChainBorrowLend is + CrossChainBorrowLendGetters, + CrossChainBorrowLendMessages, + ReentrancyGuard +{ + constructor( + address wormholeContractAddress_, + uint8 consistencyLevel_, + address mockPythAddress_, + uint16 targetChainId_, + bytes32 targetContractAddress_, + address collateralAsset_, + bytes32 collateralAssetPythId_, + uint256 collateralizationRatio_, + address borrowingAsset_, + bytes32 borrowingAssetPythId_, + uint256 repayGracePeriod_ + ) { + // REVIEW: set owner for only owner methods if desired + + // wormhole + state.wormholeContractAddress = wormholeContractAddress_; + state.consistencyLevel = consistencyLevel_; + + // target chain info + state.targetChainId = targetChainId_; + state.targetContractAddress = targetContractAddress_; + + // collateral params + state.collateralAssetAddress = collateralAsset_; + state.collateralizationRatio = collateralizationRatio_; + state.collateralizationRatioPrecision = 1e18; // fixed + + // borrowing asset address + state.borrowingAssetAddress = borrowingAsset_; + + // interest rate parameters + state.interestRateModel.ratePrecision = 1e18; + state.interestRateModel.rateIntercept = 2e16; // 2% + state.interestRateModel.rateCoefficientA = 0; + + // Price index of 1 with the current precision is 1e18 + // since this is the precision of our value. + state.interestAccrualIndexPrecision = 1e18; + state.interestAccrualIndex = state.interestAccrualIndexPrecision; + + // pyth oracle address and asset IDs + state.mockPythAddress = mockPythAddress_; + state.collateralAssetPythId = collateralAssetPythId_; + state.borrowingAssetPythId = borrowingAssetPythId_; + + // repay grace period for this chain + state.repayGracePeriod = repayGracePeriod_; + } + + function addCollateral(uint256 amount) public nonReentrant { + require(amount > 0, "nothing to deposit"); + + // update current price index + updateInterestAccrualIndex(); + + // update state for supplier + uint256 normalizedAmount = normalizeAmount( + amount, + collateralInterestAccrualIndex() + ); + state.accountAssets[_msgSender()].sourceDeposited += normalizedAmount; + state.totalAssets.deposited += normalizedAmount; + + SafeERC20.safeTransferFrom( + collateralToken(), + _msgSender(), + address(this), + amount + ); + } + + function removeCollateral(uint256 amount) public nonReentrant { + require(amount > 0, "nothing to withdraw"); + + // update current price index + updateInterestAccrualIndex(); + + // Check if user has enough to withdraw from the contract + require( + amount < maxAllowedToWithdraw(_msgSender()), + "amount >= maxAllowedToWithdraw(msg.sender)" + ); + + // update state for supplier + uint256 normalizedAmount = normalizeAmount( + amount, + collateralInterestAccrualIndex() + ); + state.accountAssets[_msgSender()].sourceDeposited -= normalizedAmount; + state.totalAssets.deposited -= normalizedAmount; + + // transfer the tokens to the caller + SafeERC20.safeTransfer(collateralToken(), _msgSender(), amount); + } + + function removeCollateralInFull() public nonReentrant { + // fetch the account information for the caller + NormalizedAmounts memory normalizedAmounts = state.accountAssets[ + _msgSender() + ]; + + // make sure the account has closed all borrowed positions + require( + normalizedAmounts.targetBorrowed == 0, + "account has outstanding loans" + ); + + // update current price index + updateInterestAccrualIndex(); + + // update state for supplier + uint256 normalizedAmount = normalizedAmounts.sourceDeposited; + state.accountAssets[_msgSender()].sourceDeposited = 0; + state.totalAssets.deposited -= normalizedAmount; + + // transfer the tokens to the caller + SafeERC20.safeTransfer( + collateralToken(), + _msgSender(), + denormalizeAmount( + normalizedAmount, + collateralInterestAccrualIndex() + ) + ); + } + + function computeInterestProportion( + uint256 secondsElapsed, + uint256 intercept, + uint256 coefficient + ) internal view returns (uint256) { + uint256 deposited = state.totalAssets.deposited; + if (deposited == 0) { + return 0; + } + return + (secondsElapsed * + (intercept + + (coefficient * state.totalAssets.borrowed) / + deposited)) / + 365 / + 24 / + 60 / + 60; + } + + function updateInterestAccrualIndex() internal { + // TODO: change to block.number? + uint256 secondsElapsed = block.timestamp - + state.lastActivityBlockTimestamp; + + if (secondsElapsed == 0) { + // nothing to do + return; + } + + // Should not hit, but just here in case someone + // tries to update the interest when there is nothing + // deposited. + uint256 deposited = state.totalAssets.deposited; + if (deposited == 0) { + return; + } + + state.lastActivityBlockTimestamp = block.timestamp; + + state.interestAccrualIndex += computeInterestProportion( + secondsElapsed, + state.interestRateModel.rateIntercept, + state.interestRateModel.rateCoefficientA + ); + } + + function initiateBorrow(uint256 amount) public returns (uint64 sequence) { + require(amount > 0, "nothing to borrow"); + + // update current price index + updateInterestAccrualIndex(); + + // Check if user has enough to borrow + require( + amount < maxAllowedToBorrow(_msgSender()), + "amount >= maxAllowedToBorrow(msg.sender)" + ); + + // update state for borrower + uint256 borrowedIndex = borrowedInterestAccrualIndex(); + uint256 normalizedAmount = normalizeAmount(amount, borrowedIndex); + state.accountAssets[_msgSender()].targetBorrowed += normalizedAmount; + state.totalAssets.borrowed += normalizedAmount; + + // construct wormhole message + MessageHeader memory header = MessageHeader({ + payloadID: uint8(1), + borrower: _msgSender(), + collateralAddress: state.collateralAssetAddress, + borrowAddress: state.borrowingAssetAddress + }); + + sequence = sendWormholeMessage( + encodeBorrowMessage( + BorrowMessage({ + header: header, + borrowAmount: amount, + totalNormalizedBorrowAmount: state + .accountAssets[_msgSender()] + .targetBorrowed, + interestAccrualIndex: borrowedIndex + }) + ) + ); + } + + function completeBorrow(bytes calldata encodedVm) + public + returns (uint64 sequence) + { + // parse and verify the wormhole BorrowMessage + ( + IWormhole.VM memory parsed, + bool valid, + string memory reason + ) = wormhole().parseAndVerifyVM(encodedVm); + require(valid, reason); + + // verify emitter + require(verifyEmitter(parsed), "invalid emitter"); + + // completed (replay protection) + // also serves as reentrancy protection + require(!messageHashConsumed(parsed.hash), "message already consumed"); + consumeMessageHash(parsed.hash); + + // decode borrow message + BorrowMessage memory params = decodeBorrowMessage(parsed.payload); + + // correct assets? + require(verifyAssetMetaFromBorrow(params), "invalid asset metadata"); + + // make sure this contract has enough assets to fund the borrow + if ( + params.borrowAmount > + denormalizeAmount( + normalizedLiquidity(), + borrowedInterestAccrualIndex() + ) + ) { + // construct RevertBorrow wormhole message + // switch the borrow and collateral addresses for the target chain + MessageHeader memory header = MessageHeader({ + payloadID: uint8(2), + borrower: params.header.borrower, + collateralAddress: state.borrowingAssetAddress, + borrowAddress: state.collateralAssetAddress + }); + + sequence = sendWormholeMessage( + encodeRevertBorrowMessage( + RevertBorrowMessage({ + header: header, + borrowAmount: params.borrowAmount, + sourceInterestAccrualIndex: params.interestAccrualIndex + }) + ) + ); + } else { + // save the total normalized borrow amount for repayments + state.totalAssets.borrowed += + params.totalNormalizedBorrowAmount - + state.accountAssets[params.header.borrower].sourceBorrowed; + state.accountAssets[params.header.borrower].sourceBorrowed = params + .totalNormalizedBorrowAmount; + + // params.borrowAmount == 0 means that there was a repayment + // made outside of the grace period, so we will have received + // another VAA representing the updated borrowed amount + // on the source chain. + if (params.borrowAmount > 0) { + // finally transfer + SafeERC20.safeTransferFrom( + collateralToken(), + address(this), + params.header.borrower, + params.borrowAmount + ); + } + + // no wormhole message, return the default value: zero == success + } + } + + function completeRevertBorrow(bytes calldata encodedVm) public { + // parse and verify the wormhole RevertBorrowMessage + ( + IWormhole.VM memory parsed, + bool valid, + string memory reason + ) = wormhole().parseAndVerifyVM(encodedVm); + require(valid, reason); + + // verify emitter + require(verifyEmitter(parsed), "invalid emitter"); + + // completed (replay protection) + // also serves as reentrancy protection + require(!messageHashConsumed(parsed.hash), "message already consumed"); + consumeMessageHash(parsed.hash); + + // decode borrow message + RevertBorrowMessage memory params = decodeRevertBorrowMessage( + parsed.payload + ); + + // verify asset meta + require( + state.collateralAssetAddress == params.header.collateralAddress && + state.borrowingAssetAddress == params.header.borrowAddress, + "invalid asset metadata" + ); + + // update state for borrower + // Normalize the borrowAmount by the original interestAccrualIndex (encoded in the BorrowMessage) + // to revert the inteded borrow amount. + uint256 normalizedAmount = normalizeAmount( + params.borrowAmount, + params.sourceInterestAccrualIndex + ); + state + .accountAssets[params.header.borrower] + .targetBorrowed -= normalizedAmount; + state.totalAssets.borrowed -= normalizedAmount; + } + + function initiateRepay(uint256 amount) + public + nonReentrant + returns (uint64 sequence) + { + require(amount > 0, "nothing to repay"); + + // For EVMs, same private key will be used for borrowing-lending activity. + // When introducing other chains (e.g. Cosmos), need to do wallet registration + // so we can access a map of a non-EVM address based on this EVM borrower + NormalizedAmounts memory normalizedAmounts = state.accountAssets[ + _msgSender() + ]; + + // update the index + updateInterestAccrualIndex(); + + // cache the index to save gas + uint256 index = borrowedInterestAccrualIndex(); + + // save the normalized amount + uint256 normalizedAmount = normalizeAmount(amount, index); + + // confirm that the caller has loans to pay back + require( + normalizedAmount <= normalizedAmounts.sourceBorrowed, + "loan payment too large" + ); + + // update state on this contract + state.accountAssets[_msgSender()].sourceBorrowed -= normalizedAmount; + state.totalAssets.borrowed -= normalizedAmount; + + // transfer to this contract + SafeERC20.safeTransferFrom( + borrowToken(), + _msgSender(), + address(this), + amount + ); + + // construct wormhole message + MessageHeader memory header = MessageHeader({ + payloadID: uint8(3), + borrower: _msgSender(), + collateralAddress: state.borrowingAssetAddress, + borrowAddress: state.collateralAssetAddress + }); + + // add index and block timestamp + sequence = sendWormholeMessage( + encodeRepayMessage( + RepayMessage({ + header: header, + repayAmount: amount, + targetInterestAccrualIndex: index, + repayTimestamp: block.timestamp, + paidInFull: 0 + }) + ) + ); + } + + function initiateRepayInFull() + public + nonReentrant + returns (uint64 sequence) + { + // For EVMs, same private key will be used for borrowing-lending activity. + // When introducing other chains (e.g. Cosmos), need to do wallet registration + // so we can access a map of a non-EVM address based on this EVM borrower + NormalizedAmounts memory normalizedAmounts = state.accountAssets[ + _msgSender() + ]; + + // update the index + updateInterestAccrualIndex(); + + // cache the index to save gas + uint256 index = borrowedInterestAccrualIndex(); + + // update state on the contract + uint256 normalizedAmount = normalizedAmounts.sourceBorrowed; + state.accountAssets[_msgSender()].sourceBorrowed = 0; + state.totalAssets.borrowed -= normalizedAmount; + + // transfer to this contract + SafeERC20.safeTransferFrom( + borrowToken(), + _msgSender(), + address(this), + denormalizeAmount(normalizedAmount, index) + ); + + // construct wormhole message + MessageHeader memory header = MessageHeader({ + payloadID: uint8(3), + borrower: _msgSender(), + collateralAddress: state.borrowingAssetAddress, + borrowAddress: state.collateralAssetAddress + }); + + // add index and block timestamp + sequence = sendWormholeMessage( + encodeRepayMessage( + RepayMessage({ + header: header, + repayAmount: denormalizeAmount(normalizedAmount, index), + targetInterestAccrualIndex: index, + repayTimestamp: block.timestamp, + paidInFull: 1 + }) + ) + ); + } + + function completeRepay(bytes calldata encodedVm) + public + returns (uint64 sequence) + { + // parse and verify the RepayMessage + ( + IWormhole.VM memory parsed, + bool valid, + string memory reason + ) = wormhole().parseAndVerifyVM(encodedVm); + require(valid, reason); + + // verify emitter + require(verifyEmitter(parsed), "invalid emitter"); + + // completed (replay protection) + require(!messageHashConsumed(parsed.hash), "message already consumed"); + consumeMessageHash(parsed.hash); + + // update the index + updateInterestAccrualIndex(); + + // cache the index to save gas + uint256 index = borrowedInterestAccrualIndex(); + + // decode the RepayMessage + RepayMessage memory params = decodeRepayMessage(parsed.payload); + + // correct assets? + require(verifyAssetMetaFromRepay(params), "invalid asset metadata"); + + // see if the loan is repaid in full + if (params.paidInFull == 1) { + // REVIEW: do we care about getting the VAA in time? + if ( + params.repayTimestamp + state.repayGracePeriod <= + block.timestamp + ) { + // update state in this contract + uint256 normalizedAmount = normalizeAmount( + params.repayAmount, + params.targetInterestAccrualIndex + ); + state.accountAssets[params.header.borrower].targetBorrowed = 0; + state.totalAssets.borrowed -= normalizedAmount; + } else { + uint256 normalizedAmount = normalizeAmount( + params.repayAmount, + index + ); + state + .accountAssets[params.header.borrower] + .targetBorrowed -= normalizedAmount; + state.totalAssets.borrowed -= normalizedAmount; + + // Send a wormhole message again since he did not repay in full + // (due to repaying outside of the grace period) + sequence = sendWormholeMessage( + encodeBorrowMessage( + BorrowMessage({ + header: MessageHeader({ + payloadID: uint8(1), + borrower: params.header.borrower, + collateralAddress: state.collateralAssetAddress, + borrowAddress: state.borrowingAssetAddress + }), + borrowAmount: 0, // special value to indicate failed repay in full + totalNormalizedBorrowAmount: state + .accountAssets[params.header.borrower] + .targetBorrowed, + interestAccrualIndex: index + }) + ) + ); + } + } else { + // update state in this contract + uint256 normalizedAmount = normalizeAmount( + params.repayAmount, + params.targetInterestAccrualIndex + ); + state + .accountAssets[params.header.borrower] + .targetBorrowed -= normalizedAmount; + state.totalAssets.borrowed -= normalizedAmount; + } + } + + /** + @notice `initiateLiquidationOnTargetChain` has not been implemented yet. + + This function should determine if a particular position is undercollateralized + by querying the `accountAssets` state variable for the passed account. Calculate + the health of the account. + + If an account is undercollateralized, this method should generate a Wormhole + message sent to the target chain by the caller. The caller will invoke the + `completeRepayOnBehalf` method on the target chain and pass the signed Wormhole + message as an argument. + + If the account has not yet paid the loan back by the time the Wormhole message + arrives on the target chain, `completeRepayOnBehalf` will accept funds from the + caller, and generate another Wormhole messsage to be delivered to the source chain. + + The caller will then invoke `completeLiquidation` on the source chain and pass + the signed Wormhole message in as an argument. This function should handle + releasing the account's collateral to the liquidator, less fees (which should be + defined in the contract and updated by the contract owner). + + In order for off-chain processes to calculate an account's health, the integrator + needs to expose a getter that will return the list of accounts with open positions. + The integrator needs to expose a getter that allows the liquidator to query the + `accountAssets` state variable for a particular account. + */ + function initiateLiquidationOnTargetChain(address accountToLiquidate) + public + {} + + function completeRepayOnBehalf(bytes calldata encodedVm) public {} + + function completeLiquidation(bytes calldata encodedVm) public {} + + function sendWormholeMessage(bytes memory payload) + internal + returns (uint64 sequence) + { + sequence = IWormhole(state.wormholeContractAddress).publishMessage( + 0, // nonce + payload, + state.consistencyLevel + ); + } + + function verifyEmitter(IWormhole.VM memory parsed) + internal + view + returns (bool) + { + return + parsed.emitterAddress == state.targetContractAddress && + parsed.emitterChainId == state.targetChainId; + } + + function verifyAssetMetaFromBorrow(BorrowMessage memory params) + internal + view + returns (bool) + { + return + params.header.collateralAddress == state.borrowingAssetAddress && + params.header.borrowAddress == state.collateralAssetAddress; + } + + function verifyAssetMetaFromRepay(RepayMessage memory params) + internal + view + returns (bool) + { + return + params.header.collateralAddress == state.collateralAssetAddress && + params.header.borrowAddress == state.borrowingAssetAddress; + } + + function consumeMessageHash(bytes32 vmHash) internal { + state.consumedMessages[vmHash] = true; + } +} diff --git a/evm/src/CrossChainBorrowLendGetters.sol b/evm/src/CrossChainBorrowLendGetters.sol new file mode 100644 index 0000000..24c89ae --- /dev/null +++ b/evm/src/CrossChainBorrowLendGetters.sol @@ -0,0 +1,197 @@ +// SPDX-License-Identifier: UNLICENSED + +pragma solidity ^0.8.0; + +import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; +import {IERC20Metadata} from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol"; +import {Context} from "@openzeppelin/contracts/utils/Context.sol"; + +import "./interfaces/IMockPyth.sol"; +import "./interfaces/IWormhole.sol"; +import "./CrossChainBorrowLendState.sol"; + +contract CrossChainBorrowLendGetters is Context, CrossChainBorrowLendState { + function wormhole() internal view returns (IWormhole) { + return IWormhole(state.wormholeContractAddress); + } + + function collateralToken() internal view returns (IERC20) { + return IERC20(state.collateralAssetAddress); + } + + function collateralTokenDecimals() internal view returns (uint8) { + return IERC20Metadata(state.collateralAssetAddress).decimals(); + } + + function borrowToken() internal view returns (IERC20) { + return IERC20(state.borrowingAssetAddress); + } + + function borrowTokenDecimals() internal view returns (uint8) { + return IERC20Metadata(state.borrowingAssetAddress).decimals(); + } + + function getOraclePrices() internal view returns (uint64, uint64) { + IMockPyth.PriceFeed memory collateralFeed = mockPyth().queryPriceFeed( + state.collateralAssetPythId + ); + IMockPyth.PriceFeed memory borrowFeed = mockPyth().queryPriceFeed( + state.borrowingAssetPythId + ); + + // sanity check the price feeds + require( + collateralFeed.price.price > 0 && borrowFeed.price.price > 0, + "negative prices detected" + ); + + // Users of Pyth prices should read: https://docs.pyth.network/consumers/best-practices + // before using the price feed. Blindly using the price alone is not recommended. + return ( + uint64(collateralFeed.price.price), + uint64(borrowFeed.price.price) + ); + } + + function collateralInterestAccrualIndex() public view returns (uint256) { + uint256 deposited = state.totalAssets.deposited; + uint256 precision = state.interestAccrualIndexPrecision; + if (deposited == 0) { + return precision; + } + return + precision + + (state.totalAssets.borrowed * + (state.interestAccrualIndex - precision)) / + deposited; + } + + function borrowedInterestAccrualIndex() public view returns (uint256) { + return state.interestAccrualIndex; + } + + function mockPyth() internal view returns (IMockPyth) { + return IMockPyth(state.mockPythAddress); + } + + function normalizedLiquidity() internal view returns (uint256) { + return state.totalAssets.deposited - state.totalAssets.borrowed; + } + + function denormalizeAmount( + uint256 normalizedAmount, + uint256 interestAccrualIndex_ + ) public view returns (uint256) { + return + (normalizedAmount * interestAccrualIndex_) / + state.interestAccrualIndexPrecision; + } + + function normalizeAmount( + uint256 denormalizedAmount, + uint256 interestAccrualIndex_ + ) public view returns (uint256) { + return + (denormalizedAmount * state.interestAccrualIndexPrecision) / + interestAccrualIndex_; + } + + function messageHashConsumed(bytes32 hash) public view returns (bool) { + return state.consumedMessages[hash]; + } + + function normalizedAmounts() + public + view + returns (NormalizedTotalAmounts memory) + { + return state.totalAssets; + } + + function maxAllowedToBorrowWithPrices( + address account, + uint64 collateralPrice, + uint64 borrowAssetPrice + ) internal view returns (uint256) { + // For EVMs, same private key will be used for borrowing-lending activity. + // When introducing other chains (e.g. Cosmos), need to do wallet registration + // so we can access a map of a non-EVM address based on this EVM borrower + NormalizedAmounts memory normalized = state.accountAssets[account]; + + // denormalize + uint256 denormalizedDeposited = denormalizeAmount( + normalized.sourceDeposited, + collateralInterestAccrualIndex() + ); + uint256 denormalizedBorrowed = denormalizeAmount( + normalized.targetBorrowed, + borrowedInterestAccrualIndex() + ); + + return + (denormalizedDeposited * + state.collateralizationRatio * + collateralPrice * + 10**borrowTokenDecimals()) / + (state.collateralizationRatioPrecision * + borrowAssetPrice * + 10**collateralTokenDecimals()) - + denormalizedBorrowed; + } + + function maxAllowedToBorrow(address account) public view returns (uint256) { + // fetch asset prices + (uint64 collateralPrice, uint64 borrowAssetPrice) = getOraclePrices(); + return + maxAllowedToBorrowWithPrices( + account, + collateralPrice, + borrowAssetPrice + ); + } + + function maxAllowedToWithdrawWithPrices( + address account, + uint64 collateralPrice, + uint64 borrowAssetPrice + ) internal view returns (uint256) { + // For EVMs, same private key will be used for borrowing-lending activity. + // When introducing other chains (e.g. Cosmos), need to do wallet registration + // so we can access a map of a non-EVM address based on this EVM borrower + NormalizedAmounts memory normalized = state.accountAssets[account]; + + // denormalize + uint256 denormalizedDeposited = denormalizeAmount( + normalized.sourceDeposited, + collateralInterestAccrualIndex() + ); + uint256 denormalizedBorrowed = denormalizeAmount( + normalized.targetBorrowed, + borrowedInterestAccrualIndex() + ); + + return + denormalizedDeposited - + (denormalizedBorrowed * + state.collateralizationRatioPrecision * + borrowAssetPrice * + 10**collateralTokenDecimals()) / + (state.collateralizationRatio * + collateralPrice * + 10**borrowTokenDecimals()); + } + + function maxAllowedToWithdraw(address account) + public + view + returns (uint256) + { + (uint64 collateralPrice, uint64 borrowAssetPrice) = getOraclePrices(); + return + maxAllowedToWithdrawWithPrices( + account, + collateralPrice, + borrowAssetPrice + ); + } +} diff --git a/evm/src/CrossChainBorrowLendMessages.sol b/evm/src/CrossChainBorrowLendMessages.sol new file mode 100644 index 0000000..bcd5c61 --- /dev/null +++ b/evm/src/CrossChainBorrowLendMessages.sol @@ -0,0 +1,168 @@ +// SPDX-License-Identifier: UNLICENSED + +pragma solidity ^0.8.0; + +import "./libraries/external/BytesLib.sol"; + +import "./CrossChainBorrowLendStructs.sol"; + +contract CrossChainBorrowLendMessages { + using BytesLib for bytes; + + function encodeMessageHeader(MessageHeader memory header) + internal + pure + returns (bytes memory) + { + return + abi.encodePacked( + header.borrower, + header.collateralAddress, + header.borrowAddress + ); + } + + function encodeBorrowMessage(BorrowMessage memory message) + internal + pure + returns (bytes memory) + { + return + abi.encodePacked( + uint8(1), // payloadID + encodeMessageHeader(message.header), + message.borrowAmount, + message.totalNormalizedBorrowAmount, + message.interestAccrualIndex + ); + } + + function encodeRevertBorrowMessage(RevertBorrowMessage memory message) + internal + pure + returns (bytes memory) + { + return + abi.encodePacked( + uint8(2), // payloadID + encodeMessageHeader(message.header), + message.borrowAmount, + message.sourceInterestAccrualIndex + ); + } + + function encodeRepayMessage(RepayMessage memory message) + internal + pure + returns (bytes memory) + { + return + abi.encodePacked( + uint8(3), // payloadID + encodeMessageHeader(message.header), + message.repayAmount, + message.targetInterestAccrualIndex, + message.repayTimestamp, + message.paidInFull + ); + } + + function encodeLiquidationIntentMessage( + LiquidationIntentMessage memory message + ) internal pure returns (bytes memory) { + return + abi.encodePacked( + uint8(4), // payloadID + encodeMessageHeader(message.header) + ); + } + + function decodeMessageHeader(bytes memory serialized) + internal + pure + returns (MessageHeader memory header) + { + uint256 index = 0; + + // parse the header + header.payloadID = serialized.toUint8(index += 1); + header.borrower = serialized.toAddress(index += 20); + header.collateralAddress = serialized.toAddress(index += 20); + header.borrowAddress = serialized.toAddress(index += 20); + } + + function decodeBorrowMessage(bytes memory serialized) + internal + pure + returns (BorrowMessage memory params) + { + uint256 index = 0; + + // parse the message header + params.header = decodeMessageHeader( + serialized.slice(index, index += 61) + ); + params.borrowAmount = serialized.toUint256(index += 32); + params.totalNormalizedBorrowAmount = serialized.toUint256(index += 32); + params.interestAccrualIndex = serialized.toUint256(index += 32); + + require(params.header.payloadID == 1, "invalid message"); + require(index == serialized.length, "index != serialized.length"); + } + + function decodeRevertBorrowMessage(bytes memory serialized) + internal + pure + returns (RevertBorrowMessage memory params) + { + uint256 index = 0; + + // parse the message header + params.header = decodeMessageHeader( + serialized.slice(index, index += 61) + ); + params.borrowAmount = serialized.toUint256(index += 32); + params.sourceInterestAccrualIndex = serialized.toUint256(index += 32); + + require(params.header.payloadID == 2, "invalid message"); + require(index == serialized.length, "index != serialized.length"); + } + + function decodeRepayMessage(bytes memory serialized) + internal + pure + returns (RepayMessage memory params) + { + uint256 index = 0; + + // parse the message header + params.header = decodeMessageHeader( + serialized.slice(index, index += 61) + ); + params.repayAmount = serialized.toUint256(index += 32); + params.targetInterestAccrualIndex = serialized.toUint256(index += 32); + params.repayTimestamp = serialized.toUint256(index += 32); + params.paidInFull = serialized.toUint8(index += 1); + + require(params.header.payloadID == 3, "invalid message"); + require(index == serialized.length, "index != serialized.length"); + } + + function decodeLiquidationIntentMessage(bytes memory serialized) + internal + pure + returns (LiquidationIntentMessage memory params) + { + uint256 index = 0; + + // parse the message header + params.header = decodeMessageHeader( + serialized.slice(index, index += 61) + ); + + // TODO: deserialize the LiquidationIntentMessage when implemented + + require(params.header.payloadID == 4, "invalid message"); + require(index == serialized.length, "index != serialized.length"); + } +} diff --git a/evm/src/CrossChainBorrowLendState.sol b/evm/src/CrossChainBorrowLendState.sol new file mode 100644 index 0000000..e749a6e --- /dev/null +++ b/evm/src/CrossChainBorrowLendState.sol @@ -0,0 +1,37 @@ +// SPDX-License-Identifier: UNLICENSED +pragma solidity ^0.8.13; + +import {NormalizedAmounts, NormalizedTotalAmounts, InterestRateModel} from "./CrossChainBorrowLendStructs.sol"; + +contract CrossChainBorrowLendStorage { + struct State { + // wormhole things + address wormholeContractAddress; + uint8 consistencyLevel; + uint16 targetChainId; + // precision variables + uint256 collateralizationRatioPrecision; + uint256 interestRatePrecision; + // mock pyth price oracle + address mockPythAddress; + bytes32 targetContractAddress; + // borrow and lend activity + address collateralAssetAddress; + bytes32 collateralAssetPythId; + uint256 collateralizationRatio; + address borrowingAssetAddress; + uint256 interestAccrualIndex; + uint256 interestAccrualIndexPrecision; + uint256 lastActivityBlockTimestamp; + NormalizedTotalAmounts totalAssets; + uint256 repayGracePeriod; + mapping(address => NormalizedAmounts) accountAssets; + bytes32 borrowingAssetPythId; + mapping(bytes32 => bool) consumedMessages; + InterestRateModel interestRateModel; + } +} + +contract CrossChainBorrowLendState { + CrossChainBorrowLendStorage.State state; +} diff --git a/evm/src/CrossChainBorrowLendStructs.sol b/evm/src/CrossChainBorrowLendStructs.sol new file mode 100644 index 0000000..494004b --- /dev/null +++ b/evm/src/CrossChainBorrowLendStructs.sol @@ -0,0 +1,66 @@ +// SPDX-License-Identifier: UNLICENSED +pragma solidity ^0.8.0; + +struct DepositedBorrowedUints { + uint256 deposited; + uint256 borrowed; +} + +struct NormalizedTotalAmounts { + uint256 deposited; + uint256 borrowed; +} + +struct NormalizedAmounts { + uint256 sourceDeposited; + uint256 sourceBorrowed; + uint256 targetDeposited; + uint256 targetBorrowed; +} + +struct MessageHeader { + uint8 payloadID; + // address of the borrower + address borrower; + // collateral info + address collateralAddress; // for verification + // borrow info + address borrowAddress; // for verification +} + +struct BorrowMessage { + // payloadID = 1 + MessageHeader header; + uint256 borrowAmount; + uint256 totalNormalizedBorrowAmount; + uint256 interestAccrualIndex; +} + +struct RevertBorrowMessage { + // payloadID = 2 + MessageHeader header; + uint256 borrowAmount; + uint256 sourceInterestAccrualIndex; +} + +struct RepayMessage { + // payloadID = 3 + MessageHeader header; + uint256 repayAmount; + uint256 targetInterestAccrualIndex; + uint256 repayTimestamp; + uint8 paidInFull; +} + +struct LiquidationIntentMessage { + // payloadID = 4 + MessageHeader header; + // TODO: add necessary variables +} + +struct InterestRateModel { + uint64 ratePrecision; + uint64 rateIntercept; + uint64 rateCoefficientA; + // TODO: add more complexity for example? +} diff --git a/evm/src/interfaces/IMockPyth.sol b/evm/src/interfaces/IMockPyth.sol new file mode 100644 index 0000000..e0e5da7 --- /dev/null +++ b/evm/src/interfaces/IMockPyth.sol @@ -0,0 +1,27 @@ +// SPDX-License-Identifier: Apache 2 + +pragma solidity ^0.8.0; + +interface IMockPyth { + struct Price { + int64 price; + uint64 conf; + int32 expo; + uint publishTime; + } + + struct PriceFeed { + bytes32 id; + Price price; + Price emaPrice; + } + + struct PriceInfo { + uint256 attestationTime; + uint256 arrivalTime; + uint256 arrivalBlock; + PriceFeed priceFeed; + } + + function queryPriceFeed(bytes32 id) external view returns (PriceFeed memory priceFeed); +} \ No newline at end of file diff --git a/evm/src/interfaces/IWormhole.sol b/evm/src/interfaces/IWormhole.sol new file mode 100644 index 0000000..63899ac --- /dev/null +++ b/evm/src/interfaces/IWormhole.sol @@ -0,0 +1,54 @@ +// contracts/Messages.sol +// SPDX-License-Identifier: Apache 2 + +pragma solidity ^0.8.0; + +interface IWormhole { + struct Signature { + bytes32 r; + bytes32 s; + uint8 v; + uint8 guardianIndex; + } + + struct VM { + uint8 version; + uint32 timestamp; + uint32 nonce; + uint16 emitterChainId; + bytes32 emitterAddress; + uint64 sequence; + uint8 consistencyLevel; + bytes payload; + uint32 guardianSetIndex; + Signature[] signatures; + bytes32 hash; + } + + event LogMessagePublished( + address indexed sender, + uint64 sequence, + uint32 nonce, + bytes payload, + uint8 consistencyLevel + ); + + function publishMessage( + uint32 nonce, + bytes memory payload, + uint8 consistencyLevel + ) external payable returns (uint64 sequence); + + function parseAndVerifyVM(bytes calldata encodedVM) + external + view + returns ( + VM memory vm, + bool valid, + string memory reason + ); + + function chainId() external view returns (uint16); + + function messageFee() external view returns (uint256); +} diff --git a/evm/src/libraries/external/BytesLib.sol b/evm/src/libraries/external/BytesLib.sol new file mode 100644 index 0000000..532897a --- /dev/null +++ b/evm/src/libraries/external/BytesLib.sol @@ -0,0 +1,510 @@ +// SPDX-License-Identifier: Unlicense +/* + * @title Solidity Bytes Arrays Utils + * @author Gonçalo Sá + * + * @dev Bytes tightly packed arrays utility library for ethereum contracts written in Solidity. + * The library lets you concatenate, slice and type cast bytes arrays both in memory and storage. + */ +pragma solidity >=0.8.0 <0.9.0; + + +library BytesLib { + function concat( + bytes memory _preBytes, + bytes memory _postBytes + ) + internal + pure + returns (bytes memory) + { + bytes memory tempBytes; + + assembly { + // Get a location of some free memory and store it in tempBytes as + // Solidity does for memory variables. + tempBytes := mload(0x40) + + // Store the length of the first bytes array at the beginning of + // the memory for tempBytes. + let length := mload(_preBytes) + mstore(tempBytes, length) + + // Maintain a memory counter for the current write location in the + // temp bytes array by adding the 32 bytes for the array length to + // the starting location. + let mc := add(tempBytes, 0x20) + // Stop copying when the memory counter reaches the length of the + // first bytes array. + let end := add(mc, length) + + for { + // Initialize a copy counter to the start of the _preBytes data, + // 32 bytes into its memory. + let cc := add(_preBytes, 0x20) + } lt(mc, end) { + // Increase both counters by 32 bytes each iteration. + mc := add(mc, 0x20) + cc := add(cc, 0x20) + } { + // Write the _preBytes data into the tempBytes memory 32 bytes + // at a time. + mstore(mc, mload(cc)) + } + + // Add the length of _postBytes to the current length of tempBytes + // and store it as the new length in the first 32 bytes of the + // tempBytes memory. + length := mload(_postBytes) + mstore(tempBytes, add(length, mload(tempBytes))) + + // Move the memory counter back from a multiple of 0x20 to the + // actual end of the _preBytes data. + mc := end + // Stop copying when the memory counter reaches the new combined + // length of the arrays. + end := add(mc, length) + + for { + let cc := add(_postBytes, 0x20) + } lt(mc, end) { + mc := add(mc, 0x20) + cc := add(cc, 0x20) + } { + mstore(mc, mload(cc)) + } + + // Update the free-memory pointer by padding our last write location + // to 32 bytes: add 31 bytes to the end of tempBytes to move to the + // next 32 byte block, then round down to the nearest multiple of + // 32. If the sum of the length of the two arrays is zero then add + // one before rounding down to leave a blank 32 bytes (the length block with 0). + mstore(0x40, and( + add(add(end, iszero(add(length, mload(_preBytes)))), 31), + not(31) // Round down to the nearest 32 bytes. + )) + } + + return tempBytes; + } + + function concatStorage(bytes storage _preBytes, bytes memory _postBytes) internal { + assembly { + // Read the first 32 bytes of _preBytes storage, which is the length + // of the array. (We don't need to use the offset into the slot + // because arrays use the entire slot.) + let fslot := sload(_preBytes.slot) + // Arrays of 31 bytes or less have an even value in their slot, + // while longer arrays have an odd value. The actual length is + // the slot divided by two for odd values, and the lowest order + // byte divided by two for even values. + // If the slot is even, bitwise and the slot with 255 and divide by + // two to get the length. If the slot is odd, bitwise and the slot + // with -1 and divide by two. + let slength := div(and(fslot, sub(mul(0x100, iszero(and(fslot, 1))), 1)), 2) + let mlength := mload(_postBytes) + let newlength := add(slength, mlength) + // slength can contain both the length and contents of the array + // if length < 32 bytes so let's prepare for that + // v. http://solidity.readthedocs.io/en/latest/miscellaneous.html#layout-of-state-variables-in-storage + switch add(lt(slength, 32), lt(newlength, 32)) + case 2 { + // Since the new array still fits in the slot, we just need to + // update the contents of the slot. + // uint256(bytes_storage) = uint256(bytes_storage) + uint256(bytes_memory) + new_length + sstore( + _preBytes.slot, + // all the modifications to the slot are inside this + // next block + add( + // we can just add to the slot contents because the + // bytes we want to change are the LSBs + fslot, + add( + mul( + div( + // load the bytes from memory + mload(add(_postBytes, 0x20)), + // zero all bytes to the right + exp(0x100, sub(32, mlength)) + ), + // and now shift left the number of bytes to + // leave space for the length in the slot + exp(0x100, sub(32, newlength)) + ), + // increase length by the double of the memory + // bytes length + mul(mlength, 2) + ) + ) + ) + } + case 1 { + // The stored value fits in the slot, but the combined value + // will exceed it. + // get the keccak hash to get the contents of the array + mstore(0x0, _preBytes.slot) + let sc := add(keccak256(0x0, 0x20), div(slength, 32)) + + // save new length + sstore(_preBytes.slot, add(mul(newlength, 2), 1)) + + // The contents of the _postBytes array start 32 bytes into + // the structure. Our first read should obtain the `submod` + // bytes that can fit into the unused space in the last word + // of the stored array. To get this, we read 32 bytes starting + // from `submod`, so the data we read overlaps with the array + // contents by `submod` bytes. Masking the lowest-order + // `submod` bytes allows us to add that value directly to the + // stored value. + + let submod := sub(32, slength) + let mc := add(_postBytes, submod) + let end := add(_postBytes, mlength) + let mask := sub(exp(0x100, submod), 1) + + sstore( + sc, + add( + and( + fslot, + 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00 + ), + and(mload(mc), mask) + ) + ) + + for { + mc := add(mc, 0x20) + sc := add(sc, 1) + } lt(mc, end) { + sc := add(sc, 1) + mc := add(mc, 0x20) + } { + sstore(sc, mload(mc)) + } + + mask := exp(0x100, sub(mc, end)) + + sstore(sc, mul(div(mload(mc), mask), mask)) + } + default { + // get the keccak hash to get the contents of the array + mstore(0x0, _preBytes.slot) + // Start copying to the last used word of the stored array. + let sc := add(keccak256(0x0, 0x20), div(slength, 32)) + + // save new length + sstore(_preBytes.slot, add(mul(newlength, 2), 1)) + + // Copy over the first `submod` bytes of the new data as in + // case 1 above. + let slengthmod := mod(slength, 32) + let mlengthmod := mod(mlength, 32) + let submod := sub(32, slengthmod) + let mc := add(_postBytes, submod) + let end := add(_postBytes, mlength) + let mask := sub(exp(0x100, submod), 1) + + sstore(sc, add(sload(sc), and(mload(mc), mask))) + + for { + sc := add(sc, 1) + mc := add(mc, 0x20) + } lt(mc, end) { + sc := add(sc, 1) + mc := add(mc, 0x20) + } { + sstore(sc, mload(mc)) + } + + mask := exp(0x100, sub(mc, end)) + + sstore(sc, mul(div(mload(mc), mask), mask)) + } + } + } + + function slice( + bytes memory _bytes, + uint256 _start, + uint256 _length + ) + internal + pure + returns (bytes memory) + { + require(_length + 31 >= _length, "slice_overflow"); + require(_bytes.length >= _start + _length, "slice_outOfBounds"); + + bytes memory tempBytes; + + assembly { + switch iszero(_length) + case 0 { + // Get a location of some free memory and store it in tempBytes as + // Solidity does for memory variables. + tempBytes := mload(0x40) + + // The first word of the slice result is potentially a partial + // word read from the original array. To read it, we calculate + // the length of that partial word and start copying that many + // bytes into the array. The first word we copy will start with + // data we don't care about, but the last `lengthmod` bytes will + // land at the beginning of the contents of the new array. When + // we're done copying, we overwrite the full first word with + // the actual length of the slice. + let lengthmod := and(_length, 31) + + // The multiplication in the next line is necessary + // because when slicing multiples of 32 bytes (lengthmod == 0) + // the following copy loop was copying the origin's length + // and then ending prematurely not copying everything it should. + let mc := add(add(tempBytes, lengthmod), mul(0x20, iszero(lengthmod))) + let end := add(mc, _length) + + for { + // The multiplication in the next line has the same exact purpose + // as the one above. + let cc := add(add(add(_bytes, lengthmod), mul(0x20, iszero(lengthmod))), _start) + } lt(mc, end) { + mc := add(mc, 0x20) + cc := add(cc, 0x20) + } { + mstore(mc, mload(cc)) + } + + mstore(tempBytes, _length) + + //update free-memory pointer + //allocating the array padded to 32 bytes like the compiler does now + mstore(0x40, and(add(mc, 31), not(31))) + } + //if we want a zero-length slice let's just return a zero-length array + default { + tempBytes := mload(0x40) + //zero out the 32 bytes slice we are about to return + //we need to do it because Solidity does not garbage collect + mstore(tempBytes, 0) + + mstore(0x40, add(tempBytes, 0x20)) + } + } + + return tempBytes; + } + + function toAddress(bytes memory _bytes, uint256 _start) internal pure returns (address) { + require(_bytes.length >= _start + 20, "toAddress_outOfBounds"); + address tempAddress; + + assembly { + tempAddress := div(mload(add(add(_bytes, 0x20), _start)), 0x1000000000000000000000000) + } + + return tempAddress; + } + + function toUint8(bytes memory _bytes, uint256 _start) internal pure returns (uint8) { + require(_bytes.length >= _start + 1 , "toUint8_outOfBounds"); + uint8 tempUint; + + assembly { + tempUint := mload(add(add(_bytes, 0x1), _start)) + } + + return tempUint; + } + + function toUint16(bytes memory _bytes, uint256 _start) internal pure returns (uint16) { + require(_bytes.length >= _start + 2, "toUint16_outOfBounds"); + uint16 tempUint; + + assembly { + tempUint := mload(add(add(_bytes, 0x2), _start)) + } + + return tempUint; + } + + function toUint32(bytes memory _bytes, uint256 _start) internal pure returns (uint32) { + require(_bytes.length >= _start + 4, "toUint32_outOfBounds"); + uint32 tempUint; + + assembly { + tempUint := mload(add(add(_bytes, 0x4), _start)) + } + + return tempUint; + } + + function toUint64(bytes memory _bytes, uint256 _start) internal pure returns (uint64) { + require(_bytes.length >= _start + 8, "toUint64_outOfBounds"); + uint64 tempUint; + + assembly { + tempUint := mload(add(add(_bytes, 0x8), _start)) + } + + return tempUint; + } + + function toUint96(bytes memory _bytes, uint256 _start) internal pure returns (uint96) { + require(_bytes.length >= _start + 12, "toUint96_outOfBounds"); + uint96 tempUint; + + assembly { + tempUint := mload(add(add(_bytes, 0xc), _start)) + } + + return tempUint; + } + + function toUint128(bytes memory _bytes, uint256 _start) internal pure returns (uint128) { + require(_bytes.length >= _start + 16, "toUint128_outOfBounds"); + uint128 tempUint; + + assembly { + tempUint := mload(add(add(_bytes, 0x10), _start)) + } + + return tempUint; + } + + function toUint256(bytes memory _bytes, uint256 _start) internal pure returns (uint256) { + require(_bytes.length >= _start + 32, "toUint256_outOfBounds"); + uint256 tempUint; + + assembly { + tempUint := mload(add(add(_bytes, 0x20), _start)) + } + + return tempUint; + } + + function toBytes32(bytes memory _bytes, uint256 _start) internal pure returns (bytes32) { + require(_bytes.length >= _start + 32, "toBytes32_outOfBounds"); + bytes32 tempBytes32; + + assembly { + tempBytes32 := mload(add(add(_bytes, 0x20), _start)) + } + + return tempBytes32; + } + + function equal(bytes memory _preBytes, bytes memory _postBytes) internal pure returns (bool) { + bool success = true; + + assembly { + let length := mload(_preBytes) + + // if lengths don't match the arrays are not equal + switch eq(length, mload(_postBytes)) + case 1 { + // cb is a circuit breaker in the for loop since there's + // no said feature for inline assembly loops + // cb = 1 - don't breaker + // cb = 0 - break + let cb := 1 + + let mc := add(_preBytes, 0x20) + let end := add(mc, length) + + for { + let cc := add(_postBytes, 0x20) + // the next line is the loop condition: + // while(uint256(mc < end) + cb == 2) + } eq(add(lt(mc, end), cb), 2) { + mc := add(mc, 0x20) + cc := add(cc, 0x20) + } { + // if any of these checks fails then arrays are not equal + if iszero(eq(mload(mc), mload(cc))) { + // unsuccess: + success := 0 + cb := 0 + } + } + } + default { + // unsuccess: + success := 0 + } + } + + return success; + } + + function equalStorage( + bytes storage _preBytes, + bytes memory _postBytes + ) + internal + view + returns (bool) + { + bool success = true; + + assembly { + // we know _preBytes_offset is 0 + let fslot := sload(_preBytes.slot) + // Decode the length of the stored array like in concatStorage(). + let slength := div(and(fslot, sub(mul(0x100, iszero(and(fslot, 1))), 1)), 2) + let mlength := mload(_postBytes) + + // if lengths don't match the arrays are not equal + switch eq(slength, mlength) + case 1 { + // slength can contain both the length and contents of the array + // if length < 32 bytes so let's prepare for that + // v. http://solidity.readthedocs.io/en/latest/miscellaneous.html#layout-of-state-variables-in-storage + if iszero(iszero(slength)) { + switch lt(slength, 32) + case 1 { + // blank the last byte which is the length + fslot := mul(div(fslot, 0x100), 0x100) + + if iszero(eq(fslot, mload(add(_postBytes, 0x20)))) { + // unsuccess: + success := 0 + } + } + default { + // cb is a circuit breaker in the for loop since there's + // no said feature for inline assembly loops + // cb = 1 - don't breaker + // cb = 0 - break + let cb := 1 + + // get the keccak hash to get the contents of the array + mstore(0x0, _preBytes.slot) + let sc := keccak256(0x0, 0x20) + + let mc := add(_postBytes, 0x20) + let end := add(mc, mlength) + + // the next line is the loop condition: + // while(uint256(mc < end) + cb == 2) + for {} eq(add(lt(mc, end), cb), 2) { + sc := add(sc, 1) + mc := add(mc, 0x20) + } { + if iszero(eq(sload(sc), mload(mc))) { + // unsuccess: + success := 0 + cb := 0 + } + } + } + } + } + default { + // unsuccess: + success := 0 + } + } + + return success; + } +} diff --git a/evm/src/pyth/MockPyth.sol b/evm/src/pyth/MockPyth.sol new file mode 100644 index 0000000..67ab96d --- /dev/null +++ b/evm/src/pyth/MockPyth.sol @@ -0,0 +1,59 @@ +pragma solidity ^0.8.0; + +contract MockPyth { + // Mapping of cached price information + // priceId => PriceInfo + mapping(bytes32 => PriceInfo) latestPriceInfo; + + // A price with a degree of uncertainty, represented as a price +- a confidence interval. + // + // The confidence interval roughly corresponds to the standard error of a normal distribution. + // Both the price and confidence are stored in a fixed-point numeric representation, + // `x * (10^expo)`, where `expo` is the exponent. + // + // Please refer to the documentation at https://docs.pyth.network/consumers/best-practices for how + // to how this price safely. + struct Price { + // Price + int64 price; + // Confidence interval around the price + uint64 conf; + // Price exponent + int32 expo; + // Unix timestamp describing when the price was published + uint publishTime; + } + + // PriceFeed represents a current aggregate price from pyth publisher feeds. + struct PriceFeed { + // The price ID. + bytes32 id; + // Latest available price + Price price; + // Latest available exponentially-weighted moving average price + Price emaPrice; + } + + struct PriceInfo { + uint256 attestationTime; + uint256 arrivalTime; + uint256 arrivalBlock; + PriceFeed priceFeed; + } + + function setLatestPriceInfo(bytes32 priceId, PriceInfo memory info) internal { + latestPriceInfo[priceId] = info; + } + + function getLatestPriceInfo(bytes32 priceId) internal view returns (PriceInfo memory info){ + return latestPriceInfo[priceId]; + } + + function queryPriceFeed(bytes32 id) public view returns (PriceFeed memory priceFeed){ + // Look up the latest price info for the given ID + PriceInfo memory info = getLatestPriceInfo(id); + require(info.priceFeed.id != 0, "no price feed found for the given price id"); + + return info.priceFeed; + } +} \ No newline at end of file diff --git a/evm/test/CrossChainBorrowLend.t.sol b/evm/test/CrossChainBorrowLend.t.sol new file mode 100644 index 0000000..d2db05d --- /dev/null +++ b/evm/test/CrossChainBorrowLend.t.sol @@ -0,0 +1,243 @@ +// SPDX-License-Identifier: Apache 2 + +pragma solidity ^0.8.0; + +import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol"; +import {NormalizedAmounts, NormalizedTotalAmounts} from "../src/CrossChainBorrowLendStructs.sol"; +import {ExposedCrossChainBorrowLend} from "./helpers/ExposedCrossChainBorrowLend.sol"; +import {MyERC20} from "./helpers/MyERC20.sol"; +import "forge-std/Test.sol"; + +import "forge-std/console.sol"; + +contract CrossChainBorrowLendTest is Test { + MyERC20 collateralToken; + MyERC20 borrowedAssetToken; + ExposedCrossChainBorrowLend borrowLendContract; + + bytes32 collateralAssetPythId; + bytes32 borrowingAssetPythId; + uint256 collateralizationRatio; + + function setUp() public { + address wormholeAddress = msg.sender; + address mockPythAddress = msg.sender; + bytes32 targetContractAddress = 0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef; + + collateralToken = new MyERC20("WBNB", "WBNB", 18); + borrowedAssetToken = new MyERC20("USDC", "USDC", 6); + + // 80% + collateralizationRatio = 0.8e18; + + // TODO + borrowLendContract = new ExposedCrossChainBorrowLend( + wormholeAddress, + 1, // consistencyLevel + mockPythAddress, + 2, // targetChainId (ethereum) + targetContractAddress, + address(collateralToken), // collateralAsset + collateralAssetPythId, + collateralizationRatio, + address(borrowedAssetToken), + borrowingAssetPythId, + 5 * 60 // gracePeriod (5 minutes) + ); + } + + function testComputeInterestProportion() public { + // start from zero + vm.warp(0); + uint256 timeStart = block.timestamp; + + // warp to 1 year in the future + vm.warp(365 * 24 * 60 * 60); + uint256 secondsElapsed = block.timestamp - timeStart; + + // accrue interest with intercept and coefficient + uint256 intercept = 0.02e18; // 2% starting rate + uint256 coefficient = 0.001e18; // increase 10 basis points per 1% borrowed + + // fake supply some amount + uint256 deposited = 100e6; // 100 USDC (6 decimals) + borrowLendContract.HACKED_setTotalAssetsDeposited(deposited); + + // fake borrow some amount + uint256 borrowed = 50e6; // 50 USDC (6 decimals) + borrowLendContract.HACKED_setTotalAssetsBorrowed(borrowed); + + // we expect the interest accrued equal to the intercept + uint256 interestProportion = borrowLendContract + .EXPOSED_computeInterestProportion( + secondsElapsed, + intercept, + coefficient + ); + + // expect using the correct value (0.0205e18) + { + require( + interestProportion == 0.0205e18, + "interestProportion != expected" + ); + } + + // expect using calculation + { + uint256 expected = intercept + (coefficient * borrowed) / deposited; + require( + interestProportion == expected, + "interestProportion != expected (computed)" + ); + } + + // clear + borrowLendContract.HACKED_setTotalAssetsDeposited(0); + borrowLendContract.HACKED_setTotalAssetsBorrowed(0); + } + + function testUpdateInterestAccrualIndex() public { + // start from zero + vm.warp(0); + borrowLendContract.HACKED_setLastActivityBlockTimestamp( + block.timestamp + ); + + // fake supply some amount + uint256 deposited = 200e6; // 200 USDC (6 decimals) + borrowLendContract.HACKED_setTotalAssetsDeposited(deposited); + + // fake borrow some amount + uint256 borrowed = 20e6; // 20 USDC (6 decimals) + borrowLendContract.HACKED_setTotalAssetsBorrowed(borrowed); + + // warp to 1 year in the future + vm.warp(365 * 24 * 60 * 60); + + // trigger accrual + borrowLendContract.EXPOSED_updateInterestAccrualIndex(); + + { + // expect using the correct value (1.02e18) + require( + borrowLendContract.borrowedInterestAccrualIndex() == 1.02e18, + "borrowedInterestAccrualIndex() != expected (first iteration)" + ); + // expect using the correct value (1.002e18) + require( + borrowLendContract.collateralInterestAccrualIndex() == 1.002e18, + "collateralInterestAccrualIndex() != expected (first iteration)" + ); + } + + // warp to 2 years in the future + vm.warp(2 * 365 * 24 * 60 * 60); + + // trigger accrual again + borrowLendContract.EXPOSED_updateInterestAccrualIndex(); + + { + // expect using the correct value (1.04e18) + require( + borrowLendContract.borrowedInterestAccrualIndex() == 1.04e18, + "borrowedInterestAccrualIndex() != expected (second iteration)" + ); + // expect using the correct value (1.004e18) + require( + borrowLendContract.collateralInterestAccrualIndex() == 1.004e18, + "collateralInterestAccrualIndex() != expected (second iteration)" + ); + } + + // check denormalized deposit and borrowed. should be equal + { + NormalizedTotalAmounts memory amounts = borrowLendContract + .normalizedAmounts(); + uint256 accruedDepositedInterest = borrowLendContract + .denormalizeAmount( + amounts.deposited, + borrowLendContract.collateralInterestAccrualIndex() + ) - deposited; + uint256 accruedBorrowedInterest = borrowLendContract + .denormalizeAmount( + amounts.borrowed, + borrowLendContract.borrowedInterestAccrualIndex() + ) - borrowed; + require( + accruedDepositedInterest == accruedBorrowedInterest, + "accruedDepositedInterest != accruedBorrowedInterest" + ); + } + + // clear + borrowLendContract.HACKED_setTotalAssetsDeposited(0); + borrowLendContract.HACKED_setTotalAssetsBorrowed(0); + } + + function testMaxAllowedToWithdraw() public { + uint64 collateralPrice = 400; // WBNB + uint64 borrowAssetPrice = 1; // USDC + + uint256 deposited = 1e18; // 1 WBNB (18 decimals) + borrowLendContract.HACKED_setAccountAssetsDeposited( + msg.sender, + deposited + ); + + uint256 borrowed = 100e6; // 100 USDC (6 decimals) + borrowLendContract.HACKED_setAccountAssetsBorrowed( + msg.sender, + borrowed + ); + + uint256 maxAllowed = borrowLendContract + .EXPOSED_maxAllowedToWithdrawWithPrices( + msg.sender, + collateralPrice, + borrowAssetPrice + ); + + // expect 0.6875e18 (0.6875 WBNB) + { + require(maxAllowed == 0.6875e18, "maxAllowed != expected"); + } + + // clear + borrowLendContract.HACKED_setAccountAssetsDeposited(msg.sender, 0); + borrowLendContract.HACKED_setAccountAssetsBorrowed(msg.sender, 0); + } + + function testMaxAllowedToBorrow() public { + uint64 collateralPrice = 400; // WBNB + uint64 borrowAssetPrice = 1; // USDC + + uint256 deposited = 1e18; // 1 WBNB (18 decimals) + borrowLendContract.HACKED_setAccountAssetsDeposited( + msg.sender, + deposited + ); + + uint256 borrowed = 100e6; // 100 USDC (6 decimals) + borrowLendContract.HACKED_setAccountAssetsBorrowed( + msg.sender, + borrowed + ); + + uint256 maxAllowed = borrowLendContract + .EXPOSED_maxAllowedToBorrowWithPrices( + msg.sender, + collateralPrice, + borrowAssetPrice + ); + + // expect 220e6 (220 USDC) + { + require(maxAllowed == 220e6, "maxAllowed != expected"); + } + + // clear + borrowLendContract.HACKED_setAccountAssetsDeposited(msg.sender, 0); + borrowLendContract.HACKED_setAccountAssetsBorrowed(msg.sender, 0); + } +} diff --git a/evm/test/helpers/ExposedCrossChainBorrowLend.sol b/evm/test/helpers/ExposedCrossChainBorrowLend.sol new file mode 100644 index 0000000..928ded1 --- /dev/null +++ b/evm/test/helpers/ExposedCrossChainBorrowLend.sol @@ -0,0 +1,112 @@ +// SPDX-License-Identifier: Apache 2 + +pragma solidity ^0.8.0; + +import {NormalizedAmounts} from "../../src/CrossChainBorrowLendStructs.sol"; +import {CrossChainBorrowLend} from "../../src/CrossChainBorrowLend.sol"; +import "forge-std/Test.sol"; + +import "forge-std/console.sol"; + +contract ExposedCrossChainBorrowLend is CrossChainBorrowLend { + constructor( + address wormholeContractAddress_, + uint8 consistencyLevel_, + address mockPythAddress_, + uint16 targetChainId_, + bytes32 targetContractAddress_, + address collateralAsset_, + bytes32 collateralAssetPythId_, + uint256 collateralizationRatio_, + address borrowingAsset_, + bytes32 borrowingAssetPythId_, + uint256 repayGracePeriod_ + ) + CrossChainBorrowLend( + wormholeContractAddress_, + consistencyLevel_, + mockPythAddress_, + targetChainId_, + targetContractAddress_, + collateralAsset_, + collateralAssetPythId_, + collateralizationRatio_, + borrowingAsset_, + borrowingAssetPythId_, + repayGracePeriod_ + ) + { + // nothing else + } + + function EXPOSED_computeInterestProportion( + uint256 secondsElapsed, + uint256 intercept, + uint256 coefficient + ) external view returns (uint256) { + return + computeInterestProportion(secondsElapsed, intercept, coefficient); + } + + function EXPOSED_updateInterestAccrualIndex() external { + return updateInterestAccrualIndex(); + } + + function EXPOSED_maxAllowedToBorrowWithPrices( + address account, + uint64 collateralPrice, + uint64 borrowAssetPrice + ) external view returns (uint256) { + return + maxAllowedToBorrowWithPrices( + account, + collateralPrice, + borrowAssetPrice + ); + } + + function EXPOSED_maxAllowedToWithdrawWithPrices( + address account, + uint64 collateralPrice, + uint64 borrowAssetPrice + ) external view returns (uint256) { + return + maxAllowedToWithdrawWithPrices( + account, + collateralPrice, + borrowAssetPrice + ); + } + + function EXPOSED_accountAssets(address account) + external + view + returns (NormalizedAmounts memory) + { + return state.accountAssets[account]; + } + + function HACKED_setTotalAssetsDeposited(uint256 amount) external { + state.totalAssets.deposited = amount; + } + + function HACKED_setTotalAssetsBorrowed(uint256 amount) external { + state.totalAssets.borrowed = amount; + } + + function HACKED_setLastActivityBlockTimestamp(uint256 timestamp) external { + state.lastActivityBlockTimestamp = timestamp; + } + + function HACKED_setAccountAssetsDeposited(address account, uint256 amount) + external + { + state.accountAssets[account].sourceDeposited = amount; + } + + function HACKED_setAccountAssetsBorrowed(address account, uint256 amount) + external + { + state.accountAssets[account].targetBorrowed = amount; + } +} diff --git a/evm/test/helpers/MyERC20.sol b/evm/test/helpers/MyERC20.sol new file mode 100644 index 0000000..943d8b2 --- /dev/null +++ b/evm/test/helpers/MyERC20.sol @@ -0,0 +1,21 @@ +// SPDX-License-Identifier: Apache 2 + +pragma solidity ^0.8.0; + +import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol"; + +contract MyERC20 is ERC20 { + uint8 _decimals; + + constructor( + string memory name_, + string memory symbol_, + uint8 decimals_ + ) ERC20(name_, symbol_) { + _decimals = decimals_; + } + + function decimals() public view override returns (uint8) { + return _decimals; + } +} diff --git a/evm/yarn.lock b/evm/yarn.lock new file mode 100644 index 0000000..e561efb --- /dev/null +++ b/evm/yarn.lock @@ -0,0 +1,1162 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@ethersproject/abi@5.7.0", "@ethersproject/abi@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/abi/-/abi-5.7.0.tgz#b3f3e045bbbeed1af3947335c247ad625a44e449" + integrity sha512-351ktp42TiRcYB3H1OP8yajPeAQstMW/yCFokj/AthP9bLHzQFPlOrxOcwYEDkUAICmOHljvN4K39OMTMUa9RA== + dependencies: + "@ethersproject/address" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/constants" "^5.7.0" + "@ethersproject/hash" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + +"@ethersproject/abstract-provider@5.7.0", "@ethersproject/abstract-provider@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/abstract-provider/-/abstract-provider-5.7.0.tgz#b0a8550f88b6bf9d51f90e4795d48294630cb9ef" + integrity sha512-R41c9UkchKCpAqStMYUpdunjo3pkEvZC3FAwZn5S5MGbXoMQOHIdHItezTETxAO5bevtMApSyEhn9+CHcDsWBw== + dependencies: + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/networks" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/transactions" "^5.7.0" + "@ethersproject/web" "^5.7.0" + +"@ethersproject/abstract-signer@5.7.0", "@ethersproject/abstract-signer@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/abstract-signer/-/abstract-signer-5.7.0.tgz#13f4f32117868452191a4649723cb086d2b596b2" + integrity sha512-a16V8bq1/Cz+TGCkE2OPMTOUDLS3grCpdjoJCYNnVBbdYEMSgKrU0+B90s8b6H+ByYTBZN7a3g76jdIJi7UfKQ== + dependencies: + "@ethersproject/abstract-provider" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + +"@ethersproject/address@5.7.0", "@ethersproject/address@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/address/-/address-5.7.0.tgz#19b56c4d74a3b0a46bfdbb6cfcc0a153fc697f37" + integrity sha512-9wYhYt7aghVGo758POM5nqcOMaE168Q6aRLJZwUmiqSrAungkG74gSSeKEIR7ukixesdRZGPgVqme6vmxs1fkA== + dependencies: + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/rlp" "^5.7.0" + +"@ethersproject/base64@5.7.0", "@ethersproject/base64@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/base64/-/base64-5.7.0.tgz#ac4ee92aa36c1628173e221d0d01f53692059e1c" + integrity sha512-Dr8tcHt2mEbsZr/mwTPIQAf3Ai0Bks/7gTw9dSqk1mQvhW3XvRlmDJr/4n+wg1JmCl16NZue17CDh8xb/vZ0sQ== + dependencies: + "@ethersproject/bytes" "^5.7.0" + +"@ethersproject/basex@5.7.0", "@ethersproject/basex@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/basex/-/basex-5.7.0.tgz#97034dc7e8938a8ca943ab20f8a5e492ece4020b" + integrity sha512-ywlh43GwZLv2Voc2gQVTKBoVQ1mti3d8HK5aMxsfu/nRDnMmNqaSJ3r3n85HBByT8OpoY96SXM1FogC533T4zw== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + +"@ethersproject/bignumber@5.7.0", "@ethersproject/bignumber@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/bignumber/-/bignumber-5.7.0.tgz#e2f03837f268ba655ffba03a57853e18a18dc9c2" + integrity sha512-n1CAdIHRWjSucQO3MC1zPSVgV/6dy/fjL9pMrPP9peL+QxEg9wOsVqwD4+818B6LUEtaXzVHQiuivzRoxPxUGw== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + bn.js "^5.2.1" + +"@ethersproject/bytes@5.7.0", "@ethersproject/bytes@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/bytes/-/bytes-5.7.0.tgz#a00f6ea8d7e7534d6d87f47188af1148d71f155d" + integrity sha512-nsbxwgFXWh9NyYWo+U8atvmMsSdKJprTcICAkvbBffT75qDocbuggBU0SJiVK2MuTrp0q+xvLkTnGMPK1+uA9A== + dependencies: + "@ethersproject/logger" "^5.7.0" + +"@ethersproject/constants@5.7.0", "@ethersproject/constants@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/constants/-/constants-5.7.0.tgz#df80a9705a7e08984161f09014ea012d1c75295e" + integrity sha512-DHI+y5dBNvkpYUMiRQyxRBYBefZkJfo70VUkUAsRjcPs47muV9evftfZ0PJVCXYbAiCgght0DtcF9srFQmIgWA== + dependencies: + "@ethersproject/bignumber" "^5.7.0" + +"@ethersproject/contracts@5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/contracts/-/contracts-5.7.0.tgz#c305e775abd07e48aa590e1a877ed5c316f8bd1e" + integrity sha512-5GJbzEU3X+d33CdfPhcyS+z8MzsTrBGk/sc+G+59+tPa9yFkl6HQ9D6L0QMgNTA9q8dT0XKxxkyp883XsQvbbg== + dependencies: + "@ethersproject/abi" "^5.7.0" + "@ethersproject/abstract-provider" "^5.7.0" + "@ethersproject/abstract-signer" "^5.7.0" + "@ethersproject/address" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/constants" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/transactions" "^5.7.0" + +"@ethersproject/hash@5.7.0", "@ethersproject/hash@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/hash/-/hash-5.7.0.tgz#eb7aca84a588508369562e16e514b539ba5240a7" + integrity sha512-qX5WrQfnah1EFnO5zJv1v46a8HW0+E5xuBBDTwMFZLuVTx0tbU2kkx15NqdjxecrLGatQN9FGQKpb1FKdHCt+g== + dependencies: + "@ethersproject/abstract-signer" "^5.7.0" + "@ethersproject/address" "^5.7.0" + "@ethersproject/base64" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + +"@ethersproject/hdnode@5.7.0", "@ethersproject/hdnode@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/hdnode/-/hdnode-5.7.0.tgz#e627ddc6b466bc77aebf1a6b9e47405ca5aef9cf" + integrity sha512-OmyYo9EENBPPf4ERhR7oj6uAtUAhYGqOnIS+jE5pTXvdKBS99ikzq1E7Iv0ZQZ5V36Lqx1qZLeak0Ra16qpeOg== + dependencies: + "@ethersproject/abstract-signer" "^5.7.0" + "@ethersproject/basex" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/pbkdf2" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/sha2" "^5.7.0" + "@ethersproject/signing-key" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + "@ethersproject/transactions" "^5.7.0" + "@ethersproject/wordlists" "^5.7.0" + +"@ethersproject/json-wallets@5.7.0", "@ethersproject/json-wallets@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/json-wallets/-/json-wallets-5.7.0.tgz#5e3355287b548c32b368d91014919ebebddd5360" + integrity sha512-8oee5Xgu6+RKgJTkvEMl2wDgSPSAQ9MB/3JYjFV9jlKvcYHUXZC+cQp0njgmxdHkYWn8s6/IqIZYm0YWCjO/0g== + dependencies: + "@ethersproject/abstract-signer" "^5.7.0" + "@ethersproject/address" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/hdnode" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/pbkdf2" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/random" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + "@ethersproject/transactions" "^5.7.0" + aes-js "3.0.0" + scrypt-js "3.0.1" + +"@ethersproject/keccak256@5.7.0", "@ethersproject/keccak256@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/keccak256/-/keccak256-5.7.0.tgz#3186350c6e1cd6aba7940384ec7d6d9db01f335a" + integrity sha512-2UcPboeL/iW+pSg6vZ6ydF8tCnv3Iu/8tUmLLzWWGzxWKFFqOBQFLo6uLUv6BDrLgCDfN28RJ/wtByx+jZ4KBg== + dependencies: + "@ethersproject/bytes" "^5.7.0" + js-sha3 "0.8.0" + +"@ethersproject/logger@5.7.0", "@ethersproject/logger@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/logger/-/logger-5.7.0.tgz#6ce9ae168e74fecf287be17062b590852c311892" + integrity sha512-0odtFdXu/XHtjQXJYA3u9G0G8btm0ND5Cu8M7i5vhEcE8/HmF4Lbdqanwyv4uQTr2tx6b7fQRmgLrsnpQlmnig== + +"@ethersproject/networks@5.7.1", "@ethersproject/networks@^5.7.0": + version "5.7.1" + resolved "https://registry.yarnpkg.com/@ethersproject/networks/-/networks-5.7.1.tgz#118e1a981d757d45ccea6bb58d9fd3d9db14ead6" + integrity sha512-n/MufjFYv3yFcUyfhnXotyDlNdFb7onmkSy8aQERi2PjNcnWQ66xXxa3XlS8nCcA8aJKJjIIMNJTC7tu80GwpQ== + dependencies: + "@ethersproject/logger" "^5.7.0" + +"@ethersproject/pbkdf2@5.7.0", "@ethersproject/pbkdf2@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/pbkdf2/-/pbkdf2-5.7.0.tgz#d2267d0a1f6e123f3771007338c47cccd83d3102" + integrity sha512-oR/dBRZR6GTyaofd86DehG72hY6NpAjhabkhxgr3X2FpJtJuodEl2auADWBZfhDHgVCbu3/H/Ocq2uC6dpNjjw== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/sha2" "^5.7.0" + +"@ethersproject/properties@5.7.0", "@ethersproject/properties@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/properties/-/properties-5.7.0.tgz#a6e12cb0439b878aaf470f1902a176033067ed30" + integrity sha512-J87jy8suntrAkIZtecpxEPxY//szqr1mlBaYlQ0r4RCaiD2hjheqF9s1LVE8vVuJCXisjIP+JgtK/Do54ej4Sw== + dependencies: + "@ethersproject/logger" "^5.7.0" + +"@ethersproject/providers@5.7.1": + version "5.7.1" + resolved "https://registry.yarnpkg.com/@ethersproject/providers/-/providers-5.7.1.tgz#b0799b616d5579cd1067a8ebf1fc1ec74c1e122c" + integrity sha512-vZveG/DLyo+wk4Ga1yx6jSEHrLPgmTt+dFv0dv8URpVCRf0jVhalps1jq/emN/oXnMRsC7cQgAF32DcXLL7BPQ== + dependencies: + "@ethersproject/abstract-provider" "^5.7.0" + "@ethersproject/abstract-signer" "^5.7.0" + "@ethersproject/address" "^5.7.0" + "@ethersproject/base64" "^5.7.0" + "@ethersproject/basex" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/constants" "^5.7.0" + "@ethersproject/hash" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/networks" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/random" "^5.7.0" + "@ethersproject/rlp" "^5.7.0" + "@ethersproject/sha2" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + "@ethersproject/transactions" "^5.7.0" + "@ethersproject/web" "^5.7.0" + bech32 "1.1.4" + ws "7.4.6" + +"@ethersproject/random@5.7.0", "@ethersproject/random@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/random/-/random-5.7.0.tgz#af19dcbc2484aae078bb03656ec05df66253280c" + integrity sha512-19WjScqRA8IIeWclFme75VMXSBvi4e6InrUNuaR4s5pTF2qNhcGdCUwdxUVGtDDqC00sDLCO93jPQoDUH4HVmQ== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + +"@ethersproject/rlp@5.7.0", "@ethersproject/rlp@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/rlp/-/rlp-5.7.0.tgz#de39e4d5918b9d74d46de93af80b7685a9c21304" + integrity sha512-rBxzX2vK8mVF7b0Tol44t5Tb8gomOHkj5guL+HhzQ1yBh/ydjGnpw6at+X6Iw0Kp3OzzzkcKp8N9r0W4kYSs9w== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + +"@ethersproject/sha2@5.7.0", "@ethersproject/sha2@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/sha2/-/sha2-5.7.0.tgz#9a5f7a7824ef784f7f7680984e593a800480c9fb" + integrity sha512-gKlH42riwb3KYp0reLsFTokByAKoJdgFCwI+CCiX/k+Jm2mbNs6oOaCjYQSlI1+XBVejwH2KrmCbMAT/GnRDQw== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + hash.js "1.1.7" + +"@ethersproject/signing-key@5.7.0", "@ethersproject/signing-key@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/signing-key/-/signing-key-5.7.0.tgz#06b2df39411b00bc57c7c09b01d1e41cf1b16ab3" + integrity sha512-MZdy2nL3wO0u7gkB4nA/pEf8lu1TlFswPNmy8AiYkfKTdO6eXBJyUdmHO/ehm/htHw9K/qF8ujnTyUAD+Ry54Q== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + bn.js "^5.2.1" + elliptic "6.5.4" + hash.js "1.1.7" + +"@ethersproject/solidity@5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/solidity/-/solidity-5.7.0.tgz#5e9c911d8a2acce2a5ebb48a5e2e0af20b631cb8" + integrity sha512-HmabMd2Dt/raavyaGukF4XxizWKhKQ24DoLtdNbBmNKUOPqwjsKQSdV9GQtj9CBEea9DlzETlVER1gYeXXBGaA== + dependencies: + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/sha2" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + +"@ethersproject/strings@5.7.0", "@ethersproject/strings@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/strings/-/strings-5.7.0.tgz#54c9d2a7c57ae8f1205c88a9d3a56471e14d5ed2" + integrity sha512-/9nu+lj0YswRNSH0NXYqrh8775XNyEdUQAuf3f+SmOrnVewcJ5SBNAjF7lpgehKi4abvNNXyf+HX86czCdJ8Mg== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/constants" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + +"@ethersproject/transactions@5.7.0", "@ethersproject/transactions@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/transactions/-/transactions-5.7.0.tgz#91318fc24063e057885a6af13fdb703e1f993d3b" + integrity sha512-kmcNicCp1lp8qanMTC3RIikGgoJ80ztTyvtsFvCYpSCfkjhD0jZ2LOrnbcuxuToLIUYYf+4XwD1rP+B/erDIhQ== + dependencies: + "@ethersproject/address" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/constants" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/rlp" "^5.7.0" + "@ethersproject/signing-key" "^5.7.0" + +"@ethersproject/units@5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/units/-/units-5.7.0.tgz#637b563d7e14f42deeee39245275d477aae1d8b1" + integrity sha512-pD3xLMy3SJu9kG5xDGI7+xhTEmGXlEqXU4OfNapmfnxLVY4EMSSRp7j1k7eezutBPH7RBN/7QPnwR7hzNlEFeg== + dependencies: + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/constants" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + +"@ethersproject/wallet@5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/wallet/-/wallet-5.7.0.tgz#4e5d0790d96fe21d61d38fb40324e6c7ef350b2d" + integrity sha512-MhmXlJXEJFBFVKrDLB4ZdDzxcBxQ3rLyCkhNqVu3CDYvR97E+8r01UgrI+TI99Le+aYm/in/0vp86guJuM7FCA== + dependencies: + "@ethersproject/abstract-provider" "^5.7.0" + "@ethersproject/abstract-signer" "^5.7.0" + "@ethersproject/address" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/hash" "^5.7.0" + "@ethersproject/hdnode" "^5.7.0" + "@ethersproject/json-wallets" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/random" "^5.7.0" + "@ethersproject/signing-key" "^5.7.0" + "@ethersproject/transactions" "^5.7.0" + "@ethersproject/wordlists" "^5.7.0" + +"@ethersproject/web@5.7.1", "@ethersproject/web@^5.7.0": + version "5.7.1" + resolved "https://registry.yarnpkg.com/@ethersproject/web/-/web-5.7.1.tgz#de1f285b373149bee5928f4eb7bcb87ee5fbb4ae" + integrity sha512-Gueu8lSvyjBWL4cYsWsjh6MtMwM0+H4HvqFPZfB6dV8ctbP9zFAO73VG1cMWae0FLPCtz0peKPpZY8/ugJJX2w== + dependencies: + "@ethersproject/base64" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + +"@ethersproject/wordlists@5.7.0", "@ethersproject/wordlists@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/wordlists/-/wordlists-5.7.0.tgz#8fb2c07185d68c3e09eb3bfd6e779ba2774627f5" + integrity sha512-S2TFNJNfHWVHNE6cNDjbVlZ6MgE17MIxMbMg2zv3wn+3XSJGosL1m9ZVv3GXCf/2ymSsQ+hRI5IzoMJTG6aoVA== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/hash" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + +"@openzeppelin/contracts@^4.7.3": + version "4.7.3" + resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-4.7.3.tgz#939534757a81f8d69cc854c7692805684ff3111e" + integrity sha512-dGRS0agJzu8ybo44pCIf3xBaPQN/65AIXNgK8+4gzKd5kbvlqyxryUYVLJv7fK98Seyd2hDZzVEHSWAh0Bt1Yw== + +"@types/chai@^4.3.3": + version "4.3.3" + resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.3.3.tgz#3c90752792660c4b562ad73b3fbd68bf3bc7ae07" + integrity sha512-hC7OMnszpxhZPduX+m+nrx+uFoLkWOMiR4oa/AZF3MuSETYTZmFfJAHqZEM8MVlvfG7BEUcgvtwoCTxBp6hm3g== + +"@types/json5@^0.0.29": + version "0.0.29" + resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" + integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ== + +"@types/mocha@^9.1.1": + version "9.1.1" + resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-9.1.1.tgz#e7c4f1001eefa4b8afbd1eee27a237fee3bf29c4" + integrity sha512-Z61JK7DKDtdKTWwLeElSEBcWGRLY8g95ic5FoQqI9CMx0ns/Ghep3B4DfcEimiKMvtamNVULVNKEsiwV3aQmXw== + +"@ungap/promise-all-settled@1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz#aa58042711d6e3275dd37dc597e5d31e8c290a44" + integrity sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q== + +aes-js@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-3.0.0.tgz#e21df10ad6c2053295bcbb8dab40b09dbea87e4d" + integrity sha512-H7wUZRn8WpTq9jocdxQ2c8x2sKo9ZVmzfRE13GiNJXfp7NcKYEdvl3vspKjXox6RIG2VtaRe4JFvxG4rqp2Zuw== + +ansi-colors@4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" + integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== + +ansi-regex@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" + integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== + +ansi-styles@^4.0.0, ansi-styles@^4.1.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" + integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== + dependencies: + color-convert "^2.0.1" + +anymatch@~3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.2.tgz#c0557c096af32f106198f4f4e2a383537e378716" + integrity sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg== + dependencies: + normalize-path "^3.0.0" + picomatch "^2.0.4" + +argparse@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" + integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== + +arrify@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" + integrity sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA== + +assertion-error@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.1.0.tgz#e60b6b0e8f301bd97e5375215bda406c85118c0b" + integrity sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw== + +balanced-match@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" + integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== + +bech32@1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/bech32/-/bech32-1.1.4.tgz#e38c9f37bf179b8eb16ae3a772b40c356d4832e9" + integrity sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ== + +binary-extensions@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" + integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== + +bn.js@^4.11.9: + version "4.12.0" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88" + integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA== + +bn.js@^5.2.1: + version "5.2.1" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.1.tgz#0bc527a6a0d18d0aa8d5b0538ce4a77dccfa7b70" + integrity sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ== + +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +brace-expansion@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae" + integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA== + dependencies: + balanced-match "^1.0.0" + +braces@~3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" + integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== + dependencies: + fill-range "^7.0.1" + +brorand@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" + integrity sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w== + +browser-stdout@1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" + integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== + +buffer-from@^1.0.0, buffer-from@^1.1.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" + integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== + +camelcase@^6.0.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" + integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== + +chai@^4.3.6: + version "4.3.6" + resolved "https://registry.yarnpkg.com/chai/-/chai-4.3.6.tgz#ffe4ba2d9fa9d6680cc0b370adae709ec9011e9c" + integrity sha512-bbcp3YfHCUzMOvKqsztczerVgBKSsEijCySNlHHbX3VG1nskvqjz5Rfso1gGwD6w6oOV3eI60pKuMOV5MV7p3Q== + dependencies: + assertion-error "^1.1.0" + check-error "^1.0.2" + deep-eql "^3.0.1" + get-func-name "^2.0.0" + loupe "^2.3.1" + pathval "^1.1.1" + type-detect "^4.0.5" + +chalk@^4.1.0: + version "4.1.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" + integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + +check-error@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82" + integrity sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA== + +chokidar@3.5.3: + version "3.5.3" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" + integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== + dependencies: + anymatch "~3.1.2" + braces "~3.0.2" + glob-parent "~5.1.2" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.6.0" + optionalDependencies: + fsevents "~2.3.2" + +cliui@^7.0.2: + version "7.0.4" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" + integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.0" + wrap-ansi "^7.0.0" + +color-convert@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" + integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== + dependencies: + color-name "~1.1.4" + +color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== + +debug@4.3.4: + version "4.3.4" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" + integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== + dependencies: + ms "2.1.2" + +decamelize@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-4.0.0.tgz#aa472d7bf660eb15f3494efd531cab7f2a709837" + integrity sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ== + +deep-eql@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-3.0.1.tgz#dfc9404400ad1c8fe023e7da1df1c147c4b444df" + integrity sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw== + dependencies: + type-detect "^4.0.0" + +diff@5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-5.0.0.tgz#7ed6ad76d859d030787ec35855f5b1daf31d852b" + integrity sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w== + +diff@^3.1.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" + integrity sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA== + +elliptic@6.5.4, elliptic@^6.5.4: + version "6.5.4" + resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb" + integrity sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ== + dependencies: + bn.js "^4.11.9" + brorand "^1.1.0" + hash.js "^1.0.0" + hmac-drbg "^1.0.1" + inherits "^2.0.4" + minimalistic-assert "^1.0.1" + minimalistic-crypto-utils "^1.0.1" + +emoji-regex@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" + integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== + +escalade@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" + integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== + +escape-string-regexp@4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" + integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== + +ethers@^5.7.1: + version "5.7.1" + resolved "https://registry.yarnpkg.com/ethers/-/ethers-5.7.1.tgz#48c83a44900b5f006eb2f65d3ba6277047fd4f33" + integrity sha512-5krze4dRLITX7FpU8J4WscXqADiKmyeNlylmmDLbS95DaZpBhDe2YSwRQwKXWNyXcox7a3gBgm/MkGXV1O1S/Q== + dependencies: + "@ethersproject/abi" "5.7.0" + "@ethersproject/abstract-provider" "5.7.0" + "@ethersproject/abstract-signer" "5.7.0" + "@ethersproject/address" "5.7.0" + "@ethersproject/base64" "5.7.0" + "@ethersproject/basex" "5.7.0" + "@ethersproject/bignumber" "5.7.0" + "@ethersproject/bytes" "5.7.0" + "@ethersproject/constants" "5.7.0" + "@ethersproject/contracts" "5.7.0" + "@ethersproject/hash" "5.7.0" + "@ethersproject/hdnode" "5.7.0" + "@ethersproject/json-wallets" "5.7.0" + "@ethersproject/keccak256" "5.7.0" + "@ethersproject/logger" "5.7.0" + "@ethersproject/networks" "5.7.1" + "@ethersproject/pbkdf2" "5.7.0" + "@ethersproject/properties" "5.7.0" + "@ethersproject/providers" "5.7.1" + "@ethersproject/random" "5.7.0" + "@ethersproject/rlp" "5.7.0" + "@ethersproject/sha2" "5.7.0" + "@ethersproject/signing-key" "5.7.0" + "@ethersproject/solidity" "5.7.0" + "@ethersproject/strings" "5.7.0" + "@ethersproject/transactions" "5.7.0" + "@ethersproject/units" "5.7.0" + "@ethersproject/wallet" "5.7.0" + "@ethersproject/web" "5.7.1" + "@ethersproject/wordlists" "5.7.0" + +fill-range@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" + integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== + dependencies: + to-regex-range "^5.0.1" + +find-up@5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" + integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== + dependencies: + locate-path "^6.0.0" + path-exists "^4.0.0" + +flat@^5.0.2: + version "5.0.2" + resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241" + integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== + +fsevents@~2.3.2: + version "2.3.2" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" + integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== + +get-caller-file@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" + integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== + +get-func-name@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.0.tgz#ead774abee72e20409433a066366023dd6887a41" + integrity sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig== + +glob-parent@~5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" + integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== + dependencies: + is-glob "^4.0.1" + +glob@7.2.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.0.tgz#d15535af7732e02e948f4c41628bd910293f6023" + integrity sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== + +hash.js@1.1.7, hash.js@^1.0.0, hash.js@^1.0.3: + version "1.1.7" + resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" + integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA== + dependencies: + inherits "^2.0.3" + minimalistic-assert "^1.0.1" + +he@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" + integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== + +hmac-drbg@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" + integrity sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg== + dependencies: + hash.js "^1.0.3" + minimalistic-assert "^1.0.0" + minimalistic-crypto-utils "^1.0.1" + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2, inherits@^2.0.3, inherits@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + +is-binary-path@~2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" + integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== + dependencies: + binary-extensions "^2.0.0" + +is-extglob@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== + +is-fullwidth-code-point@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" + integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== + +is-glob@^4.0.1, is-glob@~4.0.1: + version "4.0.3" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" + integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== + dependencies: + is-extglob "^2.1.1" + +is-number@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" + integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== + +is-plain-obj@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-2.1.0.tgz#45e42e37fccf1f40da8e5f76ee21515840c09287" + integrity sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA== + +is-unicode-supported@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz#3f26c76a809593b52bfa2ecb5710ed2779b522a7" + integrity sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw== + +js-sha3@0.8.0: + version "0.8.0" + resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.8.0.tgz#b9b7a5da73afad7dedd0f8c463954cbde6818840" + integrity sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q== + +js-yaml@4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" + integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== + dependencies: + argparse "^2.0.1" + +json5@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.1.tgz#779fb0018604fa854eacbf6252180d83543e3dbe" + integrity sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow== + dependencies: + minimist "^1.2.0" + +locate-path@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" + integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== + dependencies: + p-locate "^5.0.0" + +log-symbols@4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.1.0.tgz#3fbdbb95b4683ac9fc785111e792e558d4abd503" + integrity sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg== + dependencies: + chalk "^4.1.0" + is-unicode-supported "^0.1.0" + +loupe@^2.3.1: + version "2.3.4" + resolved "https://registry.yarnpkg.com/loupe/-/loupe-2.3.4.tgz#7e0b9bffc76f148f9be769cb1321d3dcf3cb25f3" + integrity sha512-OvKfgCC2Ndby6aSTREl5aCCPTNIzlDfQZvZxNUrBrihDhL3xcrYegTblhmEiCrg2kKQz4XsFIaemE5BF4ybSaQ== + dependencies: + get-func-name "^2.0.0" + +make-error@^1.1.1: + version "1.3.6" + resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" + integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== + +minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" + integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== + +minimalistic-crypto-utils@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" + integrity sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg== + +minimatch@5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.0.1.tgz#fb9022f7528125187c92bd9e9b6366be1cf3415b" + integrity sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g== + dependencies: + brace-expansion "^2.0.1" + +minimatch@^3.0.4: + version "3.1.2" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" + integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== + dependencies: + brace-expansion "^1.1.7" + +minimist@^1.2.0, minimist@^1.2.6: + version "1.2.6" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44" + integrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q== + +mkdirp@^0.5.1: + version "0.5.6" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.6.tgz#7def03d2432dcae4ba1d611445c48396062255f6" + integrity sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw== + dependencies: + minimist "^1.2.6" + +mocha@^10.0.0: + version "10.0.0" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-10.0.0.tgz#205447d8993ec755335c4b13deba3d3a13c4def9" + integrity sha512-0Wl+elVUD43Y0BqPZBzZt8Tnkw9CMUdNYnUsTfOM1vuhJVZL+kiesFYsqwBkEEuEixaiPe5ZQdqDgX2jddhmoA== + dependencies: + "@ungap/promise-all-settled" "1.1.2" + ansi-colors "4.1.1" + browser-stdout "1.3.1" + chokidar "3.5.3" + debug "4.3.4" + diff "5.0.0" + escape-string-regexp "4.0.0" + find-up "5.0.0" + glob "7.2.0" + he "1.2.0" + js-yaml "4.1.0" + log-symbols "4.1.0" + minimatch "5.0.1" + ms "2.1.3" + nanoid "3.3.3" + serialize-javascript "6.0.0" + strip-json-comments "3.1.1" + supports-color "8.1.1" + workerpool "6.2.1" + yargs "16.2.0" + yargs-parser "20.2.4" + yargs-unparser "2.0.0" + +ms@2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== + +ms@2.1.3: + version "2.1.3" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" + integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== + +nanoid@3.3.3: + version "3.3.3" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.3.tgz#fd8e8b7aa761fe807dba2d1b98fb7241bb724a25" + integrity sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w== + +normalize-path@^3.0.0, normalize-path@~3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" + integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== + +once@^1.3.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== + dependencies: + wrappy "1" + +p-limit@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" + integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== + dependencies: + yocto-queue "^0.1.0" + +p-locate@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" + integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== + dependencies: + p-limit "^3.0.2" + +path-exists@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" + integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== + +pathval@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.1.tgz#8534e77a77ce7ac5a2512ea21e0fdb8fcf6c3d8d" + integrity sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ== + +picomatch@^2.0.4, picomatch@^2.2.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" + integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== + +randombytes@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" + integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== + dependencies: + safe-buffer "^5.1.0" + +readdirp@~3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" + integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== + dependencies: + picomatch "^2.2.1" + +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== + +safe-buffer@^5.1.0: + version "5.2.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== + +scrypt-js@3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/scrypt-js/-/scrypt-js-3.0.1.tgz#d314a57c2aef69d1ad98a138a21fe9eafa9ee312" + integrity sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA== + +serialize-javascript@6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.0.tgz#efae5d88f45d7924141da8b5c3a7a7e663fefeb8" + integrity sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag== + dependencies: + randombytes "^2.1.0" + +source-map-support@^0.5.6: + version "0.5.21" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" + integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + +source-map@^0.6.0: + version "0.6.1" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== + +string-width@^4.1.0, string-width@^4.2.0: + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + +strip-ansi@^6.0.0, strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + +strip-bom@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" + integrity sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA== + +strip-json-comments@3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" + integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== + +supports-color@8.1.1: + version "8.1.1" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" + integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== + dependencies: + has-flag "^4.0.0" + +supports-color@^7.1.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" + integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== + dependencies: + has-flag "^4.0.0" + +to-regex-range@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" + integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== + dependencies: + is-number "^7.0.0" + +ts-mocha@^10.0.0: + version "10.0.0" + resolved "https://registry.yarnpkg.com/ts-mocha/-/ts-mocha-10.0.0.tgz#41a8d099ac90dbbc64b06976c5025ffaebc53cb9" + integrity sha512-VRfgDO+iiuJFlNB18tzOfypJ21xn2xbuZyDvJvqpTbWgkAgD17ONGr8t+Tl8rcBtOBdjXp5e/Rk+d39f7XBHRw== + dependencies: + ts-node "7.0.1" + optionalDependencies: + tsconfig-paths "^3.5.0" + +ts-node@7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-7.0.1.tgz#9562dc2d1e6d248d24bc55f773e3f614337d9baf" + integrity sha512-BVwVbPJRspzNh2yfslyT1PSbl5uIk03EZlb493RKHN4qej/D06n1cEhjlOJG69oFsE7OT8XjpTUcYf6pKTLMhw== + dependencies: + arrify "^1.0.0" + buffer-from "^1.1.0" + diff "^3.1.0" + make-error "^1.1.1" + minimist "^1.2.0" + mkdirp "^0.5.1" + source-map-support "^0.5.6" + yn "^2.0.0" + +tsconfig-paths@^3.5.0: + version "3.14.1" + resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.14.1.tgz#ba0734599e8ea36c862798e920bcf163277b137a" + integrity sha512-fxDhWnFSLt3VuTwtvJt5fpwxBHg5AdKWMsgcPOOIilyjymcYVZoCQF8fvFRezCNfblEXmi+PcM1eYHeOAgXCOQ== + dependencies: + "@types/json5" "^0.0.29" + json5 "^1.0.1" + minimist "^1.2.6" + strip-bom "^3.0.0" + +type-detect@^4.0.0, type-detect@^4.0.5: + version "4.0.8" + resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" + integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== + +typescript@^4.8.3: + version "4.8.3" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.8.3.tgz#d59344522c4bc464a65a730ac695007fdb66dd88" + integrity sha512-goMHfm00nWPa8UvR/CPSvykqf6dVV8x/dp0c5mFTMTIu0u0FlGWRioyy7Nn0PGAdHxpJZnuO/ut+PpQ8UiHAig== + +workerpool@6.2.1: + version "6.2.1" + resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.2.1.tgz#46fc150c17d826b86a008e5a4508656777e9c343" + integrity sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw== + +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== + +ws@7.4.6: + version "7.4.6" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.6.tgz#5654ca8ecdeee47c33a9a4bf6d28e2be2980377c" + integrity sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A== + +y18n@^5.0.5: + version "5.0.8" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" + integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== + +yargs-parser@20.2.4: + version "20.2.4" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.4.tgz#b42890f14566796f85ae8e3a25290d205f154a54" + integrity sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA== + +yargs-parser@^20.2.2: + version "20.2.9" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" + integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== + +yargs-unparser@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-2.0.0.tgz#f131f9226911ae5d9ad38c432fe809366c2325eb" + integrity sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA== + dependencies: + camelcase "^6.0.0" + decamelize "^4.0.0" + flat "^5.0.2" + is-plain-obj "^2.1.0" + +yargs@16.2.0: + version "16.2.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" + integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== + dependencies: + cliui "^7.0.2" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.0" + y18n "^5.0.5" + yargs-parser "^20.2.2" + +yn@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/yn/-/yn-2.0.0.tgz#e5adabc8acf408f6385fc76495684c88e6af689a" + integrity sha512-uTv8J/wiWTgUTg+9vLTi//leUl5vDQS6uii/emeTb2ssY7vl6QWf2fFbIIGjnhjvbdKlU0ed7QPgY1htTC86jQ== + +yocto-queue@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" + integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==