Source Code
Overview
ETH Balance
0 ETH
More Info
ContractCreator
Multichain Info
N/A
Loading...
Loading
Contract Name:
Yaru
Compiler Version
v0.8.20+commit.a1b79de6
Optimization Enabled:
Yes with 10000 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: LGPL-3.0-only
pragma solidity ^0.8.20;
import { ReentrancyGuard } from "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import { IYaru } from "./interfaces/IYaru.sol";
import { IHashi, IAdapter } from "./interfaces/IHashi.sol";
import { Message } from "./interfaces/IMessage.sol";
import { MessageIdCalculator } from "./utils/MessageIdCalculator.sol";
import { MessageHashCalculator } from "./utils/MessageHashCalculator.sol";
import { IJushin } from "./interfaces/IJushin.sol";
contract Yaru is IYaru, MessageIdCalculator, MessageHashCalculator, ReentrancyGuard {
address public immutable HASHI;
address public immutable YAHO;
uint256 public immutable SOURCE_CHAIN_ID;
mapping(uint256 => bool) public executed;
constructor(address hashi, address yaho_, uint256 sourceChainId) {
HASHI = hashi;
YAHO = yaho_;
SOURCE_CHAIN_ID = sourceChainId;
}
/// @inheritdoc IYaru
function executeMessages(Message[] calldata messages) external nonReentrant returns (bytes[] memory) {
bytes[] memory returnDatas = new bytes[](messages.length);
for (uint256 i = 0; i < messages.length; ) {
Message memory message = messages[i];
bytes32 messageHash = calculateMessageHash(message);
uint256 messageId = calculateMessageId(SOURCE_CHAIN_ID, YAHO, messageHash);
if (message.targetChainId != block.chainid) revert InvalidToChainId(message.targetChainId, block.chainid);
if (executed[messageId]) revert MessageIdAlreadyExecuted(messageId);
executed[messageId] = true;
if (
!IHashi(HASHI).checkHashWithThresholdFromAdapters(
SOURCE_CHAIN_ID,
messageId,
message.threshold,
message.adapters
)
) revert ThresholdNotMet();
try
IJushin(message.receiver).onMessage(
messageId,
SOURCE_CHAIN_ID,
message.sender,
message.threshold,
message.adapters,
message.data
)
returns (bytes memory returnData) {
returnDatas[i] = returnData;
} catch {
revert CallFailed();
}
emit MessageExecuted(messageId, message);
unchecked {
++i;
}
}
return returnDatas;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol)
pragma solidity ^0.8.0;
/**
* @dev Contract module that helps prevent reentrant calls to a function.
*
* Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
* available, which can be applied to functions to make sure there are no nested
* (reentrant) calls to them.
*
* Note that because there is a single `nonReentrant` guard, functions marked as
* `nonReentrant` may not call one another. This can be worked around by making
* those functions `private`, and then adding `external` `nonReentrant` entry
* points to them.
*
* TIP: If you would like to learn more about reentrancy and alternative ways
* to protect against it, check out our blog post
* https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
*/
abstract contract ReentrancyGuard {
// Booleans are more expensive than uint256 or any type that takes up a full
// word because each write operation emits an extra SLOAD to first read the
// slot's contents, replace the bits taken up by the boolean, and then write
// back. This is the compiler's defense against contract upgrades and
// pointer aliasing, and it cannot be disabled.
// The values being non-zero value makes deployment a bit more expensive,
// but in exchange the refund on every call to nonReentrant will be lower in
// amount. Since refunds are capped to a percentage of the total
// transaction's gas, it is best to keep them low in cases like this one, to
// increase the likelihood of the full refund coming into effect.
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor() {
_status = _NOT_ENTERED;
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and making it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
_nonReentrantBefore();
_;
_nonReentrantAfter();
}
function _nonReentrantBefore() private {
// On the first call to nonReentrant, _status will be _NOT_ENTERED
require(_status != _ENTERED, "ReentrancyGuard: reentrant call");
// Any calls to nonReentrant after this point will fail
_status = _ENTERED;
}
function _nonReentrantAfter() private {
// By storing the original value once again, a refund is triggered (see
// https://eips.ethereum.org/EIPS/eip-2200)
_status = _NOT_ENTERED;
}
/**
* @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
* `nonReentrant` function in the call stack.
*/
function _reentrancyGuardEntered() internal view returns (bool) {
return _status == _ENTERED;
}
}// SPDX-License-Identifier: LGPL-3.0-only
pragma solidity ^0.8.0;
/**
* @title IAdapter
*/
interface IAdapter {
error ConflictingBlockHeader(uint256 blockNumber, bytes32 blockHash, bytes32 storedBlockHash);
error InvalidBlockHeaderRLP();
/**
* @dev Emitted when a hash is stored.
* @param id - The ID of the stored hash.
* @param hash - The stored hash as bytes32 values.
*/
event HashStored(uint256 indexed id, bytes32 indexed hash);
/**
* @dev Returns the hash for a given ID.
* @param domain - Identifier for the domain to query.
* @param id - Identifier for the ID to query.
* @return hash Bytes32 hash for the given ID on the given domain.
* @notice MUST return bytes32(0) if the hash is not present.
*/
function getHash(uint256 domain, uint256 id) external view returns (bytes32 hash);
}// SPDX-License-Identifier: LGPL-3.0-only
pragma solidity ^0.8.0;
import { IAdapter } from "./IAdapter.sol";
/**
* @title IHashi
*/
interface IHashi {
error AdaptersDisagree(IAdapter adapterOne, IAdapter adapterTwo);
error HashNotAvailableInAdapter(IAdapter adapter);
error InvalidThreshold(uint256 threshold, uint256 maxThreshold);
error NoAdaptersGiven();
/**
* @dev Checks whether the threshold is reached for a message given a set of adapters.
* @param domain - ID of the domain to query.
* @param id - ID for which to return hash.
* @param threshold - Threshold to use.
* @param adapters - Array of addresses for the adapters to query.
* @notice If the threshold is 1, it will always return true.
* @return result A boolean indicating if a threshold for a given message has been reached.
*/
function checkHashWithThresholdFromAdapters(
uint256 domain,
uint256 id,
uint256 threshold,
IAdapter[] calldata adapters
) external view returns (bool);
/**
* @dev Returns the hash stored by a given adapter for a given ID.
* @param domain - ID of the domain to query.
* @param id - ID for which to return a hash.
* @param adapter - Address of the adapter to query.
* @return hash stored by the given adapter for the given ID.
*/
function getHashFromAdapter(uint256 domain, uint256 id, IAdapter adapter) external view returns (bytes32);
/**
* @dev Returns the hashes for a given ID stored by a given set of adapters.
* @param domain - The ID of the domain to query.
* @param id - The ID for which to return hashes.
* @param adapters - An array of addresses for the adapters to query.
* @return hashes An array of hashes stored by the given adapters for the specified ID.
*/
function getHashesFromAdapters(
uint256 domain,
uint256 id,
IAdapter[] calldata adapters
) external view returns (bytes32[] memory);
/**
* @dev Returns the hash unanimously agreed upon by a given set of adapters.
* @param domain - The ID of the domain to query.
* @param id - The ID for which to return a hash.
* @param adapters - An array of addresses for the adapters to query.
* @return hash agreed on by the given set of adapters.
* @notice MUST revert if adapters disagree on the hash or if an adapter does not report.
*/
function getHash(uint256 domain, uint256 id, IAdapter[] calldata adapters) external view returns (bytes32);
}// SPDX-License-Identifier: LGPL-3.0-only
pragma solidity ^0.8.0;
import { IAdapter } from "./IAdapter.sol";
/**
* @title IJushin
*/
interface IJushin {
/**
* @dev Handles the incoming message from a specified chain.
* @param messageId - The unique identifier of the message.
* @param sourceChainId - The ID of the origin chain from which the message originates.
* @param sender - The address of the sender of the message on the origin chain.
* @param threshold - The minimum number of adapters required to have stored the same message.
* @param data - The data contained in the message, in bytes.
* @param adapters - An array of `IAdapter` contracts.
* @return result bytes at the user's choice
*/
function onMessage(
uint256 messageId,
uint256 sourceChainId,
address sender,
uint256 threshold,
IAdapter[] calldata adapters,
bytes calldata data
) external returns (bytes memory);
}// SPDX-License-Identifier: LGPL-3.0-only
pragma solidity ^0.8.0;
import { IReporter } from "./IReporter.sol";
import { IAdapter } from "./IAdapter.sol";
struct Message {
uint256 nonce;
uint256 targetChainId;
uint256 threshold;
address sender;
address receiver;
bytes data;
IReporter[] reporters;
IAdapter[] adapters;
}// SPDX-License-Identifier: LGPL-3.0-only
pragma solidity ^0.8.0;
import { Message } from "./IMessage.sol";
/**
* @title IMessageHashCalculator
*/
interface IMessageHashCalculator {
/**
* @dev Calculates and returns the hash of a given message.
* @param message - The `Message` structure containing various fields to be hashed.
* @return hash The keccak256 hash of the message, represented as a 32-byte hexadecimal string.
*/
function calculateMessageHash(Message memory message) external pure returns (bytes32);
}// SPDX-License-Identifier: LGPL-3.0-only
pragma solidity ^0.8.0;
/**
* @title IMessageIdCalculator
*/
interface IMessageIdCalculator {
/**
* @dev Calculates and returns a unique identifier (ID) for a message.
*
* @param sourceChainId - The ID of the chain from which the message originates.
* @param dispatcherAddress - The address of the dispatcher sending the message.
* @param messageHash - The keccak256 hash of the message, represented as a 32-byte hexadecimal string.
* @return messageId The unique identifier for the message, calculated based on the input parameters.
*/
function calculateMessageId(
uint256 sourceChainId,
address dispatcherAddress,
bytes32 messageHash
) external pure returns (uint256);
}// SPDX-License-Identifier: LGPL-3.0-only
pragma solidity ^0.8.0;
import { IAdapter } from "./IAdapter.sol";
interface IReporter {
error NotYaho(address sender, address expectedYaho);
/**
* @dev Emitted when a block is dispatched to another chain.
* @param targetChainId - The target chain's identifier associated with the dispatched block.
* @param adapter - The adapter address associated with the dispatched block.
* @param blockNumber - The block number associated with the dispatched block.
* @param blockHeader - The dispatched block header as a bytes32 value.
*/
event BlockDispatched(
uint256 indexed targetChainId,
IAdapter adapter,
uint256 indexed blockNumber,
bytes32 blockHeader
);
/**
* @dev Emitted when a message is dispatched to another chain.
* @param targetChainId - The target chain's identifier associated with the dispatched message.
* @param adapter - The adapter address associated with the dispatched message.
* @param messageId - The message identifier associated with the dispatched message.
* @param messageHash - The dispatched message hash as a bytes32 value.
*/
event MessageDispatched(
uint256 indexed targetChainId,
IAdapter adapter,
uint256 indexed messageId,
bytes32 messageHash
);
/**
* @dev Dispatches blocks to a given adapter on the target chaib.
* @param targetChainId - The target chain's Uint256 identifier.
* @param adapter - The adapter instance to use.
* @param blockNumbers - An array of Uint256 block numbers to dispatch.
* @notice blockNumbers must include block numbers that are greater than or equal to (currentBlock - 256) due to EVM limitations.
* @return result - The result returned by the adapter as bytes.
*/
function dispatchBlocks(
uint256 targetChainId,
IAdapter adapter,
uint256[] memory blockNumbers
) external payable returns (bytes32);
/**
* @dev Dispatches messages to a target chain using the specified adapter.
* @param targetChainId - The target chain's Uint256 identifier.
* @param adapter - The adapter instance to use.
* @param messageIds - An array of Uint256 message identifiers.
* @param messageHashes - An array of bytes32 message hashes.
* @notice This function can be called only by Yaho
* @return result - The result returned by the adapter as bytes.
*/
function dispatchMessages(
uint256 targetChainId,
IAdapter adapter,
uint256[] memory messageIds,
bytes32[] memory messageHashes
) external payable returns (bytes32);
}// SPDX-License-Identifier: LGPL-3.0-only
pragma solidity ^0.8.0;
import { Message } from "./IMessage.sol";
import { IMessageHashCalculator } from "./IMessageHashCalculator.sol";
import { IMessageIdCalculator } from "./IMessageIdCalculator.sol";
/**
* @title IYaru
*/
interface IYaru is IMessageHashCalculator, IMessageIdCalculator {
error CallFailed();
error InvalidToChainId(uint256 chainId, uint256 expectedChainId);
error MessageIdAlreadyExecuted(uint256 messageId);
error ThresholdNotMet();
/**
* @dev Emitted when a message is executed with its associated message ID and message object.
* @param messageId - The message ID associated with the executed message.
* @param message - The message object associated with this event.
*/
event MessageExecuted(uint256 indexed messageId, Message message);
/**
* @dev Executes a batch of messages and returns the results if the threshold for a single message has been reached
* @param messages - An array of `Message` structures
* @return result An array of byte arrays, where each byte array is the result of executing a respective message from the input.
*/
function executeMessages(Message[] calldata messages) external returns (bytes[] memory);
}// SPDX-License-Identifier: LGPL-3.0-only
pragma solidity ^0.8.20;
import { IMessageHashCalculator } from "../interfaces/IMessageHashCalculator.sol";
import { Message } from "../interfaces/IMessage.sol";
contract MessageHashCalculator is IMessageHashCalculator {
/// @inheritdoc IMessageHashCalculator
function calculateMessageHash(Message memory message) public pure returns (bytes32) {
return keccak256(abi.encode(message));
}
}// SPDX-License-Identifier: LGPL-3.0-only
pragma solidity ^0.8.20;
import { IMessageIdCalculator } from "../interfaces/IMessageIdCalculator.sol";
contract MessageIdCalculator is IMessageIdCalculator {
/// @inheritdoc IMessageIdCalculator
function calculateMessageId(
uint256 sourceChainId,
address dispatcherAddress,
bytes32 messageHash
) public pure returns (uint256) {
return uint256(keccak256(abi.encode(sourceChainId, dispatcherAddress, messageHash)));
}
}{
"viaIR": true,
"optimizer": {
"enabled": true,
"runs": 10000
},
"evmVersion": "paris",
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"libraries": {}
}Contract ABI
API[{"inputs":[{"internalType":"address","name":"hashi","type":"address"},{"internalType":"address","name":"yaho_","type":"address"},{"internalType":"uint256","name":"sourceChainId","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"CallFailed","type":"error"},{"inputs":[{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"uint256","name":"expectedChainId","type":"uint256"}],"name":"InvalidToChainId","type":"error"},{"inputs":[{"internalType":"uint256","name":"messageId","type":"uint256"}],"name":"MessageIdAlreadyExecuted","type":"error"},{"inputs":[],"name":"ThresholdNotMet","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"messageId","type":"uint256"},{"components":[{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"targetChainId","type":"uint256"},{"internalType":"uint256","name":"threshold","type":"uint256"},{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"contract IReporter[]","name":"reporters","type":"address[]"},{"internalType":"contract IAdapter[]","name":"adapters","type":"address[]"}],"indexed":false,"internalType":"struct Message","name":"message","type":"tuple"}],"name":"MessageExecuted","type":"event"},{"inputs":[],"name":"HASHI","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SOURCE_CHAIN_ID","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"YAHO","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"targetChainId","type":"uint256"},{"internalType":"uint256","name":"threshold","type":"uint256"},{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"contract IReporter[]","name":"reporters","type":"address[]"},{"internalType":"contract IAdapter[]","name":"adapters","type":"address[]"}],"internalType":"struct Message","name":"message","type":"tuple"}],"name":"calculateMessageHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"sourceChainId","type":"uint256"},{"internalType":"address","name":"dispatcherAddress","type":"address"},{"internalType":"bytes32","name":"messageHash","type":"bytes32"}],"name":"calculateMessageId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"targetChainId","type":"uint256"},{"internalType":"uint256","name":"threshold","type":"uint256"},{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"contract IReporter[]","name":"reporters","type":"address[]"},{"internalType":"contract IAdapter[]","name":"adapters","type":"address[]"}],"internalType":"struct Message[]","name":"messages","type":"tuple[]"}],"name":"executeMessages","outputs":[{"internalType":"bytes[]","name":"","type":"bytes[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"executed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]Contract Creation Code
60e0346100b457601f610e0138819003918201601f19168301916001600160401b038311848410176100b9578084926060946040528339810103126100b457610047816100cf565b906040610056602083016100cf565b91015191600160005560805260a05260c052604051610d1d90816100e4823960805181818161019e01526104d3015260a05181818160cf015261039e015260c05181818161010b015281816103bf0152818161047a01526105900152f35b600080fd5b634e487b7160e01b600052604160045260246000fd5b51906001600160a01b03821682036100b45756fe608080604052600436101561001357600080fd5b60003560e01c908163036a7954146102055750806331fa321b146101c2578063523d415a14610171578063543836b11461012e57806374be2150146100f35780639e83334b146100a25763d3ecebd71461006c57600080fd5b3461009d57602060031936011261009d576004356000526001602052602060ff604060002054166040519015158152f35b600080fd5b3461009d57600060031936011261009d57602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b3461009d57600060031936011261009d5760206040517f00000000000000000000000000000000000000000000000000000000000000008152f35b3461009d57602060031936011261009d5760043567ffffffffffffffff811161009d57610169610164602092369060040161092c565b610c6e565b604051908152f35b3461009d57600060031936011261009d57602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b3461009d57606060031936011261009d5760243573ffffffffffffffffffffffffffffffffffffffff8116810361009d5761016960209160443590600435610c97565b3461009d57602060031936011261009d5767ffffffffffffffff6004351161009d5736602360043501121561009d5767ffffffffffffffff600435600401351161009d573660246004356004013560051b60043501011161009d576002600054146107e157600260005561027e60043560040135610914565b61028b60405191826108a6565b600480350135808252601f19906102a190610914565b0160005b8181106107d0578260005b600435600401358110610343575060018060005560405190602082016020835283518091526040830190602060408260051b8601019501916000905b8282106102f95785870386f35b90919293602080610333897fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc08a869c030186528851610860565b98960194939190910191016102ec565b60248160051b6004350101357ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffedd60043536030181121561009d5761038f9060243691600435010161092c565b906103e361039c83610c6e565b7f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000610c97565b6020830151468103610799575080600052600160205260ff6040600020541661076857806000526001602052604060002060017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008254161790556104ba6020604085015160e08601519060405193849283927fb0bb1be40000000000000000000000000000000000000000000000000000000084527f000000000000000000000000000000000000000000000000000000000000000060048501528760248501526044840152608060648401526084830190610b12565b038173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa90811561075c57600091610721575b50156106f75782600073ffffffffffffffffffffffffffffffffffffffff60806105cf9601511673ffffffffffffffffffffffffffffffffffffffff6060840151169060408401518360e0860151936105e160a08801516040519b8c97889687957fd496af240000000000000000000000000000000000000000000000000000000087528d60048801527f000000000000000000000000000000000000000000000000000000000000000060248801526044870152606486015260c0608486015260c4850190610b12565b906003198483030160a4850152610860565b03925af160009481610670575b5061061d5760046040517f3204506f000000000000000000000000000000000000000000000000000000008152fd5b6106677fdd1bdfea38460565f157126e887f629eef09468d58dcb316e9b432eaabe1463a9160019561064f8689610b5c565b5261065a8588610b5c565b5060405191829182610b9f565b0390a2016102b0565b9094503d90816000823e61068482826108a6565b602081838101031261009d5780519067ffffffffffffffff821161009d57828101601f83830101121561009d5781810151906106bf826108f8565b936106cd60405195866108a6565b828552810160208385840101011161009d5760206106f09381860192010161083d565b93866105ee565b60046040517f59fa4a93000000000000000000000000000000000000000000000000000000008152fd5b90506020813d602011610754575b8161073c602093836108a6565b8101031261009d5751801515810361009d5785610504565b3d915061072f565b6040513d6000823e3d90fd5b602490604051907f5919bfee0000000000000000000000000000000000000000000000000000000082526004820152fd5b604490604051907f841022d50000000000000000000000000000000000000000000000000000000082526004820152466024820152fd5b8060606020809386010152016102a5565b807f08c379a0000000000000000000000000000000000000000000000000000000006064925260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152fd5b60005b8381106108505750506000910152565b8181015183820152602001610840565b90601f19601f60209361087e8151809281875287808801910161083d565b0116010190565b359073ffffffffffffffffffffffffffffffffffffffff8216820361009d57565b90601f601f19910116810190811067ffffffffffffffff8211176108c957604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b67ffffffffffffffff81116108c957601f01601f191660200190565b67ffffffffffffffff81116108c95760051b60200190565b9190610100808483031261009d5760409182519182019067ffffffffffffffff91838110838211176108c95784528295803584526020928382013584860152858201358686015261097f60608301610885565b606086015261099060808301610885565b608086015260a082013581811161009d5782019183601f8401121561009d5782356109ba816108f8565b906109c7895192836108a6565b8082528587828701011161009d5780878096018684013760009485918301015260a087015260c0810135828111610b0e57810184601f82011215610b0e57803590610a1182610914565b91610a1e8a5193846108a6565b808352878084019160051b83010191878311610b0a578801905b828210610ada5750505060c087015260e0810135918211610acf57019082601f83011215610ad757813591610a78610a6f84610914565b975197886108a6565b828752848088019360051b820101938411610ad3578401915b838310610aa357505050505060e00152565b823573ffffffffffffffffffffffffffffffffffffffff81168103610acf578152918401918401610a91565b8280fd5b5080fd5b80fd5b813573ffffffffffffffffffffffffffffffffffffffff81168103610b06578152908801908801610a38565b8780fd5b8680fd5b8380fd5b90815180825260208080930193019160005b828110610b32575050505090565b835173ffffffffffffffffffffffffffffffffffffffff1685529381019392810192600101610b24565b8051821015610b705760209160051b010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b91909160208082528351818301528084015160408301526040840151606083015273ffffffffffffffffffffffffffffffffffffffff918260608601511660808201528260808601511660a082015260a0850151610c0b610100918260c0850152610120840190610860565b9360c087015194601f1994858583030160e08601528080885193848152019701926000905b838210610c5557505050505060e0610c52959601519282850301910152610b12565b90565b8451811689529782019793820193600190910190610c30565b604051610c9181610c83602082019485610b9f565b03601f1981018352826108a6565b51902090565b9173ffffffffffffffffffffffffffffffffffffffff60405192602084019485521660408301526060820152606081526080810181811067ffffffffffffffff8211176108c9576040525190209056fea26469706673582212204f7e497a7e720881cd1e95fcc5a109ad35b6ccb9d33349769d6b47dec07bfadb64736f6c63430008140033000000000000000000000000a86bc62ac53dc86687ab6c15fdebc71ad51fb61500000000000000000000000021eab033c7d2df6a67aef6c5bda9a7f151eb9f520000000000000000000000000000000000000000000000000000000000aa36a7
Deployed Bytecode
0x608080604052600436101561001357600080fd5b60003560e01c908163036a7954146102055750806331fa321b146101c2578063523d415a14610171578063543836b11461012e57806374be2150146100f35780639e83334b146100a25763d3ecebd71461006c57600080fd5b3461009d57602060031936011261009d576004356000526001602052602060ff604060002054166040519015158152f35b600080fd5b3461009d57600060031936011261009d57602060405173ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000021eab033c7d2df6a67aef6c5bda9a7f151eb9f52168152f35b3461009d57600060031936011261009d5760206040517f0000000000000000000000000000000000000000000000000000000000aa36a78152f35b3461009d57602060031936011261009d5760043567ffffffffffffffff811161009d57610169610164602092369060040161092c565b610c6e565b604051908152f35b3461009d57600060031936011261009d57602060405173ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000a86bc62ac53dc86687ab6c15fdebc71ad51fb615168152f35b3461009d57606060031936011261009d5760243573ffffffffffffffffffffffffffffffffffffffff8116810361009d5761016960209160443590600435610c97565b3461009d57602060031936011261009d5767ffffffffffffffff6004351161009d5736602360043501121561009d5767ffffffffffffffff600435600401351161009d573660246004356004013560051b60043501011161009d576002600054146107e157600260005561027e60043560040135610914565b61028b60405191826108a6565b600480350135808252601f19906102a190610914565b0160005b8181106107d0578260005b600435600401358110610343575060018060005560405190602082016020835283518091526040830190602060408260051b8601019501916000905b8282106102f95785870386f35b90919293602080610333897fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc08a869c030186528851610860565b98960194939190910191016102ec565b60248160051b6004350101357ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffedd60043536030181121561009d5761038f9060243691600435010161092c565b906103e361039c83610c6e565b7f00000000000000000000000021eab033c7d2df6a67aef6c5bda9a7f151eb9f527f0000000000000000000000000000000000000000000000000000000000aa36a7610c97565b6020830151468103610799575080600052600160205260ff6040600020541661076857806000526001602052604060002060017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008254161790556104ba6020604085015160e08601519060405193849283927fb0bb1be40000000000000000000000000000000000000000000000000000000084527f0000000000000000000000000000000000000000000000000000000000aa36a760048501528760248501526044840152608060648401526084830190610b12565b038173ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000a86bc62ac53dc86687ab6c15fdebc71ad51fb615165afa90811561075c57600091610721575b50156106f75782600073ffffffffffffffffffffffffffffffffffffffff60806105cf9601511673ffffffffffffffffffffffffffffffffffffffff6060840151169060408401518360e0860151936105e160a08801516040519b8c97889687957fd496af240000000000000000000000000000000000000000000000000000000087528d60048801527f0000000000000000000000000000000000000000000000000000000000aa36a760248801526044870152606486015260c0608486015260c4850190610b12565b906003198483030160a4850152610860565b03925af160009481610670575b5061061d5760046040517f3204506f000000000000000000000000000000000000000000000000000000008152fd5b6106677fdd1bdfea38460565f157126e887f629eef09468d58dcb316e9b432eaabe1463a9160019561064f8689610b5c565b5261065a8588610b5c565b5060405191829182610b9f565b0390a2016102b0565b9094503d90816000823e61068482826108a6565b602081838101031261009d5780519067ffffffffffffffff821161009d57828101601f83830101121561009d5781810151906106bf826108f8565b936106cd60405195866108a6565b828552810160208385840101011161009d5760206106f09381860192010161083d565b93866105ee565b60046040517f59fa4a93000000000000000000000000000000000000000000000000000000008152fd5b90506020813d602011610754575b8161073c602093836108a6565b8101031261009d5751801515810361009d5785610504565b3d915061072f565b6040513d6000823e3d90fd5b602490604051907f5919bfee0000000000000000000000000000000000000000000000000000000082526004820152fd5b604490604051907f841022d50000000000000000000000000000000000000000000000000000000082526004820152466024820152fd5b8060606020809386010152016102a5565b807f08c379a0000000000000000000000000000000000000000000000000000000006064925260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152fd5b60005b8381106108505750506000910152565b8181015183820152602001610840565b90601f19601f60209361087e8151809281875287808801910161083d565b0116010190565b359073ffffffffffffffffffffffffffffffffffffffff8216820361009d57565b90601f601f19910116810190811067ffffffffffffffff8211176108c957604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b67ffffffffffffffff81116108c957601f01601f191660200190565b67ffffffffffffffff81116108c95760051b60200190565b9190610100808483031261009d5760409182519182019067ffffffffffffffff91838110838211176108c95784528295803584526020928382013584860152858201358686015261097f60608301610885565b606086015261099060808301610885565b608086015260a082013581811161009d5782019183601f8401121561009d5782356109ba816108f8565b906109c7895192836108a6565b8082528587828701011161009d5780878096018684013760009485918301015260a087015260c0810135828111610b0e57810184601f82011215610b0e57803590610a1182610914565b91610a1e8a5193846108a6565b808352878084019160051b83010191878311610b0a578801905b828210610ada5750505060c087015260e0810135918211610acf57019082601f83011215610ad757813591610a78610a6f84610914565b975197886108a6565b828752848088019360051b820101938411610ad3578401915b838310610aa357505050505060e00152565b823573ffffffffffffffffffffffffffffffffffffffff81168103610acf578152918401918401610a91565b8280fd5b5080fd5b80fd5b813573ffffffffffffffffffffffffffffffffffffffff81168103610b06578152908801908801610a38565b8780fd5b8680fd5b8380fd5b90815180825260208080930193019160005b828110610b32575050505090565b835173ffffffffffffffffffffffffffffffffffffffff1685529381019392810192600101610b24565b8051821015610b705760209160051b010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b91909160208082528351818301528084015160408301526040840151606083015273ffffffffffffffffffffffffffffffffffffffff918260608601511660808201528260808601511660a082015260a0850151610c0b610100918260c0850152610120840190610860565b9360c087015194601f1994858583030160e08601528080885193848152019701926000905b838210610c5557505050505060e0610c52959601519282850301910152610b12565b90565b8451811689529782019793820193600190910190610c30565b604051610c9181610c83602082019485610b9f565b03601f1981018352826108a6565b51902090565b9173ffffffffffffffffffffffffffffffffffffffff60405192602084019485521660408301526060820152606081526080810181811067ffffffffffffffff8211176108c9576040525190209056fea26469706673582212204f7e497a7e720881cd1e95fcc5a109ad35b6ccb9d33349769d6b47dec07bfadb64736f6c63430008140033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000a86bc62ac53dc86687ab6c15fdebc71ad51fb61500000000000000000000000021eab033c7d2df6a67aef6c5bda9a7f151eb9f520000000000000000000000000000000000000000000000000000000000aa36a7
-----Decoded View---------------
Arg [0] : hashi (address): 0xA86bc62Ac53Dc86687AB6C15fdebC71ad51fB615
Arg [1] : yaho_ (address): 0x21eAB033C7D2DF6A67AeF6C5Bda9A7F151eB9f52
Arg [2] : sourceChainId (uint256): 11155111
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000a86bc62ac53dc86687ab6c15fdebc71ad51fb615
Arg [1] : 00000000000000000000000021eab033c7d2df6a67aef6c5bda9a7f151eb9f52
Arg [2] : 0000000000000000000000000000000000000000000000000000000000aa36a7
Loading...
Loading
Loading...
Loading
Loading...
Loading
Loading...
Loading
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.