ETH Price: $2,975.31 (+0.68%)

Transaction Decoder

Block:
16549960 at Feb-03-2023 06:10:23 PM +UTC
Transaction Fee:
0.027260380421402403 ETH $81.11
Gas Used:
644,313 Gas / 42.309219931 Gwei

Account State Difference:

  Address   Before After State Difference Code
0x0A9f824C...3a872Dff4
(Layer Zero: Swappable Bridge)
0 Eth
Nonce: 0
0 Eth
Nonce: 1
From: 0 To: 7335000136495881513359739013131554576131093633414385193218903633513049522862167292276058324031824927742522969573418565566803498695440312191727729565854332278044674354513618534015660471778981415239067248555377876023556326850301364011051600445280817490632372505927644428821074199759405674775103782208224150600494705333552165025712649955583962916141653469568612617682527694884010898687168160284260238431076548808923434024241061956415518755690011037799149703104324087488195894731407842442183426504534601713956568963891512744928613058835123112839475130536946794298388536375332485128125769753188565942666614391909895988064519187884541582817895543343379839983707450453842105263992551530962170927522158454477719331266088975608156906301252435192457271209201604512725763913394864836720059424884401239570971029831593756140698481044102862373243507973756032633767650271126137258997361234137226684726079590125607281321532640864637468643955368699816473727653350818377640940872195184679429362895799300828229460957982586990554897881023132480667136083555129290841551869357835593896291894983409655062793147654035942511128197417706386761864764750996781253807972517648114816096636986271392901362328325209254478018939478074258703405264628328955975982204042106583263360247331462223097789109254845451697017099437093141014440921526374567957213521338221492692272523467274703672907767815774925602742277311930866364911450534764896418727297348916466782884040569315651670645172975329836203051480311364412525830231467103167180607939843035744363046461832130960177307049547930889274212861626119698518666139336560918882712047200565287225998808102312234323512021244417572575827103476993557943603329773666132894224539651037489582044111570727041050375146448516069858650005346600403315974827300725332893671520275498779156742686311170701473548752940392529593201234428864042325460264964876746961769825556091270081903500379260517131968517864974165735446087323126277159909871716913930299960811922144709432380578423627119886654272293832737156713919981372728098530921305029083662104346386635267215174186598689983756833607271777552759933708306793707382017144409967060459233058424501529010343453929343935152123367085759450529326512048835214913321023804062864756107124621961529819559779936777658210845145950632849826323030453896511979632646997481594897510666522705164154834189094818305320114025132257225874829197066185221414888799441123048259398205638623776632572165199941757704373323901330515175115189486709117129391887071419667935657451496983232485313828013399257805209804596040070122102622285090065630735232198559967225554845015467713296495430446664683289278852861316782987635535273025415520839784783222017686783589073172992094217015030004039366845140393661406343907106470406565811458574720534005558685683350684754729723408257012804720903572468979939548612586242063065674836903942264389472102321112436027165445633323725921165086270255959036906115325822014431818453687142402947897441302892064646833872002417461045769390320113515174942899522806506280210046979911927306923793177301327571563344081752583078980346100734517218185793415256513979670275761280979208725657583851345479514505287332228465223078879102990311820376903370450099531509660664569746678810944994121566321508637108102674088451457265886089926194472764943424755142317693470503755360893584183559044199314591137248433270448861107846789746381379361275513068043575684389083497741276539208225706070821092657637556264865100453113570340714525351308366975646424791875563523108668438313327820324424833519944200255216403781116945188202843539557858943421393280864075810031208262990923291784722894149345635278154330421470423283305173400937030531501584828143647803341645631395136431449769726841065610547153985678024466296729737927671483006169238608823304579425811658593950040028257621235848066882466869303609169780729845333227393995238232717241602394701246230084692175644241500324416231041227123369758760708791848144055335583378019149631965490640056203561179870624128204538404632193956900662018031318925246908531348978971140879857450090911865525721221836270063248999329227449081041487891695202190762739872520649294591390755355514599231955565491638628385806599376927342666206537047562190357613147830872544350244356990161681210257731085915211235766710618718697254394217968428548506452422821043896499848893726645453613359568504588395246121508685478938703469579334011384525639147947342483749924065876798092047755553396967053169849454651616288880485566112406342157050324679455597584644578593014146662352115148256840116257787322927641852436140936098152705194631409840851349809881432367441907810637114449904546226659669046171349628872375436168412075049000655410765680001258172958748643673389881876228722452668484700807021006780334490484848184812208957373035687922700483606947350721125786739748571479656840149611117506136969915523449171317743597360532523417473769073617989599646776355653054045863845253069105577707373507606121975453007031451704601907324498397953242699967852364280243922406557092176825336390140832797041583458499004703491345239132622575187805130148361890171405277522354099000027619895818957567906372329288177266665009359770366802504142241362242759724251415866530186069677643605643192261400127856876003847550924286693089896673528741107204740179138967651204317202584468722448098571098824512049761830799447677383992715792580700675404346869001233371616915645163838737510319415492248201568061163502758236095036457673951996624560598415045170119750587694788717932399345170342372501046741558595288818676524866425064214664512211377632111718609497166776172018200751993883733316753009537332001722622267615180309402481203581826677223951364010001316160686726618150305896141280538321330193387780245273412189604218136542754331381123525484317630542606713674900813896163467219301504208175121367028405340912526438874954866434921163281913888848031453121826607490538702555580194552417420328300609799045955142654015139425277781695010298496537051558117031979245917794705809036134870923959578256316757463065528719560245369692160526053389639811782373410784887173970651840905723141770244862730412502975714034412538049125830242029455234658090686694206322012406365676504125973620744024948656328938019596578291271374169299150486799205757996671526319139235163746922210403903846654460386646057890528342159114201226804380992903576686976509933509710596261464432979227564814471249645424794480716436156064163820833696409521463218526165188237669723099197359631651839795510391708877115614795997452227919174468158144554844646049142331736115
0x5e9Bf1dD...b08eA3d3c
(LayerZero: Deployer)
1.47149469683105085 Eth
Nonce: 5
1.444234316409648447 Eth
Nonce: 6
0.027260380421402403
(Flashbots: Builder)
1.258748115364333057 Eth1.259587430376754837 Eth0.00083931501242178

