New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

@andreas-timm/solidity-preprocessor

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@andreas-timm/solidity-preprocessor

Solidity preprocessor

latest
Source
npmnpm
Version
0.1.7
Version published
Maintainers
1
Created
Source

Solidity preprocessor

test

Motivation

Usage

// TestNft1155.sol
// SPDX-License-Identifier: UNLICENSED

pragma solidity ^0.8.25;

import {ERC1155} from "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";

contract TestNft1155 is ERC1155 {
    constructor(string memory uri_) ERC1155(uri_) {
        _mint(address(0), 1, 100, "");
    }
}
import { preprocessor } from "@andreas-timm/solidity-preprocessor";

const res = await preprocessor({path: 'contracts/TestNft1155.sol', replace: [
  ['_mint(address(0), 1, 100, "")', '_mint(0x630C6C3180d3b4B6912644D046f6769dA3e54843, 1, 10000, "")']
]});

console.log(res.bytecode);

License

CC BY 4.0

This work is licensed under a Creative Commons Attribution 4.0 International License.

CC BY 4.0

  • LICENSE
  • Author: Andreas Timm

Keywords

contract

FAQs

Package last updated on 15 Jul 2024

Related posts