This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// AUTHOR: Mario Iordanov | |
// Github: @marioiordanov | |
// Company: ShardLabs | |
%builtins output range_check | |
from starkware.cairo.common.serialize import serialize_word | |
from starkware.cairo.common.alloc import alloc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// AUTHOR: Ioan Oara | |
// Github: @ioanSL | |
// Company: ShardLabs | |
from starkware.cairo.common.serialize import serialize_word | |
from starkware.cairo.common.uint256 import Uint256 | |
from starkware.cairo.common.alloc import alloc | |
from starkware.cairo.common.math import assert_le, unsigned_div_rem | |
from starkware.cairo.common.dict import DictAccess, dict_read, dict_write |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%lang starknet | |
from starkware.cairo.common.alloc import alloc | |
from starkware.cairo.common.cairo_builtins import HashBuiltin | |
from starkware.cairo.common.math import assert_nn | |
from starkware.starknet.common.messages import send_message_to_l1 | |
from starkware.starknet.common.syscalls import ( | |
get_caller_address, | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: Apache-2.0. | |
pragma solidity ^0.8.17; | |
interface IStarknetMessaging { | |
/** | |
Consumes a message that was sent from an L2 contract. | |
Returns the hash of the message. | |
*/ | |
function consumeMessageFromL2(uint256 fromAddress, uint256[] calldata payload) |