View ComposeOverlayViewService.kt
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
import android.content.Intent | |
import android.graphics.PixelFormat | |
import android.os.IBinder | |
import android.view.Gravity | |
import android.view.WindowManager | |
import androidx.compose.foundation.gestures.detectDragGestures | |
import androidx.compose.foundation.layout.Box | |
import androidx.compose.foundation.layout.BoxScope | |
import androidx.compose.runtime.Composable | |
import androidx.compose.runtime.getValue |
View EventGasUsageTest.sol
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: GNU GPLv3 | |
pragma solidity 0.8.17; | |
import {PRBTest} from "@prb/test/PRBTest.sol"; | |
contract SampleEvent { | |
event LogTransfer(address indexed from, address indexed to, uint256 value); | |
function transfer(address to, uint256 value) public { | |
emit LogTransfer(msg.sender, to, value); |
View RevertGasUsageTest.sol
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: GNU GPLv3 | |
pragma solidity 0.8.17; | |
import {PRBTest} from "@prb/test/PRBTest.sol"; | |
contract RevertWithString { | |
function sampleRevert(uint256 amount) external pure { | |
require(amount > 10, "Not enough amount"); | |
} |
View run-all-nohup.sh
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
#!/bin/bash | |
# Assert we are on the root folder | |
if [ ! -d "contracts" ]; then | |
echo "error: script needs to be run from project root './tools/run-all-nohup.sh'" | |
exit 1 | |
fi | |
# Exec the run all script with nohup | |
nohup sh tools/run-all.sh > tools/logs/security-analysis.log 2>&1 & |
View run-all.sh
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
#!/bin/bash | |
# Assert we are on the root folder | |
if [ ! -d "contracts" ]; then | |
echo "error: script needs to be run from project root './tools/run-all.sh'" | |
exit 1 | |
fi | |
# Run slither analysis | |
./tools/slither/slither.sh > tools/logs/slither-output.log |
View mythril.sh
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
#!/bin/bash | |
# Assert we are in the right folder | |
if [ ! -d "contracts" ]; then | |
echo "error: script needs to be run from project root './tools/mythril/mythril.sh'" | |
exit 1 | |
fi | |
# Run mythril analyse on the given contract | |
function analyse_contract { |