Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@brydge-network/direct-nft-protocol
Advanced tools
Brydge is a multichain protocol built on top of Stargate and LayerZero that enables users to buy digital assets and invest in DeFi using any token from any chain.
yarn install
yarn test
yarn test:integration
Docs
for more detailed overviewMultichainPortal
and MultichainRouter
.
here
Four main functions house all functionality needed to support purchasing digital assets using any token on any chain:
function swapERC20AndCall(
address tokenIn,
uint256 amountIn,
address user,
address swapRouter,
bytes calldata swapArguments,
Types.ICall[] calldata calls
) external;
function swapNativeAndCall(
address swapRouter,
bytes calldata swapArguments,
Types.ICall[] calldata calls
) external payable;
function swapERC20AndSend(
uint amountIn,
uint amountUSDC,
address user,
address tokenIn,
address swapRouter,
bytes calldata swapArguments,
StargateArgs memory stargateArgs
) external payable;
function swapNativeAndSend(
uint amountIn,
uint amountUSDC,
uint lzFee,
address user,
address swapRouter,
bytes calldata swapArguments,
IMultichainPortal.StargateArgs memory stargateArgs
) external payable;
All four functions are present both in MultichainPortal.sol and MultichainRouter.sol. They are intended to be called by users (through our widget) in MultichainRouter.sol which forwards the call to MultichainPortal.sol where the primary logic is stored. The first two functions (swapERC20AndCall
and swapNativeAndCall
) are utilized when a user has any arbitrary token and wants to purchase/interact with a dapp on the same chain. Information in order to perform the swap into the desired token is passed in through arguments swapRouter
and swapArguments
and any subsequent contract interactions are encoded and passed as an array of calldata that is looped through and executed. The last two functions (swapERC20AndSend
and swapNativeAndSend
) are utilized when a user has any arbitrary token but wants to purchase/interact with a dapp on a different chain. Here we utilized Stargate's cross-chain usdc pools and messaging protocol in order to:
The primary license for Brydge is the Business Source License 1.1 (BUSL-1.1). see LICENSE
.
FAQs
Unknown package
We found that @brydge-network/direct-nft-protocol demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 7 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.