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
#!/usr/bin/env python3 | |
# Copyright (c) 2017-2022 The Bitcoin Core developers | |
# Distributed under the MIT software license, see the accompanying | |
# file COPYING or http://www.opensource.org/licenses/mit-license.php. | |
"""An example functional test | |
The module-level docstring should include a high-level description of | |
what the test is doing. It's the first thing people see when they open | |
the file and should give the reader information about *what* the test | |
is testing and *how* it's being tested |
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
#[repr(packed)] | |
#[derive(Debug, Copy, Clone)] | |
struct Foo { | |
tiny: bool, | |
normal: u32, | |
small: u8, | |
long: u64, | |
short: u16, | |
} |
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
#[derive(Debug)] | |
struct Foo { | |
tiny: bool, | |
normal: u32, | |
small: u8, | |
long: u64, | |
short: u16, | |
} | |
macro_rules! raw_dbg {( |
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
#[repr(C)] | |
#[derive(Debug)] | |
struct Foo { | |
tiny: bool, | |
normal: u32, | |
small: u8, | |
long: u64, | |
short: u16, | |
} |
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: MIT | |
pragma solidity ^0.8.0; | |
import "./Registry.sol"; | |
contract Logic { | |
bytes32 constant SUPEROWNER = keccak256("superowner"); | |
bytes32 constant OWNER = keccak256("owner"); |
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: MIT | |
pragma solidity >=0.7.0 <0.9.0; | |
contract Store { | |
uint public num; | |
function setNum(uint _num) public { | |
num = _num; | |
} |
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: MIT | |
pragma solidity ^0.7.0; | |
contract Logic { | |
event Added(uint256 result); | |
event Fallback(); | |
function add(uint256 a, uint256 b) external returns (uint256 result) { |