ETH Price: $2,532.76 (-1.84%)
Gas: 0.33 Gwei

Transaction Decoder

Block:
22492921 at May-16-2025 03:19:11 AM +UTC
Transaction Fee:
0.000955625625448658 ETH $2.42
Gas Used:
596,158 Gas / 1.602973751 Gwei

Emitted Events:

79 DSProxy.LogSetOwner( owner=DSProxyFactory )
80 DSProxy.0x0000000000000000000000000000000000000000000000000000000000000000( 0x0000000000000000000000000000000000000000000000000000000000000000, 0x000000000000000000000000a26e15c895efc0616177b7c1e7270a4c7d51c997, 0x0000000000000000000000000000000000000000000000000000000000000000, 0x0000000000000000000000000000000000000000000000000000000000000000, 0000000000000000000000000000000000000000000000000000000000000000, 0000000000000000000000000000000000000000000000000000000000000040, 0000000000000000000000000000000000000000000000000000000000000000 )
81 DSProxyFactory.Created( sender=[Receiver] ProxyRegistry, owner=[Sender] 0x7b570ed96c864340c02768645bd09bb9382fe1ec, proxy=DSProxy, cache=0x271293c6...1E07B0795 )
82 DSProxy.LogSetOwner( owner=[Sender] 0x7b570ed96c864340c02768645bd09bb9382fe1ec )

Account State Difference:

  Address   Before After State Difference Code