Execution Trace

SwappableBridge.60e06040( )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol";
import "@layerzerolabs/solidity-examples/contracts/token/oft/IOFTCore.sol";
import "./INativeOFT.sol";
contract SwappableBridge {
IOFTCore public immutable oft;
INativeOFT public immutable nativeOft;
IUniswapV2Router02 public immutable uniswapRouter;
constructor(address _oft, address _nativeOft, address _uniswapRouter) {
require(_oft != address(0), "SwappableBridge: invalid OFT address");
require(_nativeOft != address(0), "SwappableBridge: invalid Native OFT address");
require(_uniswapRouter != address(0), "SwappableBridge: invalid Uniswap Router address");
oft = IOFTCore(_oft);
nativeOft = INativeOFT(_nativeOft);
uniswapRouter = IUniswapV2Router02(_uniswapRouter);
}
function swapAndBridge(uint amountIn, uint amountOutMin, uint16 dstChainId, address to, address payable refundAddress, address zroPaymentAddress,
        bytes calldata adapterParams) external payable {
require(to != address(0), "SwappableBridge: invalid to address");
require(msg.value >= amountIn, "SwappableBridge: not enough value sent");
address[] memory path = new address[](2);
path[0] = uniswapRouter.WETH();
path[1] = address(oft);
uint[] memory amounts = uniswapRouter.swapExactETHForTokens{value: amountIn}(amountOutMin, path, address(this), block.timestamp);
oft.sendFrom{value: msg.value - amountIn}(address(this), dstChainId, abi.encodePacked(to), amounts[1], refundAddress, zroPaymentAddress,
            adapterParams);
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX