Forkchoice Ethereum Mainnet

Address Contract Partially Verified

Address 0x17BdbacD23D223e1bEEcb95705D0db92b4a2a0dA
Balance 0 ETH
Nonce 1
Code Size 4163 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

4163 bytes
0x60806040526004361061009e576000357c0100000000000000000000000000000000000000000000000000000000900480633968c82f146100a35780634b9567171461017457806353863613146101cb578063715018a61461021c5780638da5cb5b146102335780638f32d59b1461028a578063adb610a3146102b9578063c4a31da1146102e4578063deec2bb8146103e7578063f2fde38b14610436575b600080fd5b3480156100af57600080fd5b50610172600480360360c08110156100c657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019064010000000081111561010357600080fd5b82018360208201111561011557600080fd5b8035906020019184602083028401116401000000008311171561013757600080fd5b909192939192939080359060200190929190803560ff1690602001909291908035906020019092919080359060200190929190505050610487565b005b34801561018057600080fd5b50610189610831565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156101d757600080fd5b5061021a600480360360208110156101ee57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061085b565b005b34801561022857600080fd5b506102316109a0565b005b34801561023f57600080fd5b50610248610adb565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561029657600080fd5b5061029f610b04565b604051808215151515815260200191505060405180910390f35b3480156102c557600080fd5b506102ce610b5b565b6040518082815260200191505060405180910390f35b3480156102f057600080fd5b506103d16004803603606081101561030757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019064010000000081111561034457600080fd5b82018360208201111561035657600080fd5b8035906020019184602083028401116401000000008311171561037857600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050919291929080359060200190929190505050610b61565b6040518082815260200191505060405180910390f35b3480156103f357600080fd5b506104206004803603602081101561040a57600080fd5b8101908080359060200190929190505050610c10565b6040518082815260200191505060405180910390f35b34801561044257600080fd5b506104856004803603602081101561045957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610cd0565b005b60006104d588888880806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505087610b61565b90506104e381858585610d58565b1515610557576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f496e76616c69642053696700000000000000000000000000000000000000000081525060200191505060405180910390fd5b6105a2878780806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505086610e28565b1515610616576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4e6f6e636520746f206c6f77000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008090505b878790508110156106605785600560008a8a85818110151561063a57fe5b90506020020135815260200190815260200160002081905550808060010191505061061c565b50600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633dcbeb0060035489898c6040518563ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180858152602001806020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281038252858582818152602001925060200280828437600081840152601f19601f82011690508083019250505095505050505050600060405180830381600087803b15801561075f57600080fd5b505af1158015610773573d6000803e3d6000fd5b505050508460065411151561078d57600185016006819055505b7f9dd8ca09252847f526a1678d0066151636f5203cdf46ca3d59d3356f871384b9888888604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001806020018281038252848482818152602001925060200280828437600081840152601f19601f82011690508083019250505094505050505060405180910390a15050505050505050565b6000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610863610b04565b15156108d7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507ffc1c7ce1459ebedbe6d9641b1684975d64030d5ad3943cdd749b19922821322e600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a150565b6109a8610b04565b1515610a1c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614905090565b60065481565b6000838383604051602001808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001838152602001828103825284818151815260200191508051906020019060200280838360005b83811015610be4578082015181840152602081019050610bc9565b505050509050019450505050506040516020818303038152906040528051906020012090509392505050565b600060606040805190810160405280601c81526020017f19457468657265756d205369676e6564204d6573736167653a0a333200000000815250905080836040516020018083805190602001908083835b602083101515610c865780518252602082019150602081019050602083039250610c61565b6001836020036101000a0380198251168184511680821785525050505050509050018281526020019250505060405160208183030381529060405280519060200120915050919050565b610cd8610b04565b1515610d4c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b610d5581610e8e565b50565b600080610d6486610c10565b9050600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660018287878760405160008152602001604052604051808581526020018460ff1660ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa158015610dfc573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff1614915050949350505050565b600080600090505b8351811015610e825782600560008684815181101515610e4c57fe5b906020019060200201518152602001908152602001600020541115610e75576000915050610e88565b8080600101915050610e30565b50600190505b92915050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515610f59576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001807f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206181526020017f646472657373000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505056fea165627a7a7230582035152fabd0344327d7b4529baa169a1846d6469a3f2562d0b98794f26e3f71720029

Verified Source Code Partial Match

Compiler: v0.5.1+commit.c8a2cb62 EVM: byzantium Optimization: No
AetheriaFirstStageProxy.sol 274 lines
// File: node_modules\openzeppelin-solidity\contracts\ownership\Ownable.sol

pragma solidity ^0.5.0;

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be aplied to your functions to restrict their use to
 * the owner.
 */
contract Ownable {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor () internal {
        _owner = msg.sender;
        emit OwnershipTransferred(address(0), _owner);
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(isOwner(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Returns true if the caller is the current owner.
     */
    function isOwner() public view returns (bool) {
        return msg.sender == _owner;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * > Note: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public onlyOwner {
        emit OwnershipTransferred(_owner, address(0));
        _owner = address(0);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public onlyOwner {
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     */
    function _transferOwnership(address newOwner) internal {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}

// File: contracts\LAND\ILANDRegistry.sol

// solium-disable linebreak-style
pragma solidity ^0.5.0;

interface ILANDRegistry {

  // LAND can be assigned by the owner
  function assignNewParcel(int x, int y, address beneficiary) external;
  function assignMultipleParcels(int[] calldata x, int[] calldata y, address beneficiary) external;

  // After one year, LAND can be claimed from an inactive public key
  function ping() external;

  // LAND-centric getters
  function encodeTokenId(int x, int y) external pure returns (uint256);
  function decodeTokenId(uint value) external pure returns (int, int);
  function exists(int x, int y) external view returns (bool);
  function ownerOfLand(int x, int y) external view returns (address);
  function ownerOfLandMany(int[] calldata x, int[] calldata y) external view returns (address[] memory);
  function landOf(address owner) external view returns (int[] memory, int[] memory);
  function landData(int x, int y) external view returns (string memory);

  // Transfer LAND
  function transferLand(int x, int y, address to) external;
  function transferManyLand(int[] calldata x, int[] calldata y, address to) external;

  // Update LAND
  function updateLandData(int x, int y, string calldata data) external;
  function updateManyLandData(int[] calldata x, int[] calldata y, string calldata data) external;

  //operators
  function setUpdateOperator(uint256 assetId, address operator) external;

  // Events

  event Update(
    uint256 indexed assetId,
    address indexed holder,
    address indexed operator,
    string data
  );

  event UpdateOperator(
    uint256 indexed assetId,
    address indexed operator
  );

  event DeployAuthorized(
    address indexed _caller,
    address indexed _deployer
  );

  event DeployForbidden(
    address indexed _caller,
    address indexed _deployer
  );
}

// File: contracts\LAND\IEstateRegistry.sol

pragma solidity ^0.5.0;


contract IEstateRegistry {
  function mint(address to, string calldata metadata) external returns (uint256);
  function ownerOf(uint256 _tokenId) public view returns (address _owner); // from ERC721
  function setManyLandUpdateOperator(uint256 _estateId, uint256[] memory _landIds, address _operator) public;

  // Events
  event CreateEstate(
    address indexed _owner,
    uint256 indexed _estateId,
    string _data
  );

  event AddLand(
    uint256 indexed _estateId,
    uint256 indexed _landId
  );

  event RemoveLand(
    uint256 indexed _estateId,
    uint256 indexed _landId,
    address indexed _destinatary
  );

  event Update(
    uint256 indexed _assetId,
    address indexed _holder,
    address indexed _operator,
    string _data
  );

  event UpdateOperator(
    uint256 indexed _estateId,
    address indexed _operator
  );

  event UpdateManager(
    address indexed _owner,
    address indexed _operator,
    address indexed _caller,
    bool _approved
  );

  event SetLANDRegistry(
    address indexed _registry
  );
}

// File: contracts\AetheriaFirstStageProxy.sol

pragma solidity ^0.5.0;




contract AetheriaFirstStageProxy is Ownable {
    ILANDRegistry private landContract;
	IEstateRegistry private estateContract;
	uint256 private estateId;
	address private delegatedSigner;
	mapping(uint256 => uint) private replayProtection;
	uint public currentNonce;

	constructor (address landContractAddress, address estateContractAddress, uint256 _estateId) public {
        landContract = ILANDRegistry(landContractAddress);
		estateContract = IEstateRegistry(estateContractAddress);
		estateId = _estateId;
		delegatedSigner = owner();
		currentNonce = 1;
    }

	function _isReplayProtectionValid(uint256[] memory plotIds, uint nonce) private view returns (bool) {
		for(uint i = 0; i < plotIds.length; i++) {
			if(replayProtection[plotIds[i]] > nonce) {
				return false;
			}
		}
		return true;
	}

	function setDelegatedSigner(address newDelegate) external onlyOwner {
		delegatedSigner = newDelegate;
		emit DelegateChanged(delegatedSigner);
	}

	function getDelegatedSigner() public view returns (address ){
		return delegatedSigner;
	}

	function getMessageHash(address userAddress, uint256[] memory plotIds, uint nonce) public pure returns (bytes32)
	{
		return keccak256(abi.encode(userAddress, plotIds, nonce));
	}

	function buildPrefixedHash(bytes32 msgHash) public pure returns (bytes32)
	{
		bytes memory prefix = "\x19Ethereum Signed Message:\n32";
		return keccak256(abi.encodePacked(prefix, msgHash));
	}

	function verifySender(bytes32 msgHash, uint8 _v, bytes32 _r, bytes32 _s) private view returns (bool)
	{
		bytes32 prefixedHash = buildPrefixedHash(msgHash);
		return ecrecover(prefixedHash, _v, _r, _s) == delegatedSigner;
	}

	function updatePlot(address userAddress, uint256[] calldata plotIds, uint nonce, uint8 _v, bytes32 _r, bytes32 _s) external {
		bytes32 msgHash = getMessageHash(userAddress, plotIds, nonce);
		require(verifySender(msgHash, _v, _r, _s), "Invalid Sig");
		require(_isReplayProtectionValid(plotIds, nonce), "Nonce to low");
        for (uint i = 0; i<plotIds.length; i++) {
			replayProtection[plotIds[i]] = nonce;
        }
		estateContract.setManyLandUpdateOperator(estateId, plotIds, userAddress);
        if (currentNonce <= nonce)
        {
            currentNonce = nonce+1;
        }
		emit PlotOwnerUpdate(
			userAddress,
			plotIds
		);
	}

	event DelegateChanged(
		address newDelegatedAddress
	);

	event PlotOwnerUpdate(
		address newOperator,
		uint256[] plotIds
	);
}

Read Contract

buildPrefixedHash 0xdeec2bb8 → bytes32
currentNonce 0xadb610a3 → uint256
getDelegatedSigner 0x4b956717 → address
getMessageHash 0xc4a31da1 → bytes32
isOwner 0x8f32d59b → bool
owner 0x8da5cb5b → address

Write Contract 4 functions

These functions modify contract state and require a wallet transaction to execute.

renounceOwnership 0x715018a6
No parameters
setDelegatedSigner 0x53863613
address newDelegate
transferOwnership 0xf2fde38b
address newOwner
updatePlot 0x3968c82f
address userAddress
uint256[] plotIds
uint256 nonce
uint8 _v
bytes32 _r
bytes32 _s

Recent Transactions

No transactions found for this address