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 |
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 { |
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 |
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 & |
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"); | |
} |
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); |
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 { | |
encodePacked, | |
getAddress, | |
isAddress, | |
keccak256, | |
parseUnits, | |
} from "viem"; | |
import { MerkleTree } from "merkletreejs"; | |
import fs from "fs"; | |
import csv from "csv-parser"; |
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 { | |
EventBridgeClient, | |
PutEventsCommand, | |
PutEventsCommandOutput, | |
PutEventsRequestEntry, | |
} from "@aws-sdk/client-eventbridge"; | |
import { Static, TSchema } from "@sinclair/typebox"; | |
import { TypeCompiler } from "@sinclair/typebox/compiler"; | |
import { EventBus } from "sst/node/event-bus"; | |
import { useLoader } from "./loaderReplica"; |
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 { KernelExecuteAbi, KernelInitAbi } from "@/lib/abi/KernelAccountAbi"; | |
import { | |
getAccountNonce, | |
getSenderAddress, | |
getUserOperationHash, | |
} from "permissionless"; | |
import { | |
SignTransactionNotSupportedBySmartAccount, | |
SmartAccount, | |
} from "permissionless/accounts"; |
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 { KMSClient } from "@aws-sdk/client-kms"; | |
import { logger } from "@frak-backend/core"; | |
import { | |
Hex, | |
hashMessage, | |
hashTypedData, | |
keccak256, | |
serializeTransaction, | |
signatureToHex, | |
} from "viem"; |