0x4678f0a6...3564f3fE4
(Sky: Proxy Registry)
(Titan Builder)
6.232849624124973257 Eth6.233445782124973257 Eth0.000596158
0x7B570Ed9...9382fe1Ec
0.009 Eth
Nonce: 0
0.008044374374551342 Eth
Nonce: 1
0.000955625625448658
0xA26e15C8...C7D51C997
(Sky: DS Proxy Factory)
0xA6EB956E...BFfD09DC9
(DSProxy #222,146)
0 Eth
Nonce: 0
0 Eth
Nonce: 1
From: 0 To: 18771484321836766514160800625398263721587654289462738518162139594958605440862783641288874953260757618880930544343297244119414303867245482478127055655388543556676726831524880604993798552941636471256082285761222872790766374502993415641310813072704001197116101989851722658882050361554507715911361571445848374209912273485140155975765309882186114151009407825861710683909437910939294669383633720615678623591248841384199117772200138096878972114479259071046938499361393780012105387276833443933844651538948475983488852955064103830986556347130887184509212824383684871024987317126224738652474399167679147695780908130883560247390825605302628421090997295411561542795222042665212346872877670513090020169043364231193174453316529315574713269539975163935900269993966483413523628276459142059919849409668938452952213979874583963152087433103758003103350596587230982314717479973382889008370459548910726851614623163608690678037944403697359090543862167769649761194871039947078642822270249013528461982285750038509667997165159398363115985007829067722188131721116909961654473793448955309879942431898222013991035785796984902893515391802118065675225459465468679021205308693036148353192715225063502601085253048240696440649385809326391761763262791083458897009421096535169208411820499247253740509355528596248558615817959467503182155604720454459503548624096682816239848526424026075440011070653684491533493859683365002642153774532972539567247712274642961955380999690735206123242229168253609380832795243822084103469570967279480642923240116432988914384536104105362444656937288689342754669761508077437295113300866984832052684188812087184169153721186143917758596125827992588656231486721461749851837122807935627181460647367508886498682939360736600688584526662912701826854907165677573574907875699273546914405082644542382641264287214968257286625940874556582754027200415822962184378814712124159217521452226458175585269097294471787423180643368341969276143850668586360765999285251228768111236605832893437450495225318600449727089325878267010179823278293071499693900355036735508292429448880677880919590671928710267334546899443874944594106734037107560292282279802131724971526092936548922825728115629077973929928228629196437028542267025247545790893268584916374171554180061926929556985584414672923137553835588816047414282557412142707449611909433127561124805230186659002059231826916921637527581292755195149786168485191270019241935882422039397612142296306138773832894683344491386602762551343738487373351512187508255286184722099139685069227272570379779405070360945680962723676254406631754542925965369022940089066953844860357249818086687756017311307269596476952552347988487315595011750905678627949302448911279829169821190181436077315828330044785725858628456267688119172880691877262851780310824064920069166756290529847889461455812767260294650601354408736595119448412882390953244425417363726959012329783524995688163339327020186371215948620300343288329107226892441426824021670994968387184287326464221776526245626521238885261720597989923530095274143046123173205975672083452245906896248750357118572569100955732678663024935648703280220438854909676802241673511590622558816862403510893685322808889616785978067524270400902918002290734864415801732088943945937691036719668672851856075151105962953163149386205010511670577424760703528216878109607543034827069766549140456778744655196833077105730082272782531122388316412261868549807976003719535176815039872695375506801114672931522734938511578621919200127617695687688253117503249700081649392865751170798641057262918747701964144750921453213495958143794292138060406768232483856137772884423724738885173317941639820406117529117231502825875770318376219865637701921510163983581939693095283860148825825534317915027935227284720688659076002763715470323530021291283104622451908331950479367824542183280750728287143045315009454555036587608541029041452261370126007254002380594495692336017083043759122768439918205218873818629834204995461233593857758205150383879753355587871143281318868486787689609264931061647669095672365229563972605657851107334935642927423143643881700288941468447935421710157297153923412413054946345177587214838188479804660936439696004004491056897103911980508152694180059848449334678739006600804683723366263833974938351931883900108148303218623223753804733841368217638047435229934014969836405210983140739314647463032526390858461054470687735389839160621104918776320132507152047920559825601469636794046006261948019979783648544423396466313007692608442173640931393107621536390112471507030765383629189434610692600649362994980363310282149643173463320951022348518530631624634601468844252689192035865752817064687057435465134724754356732855564209603586877240860799519825123063607791211526713597621460988269112462604961789884909904403305840417784014145131024148850570177648528264593897946966480687374628121122527011764741841494994973680355695453889910909918435109737960561134920161221030989177356298098230996770064042516750599265202050604665765827847153026910421283403691652963185733068725040932185933182565218980592698731253071701288114830270426609066387847094922372835694110690796117157804770759870201932022725881176574534331662144583505504252704210704204455485237637649889794847505753986442186889856210823034791436687397529246760542879223902686125555753

Execution Trace

ProxyRegistry.CALL( )
  • DSProxyFactory.build( owner=0x7B570Ed96c864340c02768645BD09BB9382fe1Ec ) => ( proxy=0xA6EB956E86d601F0743b3037856ff33BFfD09DC9 )
    • DSProxy.60806040( )
    • DSProxy.setOwner( owner_=0x7B570Ed96c864340c02768645BD09BB9382fe1Ec )
      File 1 of 3: ProxyRegistry
      // proxy.sol - execute actions atomically through the proxy's identity
      
      // Copyright (C) 2017  DappHub, LLC
      
      // This program is free software: you can redistribute it and/or modify
      // it under the terms of the GNU General Public License as published by
      // the Free Software Foundation, either version 3 of the License, or
      // (at your option) any later version.
      
      // This program is distributed in the hope that it will be useful,
      // but WITHOUT ANY WARRANTY; without even the implied warranty of
      // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      // GNU General Public License for more details.
      
      // You should have received a copy of the GNU General Public License
      // along with this program.  If not, see <http://www.gnu.org/licenses/>.
      
      pragma solidity ^0.4.23;
      
      contract DSAuthority {
          function canCall(
              address src, address dst, bytes4 sig
          ) public view returns (bool);
      }
      
      contract DSAuthEvents {
          event LogSetAuthority (address indexed authority);
          event LogSetOwner     (address indexed owner);
      }
      
      contract DSAuth is DSAuthEvents {
          DSAuthority  public  authority;
          address      public  owner;
      
          constructor() public {
              owner = msg.sender;
              emit LogSetOwner(msg.sender);
          }
      
          function setOwner(address owner_)
              public
              auth
          {
              owner = owner_;
              emit LogSetOwner(owner);
          }
      
          function setAuthority(DSAuthority authority_)
              public
              auth
          {
              authority = authority_;
              emit LogSetAuthority(authority);
          }
      
          modifier auth {
              require(isAuthorized(msg.sender, msg.sig));
              _;
          }
      
          function isAuthorized(address src, bytes4 sig) internal view returns (bool) {
              if (src == address(this)) {
                  return true;
              } else if (src == owner) {
                  return true;
              } else if (authority == DSAuthority(0)) {
                  return false;
              } else {
                  return authority.canCall(src, this, sig);
              }
          }
      }
      
      contract DSNote {
          event LogNote(
              bytes4   indexed  sig,
              address  indexed  guy,
              bytes32  indexed  foo,
              bytes32  indexed  bar,
              uint              wad,
              bytes             fax
          ) anonymous;
      
          modifier note {
              bytes32 foo;
              bytes32 bar;
      
              assembly {
                  foo := calldataload(4)
                  bar := calldataload(36)
              }
      
              emit LogNote(msg.sig, msg.sender, foo, bar, msg.value, msg.data);
      
              _;
          }
      }
      
      // DSProxy
      // Allows code execution using a persistant identity This can be very
      // useful to execute a sequence of atomic actions. Since the owner of
      // the proxy can be changed, this allows for dynamic ownership models
      // i.e. a multisig
      contract DSProxy is DSAuth, DSNote {
          DSProxyCache public cache;  // global cache for contracts
      
          constructor(address _cacheAddr) public {
              require(setCache(_cacheAddr));
          }
      
          function() public payable {
          }
      
          // use the proxy to execute calldata _data on contract _code
          function execute(bytes _code, bytes _data)
              public
              payable
              returns (address target, bytes32 response)
          {
              target = cache.read(_code);
              if (target == 0x0) {
                  // deploy contract & store its address in cache
                  target = cache.write(_code);
              }
      
              response = execute(target, _data);
          }
      
          function execute(address _target, bytes _data)
              public
              auth
              note
              payable
              returns (bytes32 response)
          {
              require(_target != 0x0);
      
              // call contract in current context
              assembly {
                  let succeeded := delegatecall(sub(gas, 5000), _target, add(_data, 0x20), mload(_data), 0, 32)
                  response := mload(0)      // load delegatecall output
                  switch iszero(succeeded)
                  case 1 {
                      // throw if delegatecall failed
                      revert(0, 0)
                  }
              }
          }
      
          //set new cache
          function setCache(address _cacheAddr)
              public
              auth
              note
              returns (bool)
          {
              require(_cacheAddr != 0x0);        // invalid cache address
              cache = DSProxyCache(_cacheAddr);  // overwrite cache
              return true;
          }
      }
      
      // DSProxyFactory
      // This factory deploys new proxy instances through build()
      // Deployed proxy addresses are logged
      contract DSProxyFactory {
          event Created(address indexed sender, address indexed owner, address proxy, address cache);
          mapping(address=>bool) public isProxy;
          DSProxyCache public cache = new DSProxyCache();
      
          // deploys a new proxy instance
          // sets owner of proxy to caller
          function build() public returns (DSProxy proxy) {
              proxy = build(msg.sender);
          }
      
          // deploys a new proxy instance
          // sets custom owner of proxy
          function build(address owner) public returns (DSProxy proxy) {
              proxy = new DSProxy(cache);
              emit Created(msg.sender, owner, address(proxy), address(cache));
              proxy.setOwner(owner);
              isProxy[proxy] = true;
          }
      }
      
      // DSProxyCache
      // This global cache stores addresses of contracts previously deployed
      // by a proxy. This saves gas from repeat deployment of the same
      // contracts and eliminates blockchain bloat.
      
      // By default, all proxies deployed from the same factory store
      // contracts in the same cache. The cache a proxy instance uses can be
      // changed.  The cache uses the sha3 hash of a contract's bytecode to
      // lookup the address
      contract DSProxyCache {
          mapping(bytes32 => address) cache;
      
          function read(bytes _code) public view returns (address) {
              bytes32 hash = keccak256(_code);
              return cache[hash];
          }
      
          function write(bytes _code) public returns (address target) {
              assembly {
                  target := create(0, add(_code, 0x20), mload(_code))
                  switch iszero(extcodesize(target))
                  case 1 {
                      // throw if contract failed to deploy
                      revert(0, 0)
                  }
              }
              bytes32 hash = keccak256(_code);
              cache[hash] = target;
          }
      }
      
      // ProxyRegistry
      // This Registry deploys new proxy instances through DSProxyFactory.build(address) and keeps a registry of owner => proxy
      contract ProxyRegistry {
          mapping(address => DSProxy) public proxies;
          DSProxyFactory factory;
      
          constructor(DSProxyFactory factory_) public {
              factory = factory_;
          }
      
          // deploys a new proxy instance
          // sets owner of proxy to caller
          function build() public returns (DSProxy proxy) {
              proxy = build(msg.sender);
          }
      
          // deploys a new proxy instance
          // sets custom owner of proxy
          function build(address owner) public returns (DSProxy proxy) {
              require(proxies[owner] == DSProxy(0) || proxies[owner].owner() != owner); // Not allow new proxy if the user already has one and remains being the owner
              proxy = factory.build(owner);
              proxies[owner] = proxy;
          }
      }

      File 2 of 3: DSProxy
      // proxy.sol - execute actions atomically through the proxy's identity
      
      // Copyright (C) 2017  DappHub, LLC
      
      // This program is free software: you can redistribute it and/or modify
      // it under the terms of the GNU General Public License as published by
      // the Free Software Foundation, either version 3 of the License, or
      // (at your option) any later version.
      
      // This program is distributed in the hope that it will be useful,
      // but WITHOUT ANY WARRANTY; without even the implied warranty of
      // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      // GNU General Public License for more details.
      
      // You should have received a copy of the GNU General Public License
      // along with this program.  If not, see <http://www.gnu.org/licenses/>.
      
      pragma solidity ^0.4.23;
      
      contract DSAuthority {
          function canCall(
              address src, address dst, bytes4 sig
          ) public view returns (bool);
      }
      
      contract DSAuthEvents {
          event LogSetAuthority (address indexed authority);
          event LogSetOwner     (address indexed owner);
      }
      
      contract DSAuth is DSAuthEvents {
          DSAuthority  public  authority;
          address      public  owner;
      
          constructor() public {
              owner = msg.sender;
              emit LogSetOwner(msg.sender);
          }
      
          function setOwner(address owner_)
              public
              auth
          {
              owner = owner_;
              emit LogSetOwner(owner);
          }
      
          function setAuthority(DSAuthority authority_)
              public
              auth
          {
              authority = authority_;
              emit LogSetAuthority(authority);
          }
      
          modifier auth {
              require(isAuthorized(msg.sender, msg.sig));
              _;
          }
      
          function isAuthorized(address src, bytes4 sig) internal view returns (bool) {
              if (src == address(this)) {
                  return true;
              } else if (src == owner) {
                  return true;
              } else if (authority == DSAuthority(0)) {
                  return false;
              } else {
                  return authority.canCall(src, this, sig);
              }
          }
      }
      
      contract DSNote {
          event LogNote(
              bytes4   indexed  sig,
              address  indexed  guy,
              bytes32  indexed  foo,
              bytes32  indexed  bar,
              uint              wad,
              bytes             fax
          ) anonymous;
      
          modifier note {
              bytes32 foo;
              bytes32 bar;
      
              assembly {
                  foo := calldataload(4)
                  bar := calldataload(36)
              }
      
              emit LogNote(msg.sig, msg.sender, foo, bar, msg.value, msg.data);
      
              _;
          }
      }
      
      // DSProxy
      // Allows code execution using a persistant identity This can be very
      // useful to execute a sequence of atomic actions. Since the owner of
      // the proxy can be changed, this allows for dynamic ownership models
      // i.e. a multisig
      contract DSProxy is DSAuth, DSNote {
          DSProxyCache public cache;  // global cache for contracts
      
          constructor(address _cacheAddr) public {
              require(setCache(_cacheAddr));
          }
      
          function() public payable {
          }
      
          // use the proxy to execute calldata _data on contract _code
          function execute(bytes _code, bytes _data)
              public
              payable
              returns (address target, bytes32 response)
          {
              target = cache.read(_code);
              if (target == 0x0) {
                  // deploy contract & store its address in cache
                  target = cache.write(_code);
              }
      
              response = execute(target, _data);
          }
      
          function execute(address _target, bytes _data)
              public
              auth
              note
              payable
              returns (bytes32 response)
          {
              require(_target != 0x0);
      
              // call contract in current context
              assembly {
                  let succeeded := delegatecall(sub(gas, 5000), _target, add(_data, 0x20), mload(_data), 0, 32)
                  response := mload(0)      // load delegatecall output
                  switch iszero(succeeded)
                  case 1 {
                      // throw if delegatecall failed
                      revert(0, 0)
                  }
              }
          }
      
          //set new cache
          function setCache(address _cacheAddr)
              public
              auth
              note
              returns (bool)
          {
              require(_cacheAddr != 0x0);        // invalid cache address
              cache = DSProxyCache(_cacheAddr);  // overwrite cache
              return true;
          }
      }
      
      // DSProxyFactory
      // This factory deploys new proxy instances through build()
      // Deployed proxy addresses are logged
      contract DSProxyFactory {
          event Created(address indexed sender, address indexed owner, address proxy, address cache);
          mapping(address=>bool) public isProxy;
          DSProxyCache public cache = new DSProxyCache();
      
          // deploys a new proxy instance
          // sets owner of proxy to caller
          function build() public returns (DSProxy proxy) {
              proxy = build(msg.sender);
          }
      
          // deploys a new proxy instance
          // sets custom owner of proxy
          function build(address owner) public returns (DSProxy proxy) {
              proxy = new DSProxy(cache);
              emit Created(msg.sender, owner, address(proxy), address(cache));
              proxy.setOwner(owner);
              isProxy[proxy] = true;
          }
      }
      
      // DSProxyCache
      // This global cache stores addresses of contracts previously deployed
      // by a proxy. This saves gas from repeat deployment of the same
      // contracts and eliminates blockchain bloat.
      
      // By default, all proxies deployed from the same factory store
      // contracts in the same cache. The cache a proxy instance uses can be
      // changed.  The cache uses the sha3 hash of a contract's bytecode to
      // lookup the address
      contract DSProxyCache {
          mapping(bytes32 => address) cache;
      
          function read(bytes _code) public view returns (address) {
              bytes32 hash = keccak256(_code);
              return cache[hash];
          }
      
          function write(bytes _code) public returns (address target) {
              assembly {
                  target := create(0, add(_code, 0x20), mload(_code))
                  switch iszero(extcodesize(target))
                  case 1 {
                      // throw if contract failed to deploy
                      revert(0, 0)
                  }
              }
              bytes32 hash = keccak256(_code);
              cache[hash] = target;
          }
      }

      File 3 of 3: DSProxyFactory
      // proxy.sol - execute actions atomically through the proxy's identity
      
      // Copyright (C) 2017  DappHub, LLC
      
      // This program is free software: you can redistribute it and/or modify
      // it under the terms of the GNU General Public License as published by
      // the Free Software Foundation, either version 3 of the License, or
      // (at your option) any later version.
      
      // This program is distributed in the hope that it will be useful,
      // but WITHOUT ANY WARRANTY; without even the implied warranty of
      // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      // GNU General Public License for more details.
      
      // You should have received a copy of the GNU General Public License
      // along with this program.  If not, see <http://www.gnu.org/licenses/>.
      
      pragma solidity ^0.4.23;
      
      contract DSAuthority {
          function canCall(
              address src, address dst, bytes4 sig
          ) public view returns (bool);
      }
      
      contract DSAuthEvents {
          event LogSetAuthority (address indexed authority);
          event LogSetOwner     (address indexed owner);
      }
      
      contract DSAuth is DSAuthEvents {
          DSAuthority  public  authority;
          address      public  owner;
      
          constructor() public {
              owner = msg.sender;
              emit LogSetOwner(msg.sender);
          }
      
          function setOwner(address owner_)
              public
              auth
          {
              owner = owner_;
              emit LogSetOwner(owner);
          }
      
          function setAuthority(DSAuthority authority_)
              public
              auth
          {
              authority = authority_;
              emit LogSetAuthority(authority);
          }
      
          modifier auth {
              require(isAuthorized(msg.sender, msg.sig));
              _;
          }
      
          function isAuthorized(address src, bytes4 sig) internal view returns (bool) {
              if (src == address(this)) {
                  return true;
              } else if (src == owner) {
                  return true;
              } else if (authority == DSAuthority(0)) {
                  return false;
              } else {
                  return authority.canCall(src, this, sig);
              }
          }
      }
      
      contract DSNote {
          event LogNote(
              bytes4   indexed  sig,
              address  indexed  guy,
              bytes32  indexed  foo,
              bytes32  indexed  bar,
              uint              wad,
              bytes             fax
          ) anonymous;
      
          modifier note {
              bytes32 foo;
              bytes32 bar;
      
              assembly {
                  foo := calldataload(4)
                  bar := calldataload(36)
              }
      
              emit LogNote(msg.sig, msg.sender, foo, bar, msg.value, msg.data);
      
              _;
          }
      }
      
      // DSProxy
      // Allows code execution using a persistant identity This can be very
      // useful to execute a sequence of atomic actions. Since the owner of
      // the proxy can be changed, this allows for dynamic ownership models
      // i.e. a multisig
      contract DSProxy is DSAuth, DSNote {
          DSProxyCache public cache;  // global cache for contracts
      
          constructor(address _cacheAddr) public {
              require(setCache(_cacheAddr));
          }
      
          function() public payable {
          }
      
          // use the proxy to execute calldata _data on contract _code
          function execute(bytes _code, bytes _data)
              public
              payable
              returns (address target, bytes32 response)
          {
              target = cache.read(_code);
              if (target == 0x0) {
                  // deploy contract & store its address in cache
                  target = cache.write(_code);
              }
      
              response = execute(target, _data);
          }
      
          function execute(address _target, bytes _data)
              public
              auth
              note
              payable
              returns (bytes32 response)
          {
              require(_target != 0x0);
      
              // call contract in current context
              assembly {
                  let succeeded := delegatecall(sub(gas, 5000), _target, add(_data, 0x20), mload(_data), 0, 32)
                  response := mload(0)      // load delegatecall output
                  switch iszero(succeeded)
                  case 1 {
                      // throw if delegatecall failed
                      revert(0, 0)
                  }
              }
          }
      
          //set new cache
          function setCache(address _cacheAddr)
              public
              auth
              note
              returns (bool)
          {
              require(_cacheAddr != 0x0);        // invalid cache address
              cache = DSProxyCache(_cacheAddr);  // overwrite cache
              return true;
          }
      }
      
      // DSProxyFactory
      // This factory deploys new proxy instances through build()
      // Deployed proxy addresses are logged
      contract DSProxyFactory {
          event Created(address indexed sender, address indexed owner, address proxy, address cache);
          mapping(address=>bool) public isProxy;
          DSProxyCache public cache = new DSProxyCache();
      
          // deploys a new proxy instance
          // sets owner of proxy to caller
          function build() public returns (DSProxy proxy) {
              proxy = build(msg.sender);
          }
      
          // deploys a new proxy instance
          // sets custom owner of proxy
          function build(address owner) public returns (DSProxy proxy) {
              proxy = new DSProxy(cache);
              emit Created(msg.sender, owner, address(proxy), address(cache));
              proxy.setOwner(owner);
              isProxy[proxy] = true;
          }
      }
      
      // DSProxyCache
      // This global cache stores addresses of contracts previously deployed
      // by a proxy. This saves gas from repeat deployment of the same
      // contracts and eliminates blockchain bloat.
      
      // By default, all proxies deployed from the same factory store
      // contracts in the same cache. The cache a proxy instance uses can be
      // changed.  The cache uses the sha3 hash of a contract's bytecode to
      // lookup the address
      contract DSProxyCache {
          mapping(bytes32 => address) cache;
      
          function read(bytes _code) public view returns (address) {
              bytes32 hash = keccak256(_code);
              return cache[hash];
          }
      
          function write(bytes _code) public returns (address target) {
              assembly {
                  target := create(0, add(_code, 0x20), mload(_code))
                  switch iszero(extcodesize(target))
                  case 1 {
                      // throw if contract failed to deploy
                      revert(0, 0)
                  }
              }
              bytes32 hash = keccak256(_code);
              cache[hash] = target;
          }
      }