instruction stringclasses 1
value | input stringlengths 153 282k | output stringlengths 198 308 |
|---|---|---|
Analyze the given smart contract code (Solidity/Rust) to identify the blockchain network, detect honeypots, vulnerabilities, or backdoors. Return a strict JSON verdict with fields: chain, status, risk_level, vector, reason. | use {
crate::{codegen::program::common::*, Program},
quote::{quote, ToTokens},
};
// Generate non-inlined wrappers for each instruction handler, since Solana's
// BPF max stack size can't handle reasonable sized dispatch trees without doing
// so.
pub fn generate(program: &Program) -> proc_macro2::TokenStream ... | {"chain": "solana", "status": "safe", "risk_level": "low", "vector": "general_logic", "reason": "Indexed from audit repository: Solana Program Examples & Anchor, file: anchor-master/lang/syn/src/codegen/program/handlers.rs"} |
Analyze the given smart contract code (Solidity/Rust) to identify the blockchain network, detect honeypots, vulnerabilities, or backdoors. Return a strict JSON verdict with fields: chain, status, risk_level, vector, reason. | // SPDX-License-Identifier: MIT
// Damn Vulnerable DeFi v4 (https://damnvulnerabledefi.xyz)
pragma solidity =0.8.25;
import {MerkleProof} from "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import {OwnableRoles} from "solady/auth/OwnableRoles.sol";
contract L1Gateway is OwnableRoles {
uint256 publi... | {"chain": "evm", "status": "scam", "risk_level": "critical", "vector": "vulnerability_vector", "reason": "Indexed from audit repository: Damn Vulnerable DeFi (Vulnerable contracts), file: damn-vulnerable-defi-master/src/withdrawal/L1Gateway.sol"} |
Analyze the given smart contract code (Solidity/Rust) to identify the blockchain network, detect honeypots, vulnerabilities, or backdoors. Return a strict JSON verdict with fields: chain, status, risk_level, vector, reason. | //! This example demonstrates the use of the `anchor_spl::token` CPI client.
use anchor_lang::prelude::*;
use anchor_spl::{
associated_token::AssociatedToken,
token_2022::spl_token_2022,
token_interface::{
self, Burn, Mint, MintTo, SetAuthority, TokenAccount, TokenInterface, Transfer,
Trans... | {"chain": "solana", "status": "safe", "risk_level": "low", "vector": "general_logic", "reason": "Contract indexed from source archive: Solana / Rust Programs & Exploits (coral-xyz Anchor), path: anchor-master/tests/spl/token-proxy/programs/token-proxy/src/lib.rs"} |
Analyze the given smart contract code (Solidity/Rust) to identify the blockchain network, detect honeypots, vulnerabilities, or backdoors. Return a strict JSON verdict with fields: chain, status, risk_level, vector, reason. | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "./IERC3156FlashBorrower.sol";
/**
* @dev The lender interface must be implemented by services wanting to provide a flash loan.
*/
interface IERC3156FlashLender {
/**
* @dev The amount of currency available to be lent.
* @param token The ... | {"chain": "evm", "status": "safe", "risk_level": "low", "vector": "general_logic", "reason": "Contract indexed from source archive: Solidity Smart Contract Examples (samnang), path: solidity-examples-main/contracts/sample_apps/11_flash_loan/interfaces/IERC3156FlashLender.sol"} |
Analyze the given smart contract code (Solidity/Rust) to identify the blockchain network, detect honeypots, vulnerabilities, or backdoors. Return a strict JSON verdict with fields: chain, status, risk_level, vector, reason. | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
/// @dev Give free tokens to anyone in the testing environment
// Audited smart contract
contract ERC20Mock is ERC20 {
constructor(string memory name, string memory symbol) ERC20(name, symbol) {}
... | {"chain": "evm", "status": "safe", "risk_level": "low", "vector": "general_logic", "reason": "Contract indexed from source archive: Solidity Smart Contract Examples (samnang), path: solidity-examples-main/contracts/sample_apps/11_flash_loan/mocks/ERC20Mock.sol"} |
Analyze the given smart contract code (Solidity/Rust) to identify the blockchain network, detect honeypots, vulnerabilities, or backdoors. Return a strict JSON verdict with fields: chain, status, risk_level, vector, reason. | // Avoiding AccountInfo deprecated msg in anchor context
#![allow(deprecated)]
use {
anchor_lang::{
context::CpiContext,
solana_program::{account_info::AccountInfo, pubkey::Pubkey},
Accounts, Result,
},
spl_token_2022_interface as spl_token_2022,
};
#[deprecated(
note = "Token-2... | {"chain": "solana", "status": "safe", "risk_level": "low", "vector": "general_logic", "reason": "Contract indexed from source archive: Solana / Rust Programs & Exploits (coral-xyz Anchor), path: anchor-master/spl/src/token_2022_extensions/cpi_guard.rs"} |
Analyze the given smart contract code (Solidity/Rust) to identify the blockchain network, detect honeypots, vulnerabilities, or backdoors. Return a strict JSON verdict with fields: chain, status, risk_level, vector, reason. | use {
crate::{
config::{Config, Program, WithPath},
target_dir, ConfigOverride, ProgramCommand, DEFAULT_MAX_SIGN_ATTEMPTS,
},
anchor_lang_idl::types::Idl,
anyhow::{anyhow, bail, Result},
cargo_metadata::{Metadata, MetadataCommand, Package, TargetKind},
solana_cli_config::Config a... | {"chain": "solana", "status": "safe", "risk_level": "low", "vector": "general_logic", "reason": "Indexed from audit repository: Solana Program Examples & Anchor, file: anchor-master/cli/src/program.rs"} |
Analyze the given smart contract code (Solidity/Rust) to identify the blockchain network, detect honeypots, vulnerabilities, or backdoors. Return a strict JSON verdict with fields: chain, status, risk_level, vector, reason. | use anchor_lang::prelude::*;
declare_id!("Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS");
#[program]
pub mod multiple_suites_run_single {
use super::*;
pub fn initialize(_ctx: Context<Initialize>) -> Result<()> {
Ok(())
}
}
#[derive(Accounts)]
pub struct Initialize {}
| {"chain": "solana", "status": "safe", "risk_level": "low", "vector": "general_logic", "reason": "Contract indexed from source archive: Solana / Rust Programs & Exploits (coral-xyz Anchor), path: anchor-master/tests/multiple-suites-run-single/programs/multiple-suites-run-single/src/lib.rs"} |
Analyze the given smart contract code (Solidity/Rust) to identify the blockchain network, detect honeypots, vulnerabilities, or backdoors. Return a strict JSON verdict with fields: chain, status, risk_level, vector, reason. | #![allow(unexpected_cfgs)]
use anchor_lang::prelude::*;
declare_id!("Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS");
type MyType = u64;
// Solana secure anchor program
#[program]
pub mod test_instruction_validation {
use super::*;
// Test 1: Missing parameter - handler only has 1 arg but #[instruction] expe... | {"chain": "solana", "status": "safe", "risk_level": "low", "vector": "general_logic", "reason": "Contract indexed from source archive: Solana / Rust Programs & Exploits (coral-xyz Anchor), path: anchor-master/tests/test-instruction-validation/fail-args-count/programs/test-instruction-validation/src/lib.rs"} |
Analyze the given smart contract code (Solidity/Rust) to identify the blockchain network, detect honeypots, vulnerabilities, or backdoors. Return a strict JSON verdict with fields: chain, status, risk_level, vector, reason. | // SPDX-License-Identifier: MIT
//
// https://cryptomarketpool.com/importing-into-a-contract
pragma solidity ^0.8.0;
contract OtherContract {
function sum(uint256 a, uint256 b) public pure returns (uint256) {
return a + b;
}
}
| {"chain": "evm", "status": "safe", "risk_level": "low", "vector": "general_logic", "reason": "Contract indexed from source archive: Solidity Smart Contract Examples (samnang), path: solidity-examples-main/contracts/getting_started_with_solidity/18_imports/OtherContract.sol"} |
Analyze the given smart contract code (Solidity/Rust) to identify the blockchain network, detect honeypots, vulnerabilities, or backdoors. Return a strict JSON verdict with fields: chain, status, risk_level, vector, reason. | //! Testing of handling of remaining accounts with anchor Account structs
use account::*;
use anchor_lang::prelude::*;
use anchor_spl::token::TokenAccount;
use context::*;
mod account;
mod context;
declare_id!("RemainingAccounts11111111111111111111111111");
#[program]
pub mod remaining_accounts {
use super::*;
... | {"chain": "solana", "status": "safe", "risk_level": "low", "vector": "general_logic", "reason": "Indexed from audit repository: Solana Program Examples & Anchor, file: anchor-master/tests/misc/programs/remaining-accounts/src/lib.rs"} |
Analyze the given smart contract code (Solidity/Rust) to identify the blockchain network, detect honeypots, vulnerabilities, or backdoors. Return a strict JSON verdict with fields: chain, status, risk_level, vector, reason. | use {
super::common::{convert_idl_type_to_syn_type, gen_accounts_common},
anchor_lang_idl::types::Idl,
heck::CamelCase,
quote::{format_ident, quote},
};
pub fn gen_cpi_mod(idl: &Idl) -> proc_macro2::TokenStream {
let cpi_instructions = gen_cpi_instructions(idl);
let cpi_return_type = gen_cpi_re... | {"chain": "solana", "status": "safe", "risk_level": "low", "vector": "general_logic", "reason": "Indexed from audit repository: Solana Program Examples & Anchor, file: anchor-master/lang/attribute/program/src/declare_program/mods/cpi.rs"} |
Analyze the given smart contract code (Solidity/Rust) to identify the blockchain network, detect honeypots, vulnerabilities, or backdoors. Return a strict JSON verdict with fields: chain, status, risk_level, vector, reason. | use anchor_client::{Client, Cluster, CommitmentConfig};
use anyhow::Result;
use clap::Parser;
use solana_sdk::pubkey::Pubkey;
use solana_sdk::signature::read_keypair_file;
use solana_sdk::signature::{Keypair, Signer};
use solana_system_interface::instruction as system_instruction;
use solana_system_interface::program a... | {"chain": "solana", "status": "safe", "risk_level": "low", "vector": "general_logic", "reason": "Contract indexed from source archive: Solana / Rust Programs & Exploits (coral-xyz Anchor), path: anchor-master/client/example/src/blocking.rs"} |
End of preview. Expand in Data Studio
No dataset card yet
- Downloads last month
- 51