Uploading Contracts

Learn how to upload individual smart contract files to BlockSecOps. | Extension | Language | Example | |-----------|----------|---------| | .sol | Solidity |...

Last updated: January 14, 2026

Uploading Contracts

Learn how to upload individual smart contract files to BlockSecOps.

Supported File Types

Extension Language Example
.sol Solidity Token.sol
.vy Vyper Vault.vy
.rs Rust (Solana) lib.rs

Upload Methods

Drag and Drop

The fastest way to upload:

  1. Open the dashboard
  2. Drag your file onto the upload area
  3. Release to upload

File Browser

If you prefer clicking:

  1. Click New Scan or the upload area
  2. Click Browse Files
  3. Select your contract file
  4. Click Open

Paste Code

For quick testing:

  1. Click New Scan
  2. Select Paste Code tab
  3. Paste your contract source code
  4. Select the language (Solidity, Vyper, Rust)
  5. Click Upload

File Requirements

Size Limits

Plan Max File Size
Free 1 MB
Developer 5 MB
Startup+ 10 MB

File Format

  • Must be valid source code
  • UTF-8 encoding
  • Unix or Windows line endings

What to Include

For single files:

  • The main contract file
  • All dependencies should be in the file OR use fully-qualified imports

Import Handling

OpenZeppelin and Common Libraries

BlockSecOps automatically resolves:

  • OpenZeppelin contracts
  • Common Solidity libraries
  • Standard imports

Example that works:

import "@openzeppelin/contracts/token/ERC20/ERC20.sol";

Local Imports

For contracts with local imports, upload as a project instead.

Example that requires project upload:

import "./utils/Math.sol";
import "../lib/Helper.sol";

See Uploading Projects for multi-file uploads.


After Upload

Once your file uploads:

  1. Language Detection - Automatic based on extension
  2. Validation - Syntax check
  3. Ready for Scan - Select scanners and run

The file appears in your contracts list immediately.


Naming Your Contract

Auto-Naming

By default, contracts are named from:

  1. The filename (e.g., Token.sol)
  2. The main contract name if parseable

Custom Names

To rename:

  1. Go to Contracts
  2. Click the contract
  3. Click Edit (pencil icon)
  4. Enter a new name
  5. Click Save

Organizing Contracts

Into Projects

Group related contracts:

  1. Create a project (see Creating Projects)
  2. Upload contracts to that project
  3. Or move existing contracts to a project

With Tags

Add tags for organization:

  1. Click a contract
  2. Click Add Tag
  3. Enter tag name (e.g., "DeFi", "Audited")
  4. Tags appear on contract cards

Troubleshooting

Upload failed

Common causes:

  • File too large (check plan limits)
  • Invalid file extension
  • Network timeout

Solutions:

  • Compress or split large files
  • Ensure correct extension
  • Try again with stable connection

"Invalid Solidity" error

The file may have:

  • Syntax errors
  • Missing pragma
  • Invalid characters

Solution: Fix the errors in your editor and re-upload.

Import not found

For files with local imports:


Next Steps