Coder Social home page Coder Social logo

hardhat-marmite's People

Contributors

clemlak avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hardhat-marmite's Issues

Implementations not being picked up

Doesen't find any implementation if docs from README.md with pattern"

@start:<Greater-than> if (newBar > 0) { bar = newBar; } @end

is used with a ":"

Two possible fixes, modify regex or disallow ":" after start tag in the docs

PRs
#8
#9

Cannot place tags in imported contracts from npm registry

hardhat compile behaviour does not resemble the usual node_modules precedence rules. The compilation of contracts in the .gas directory seem to import from node_modules in root directory instead, therefore not removing the tags and leading to compilation error.

Import path resolution of the hardhat compile task needs to be manipulated to import from root/.gs/node_modules instead of root/node_modules

unexpected golf:script behaviour

My script:

import hre from 'hardhat';
import marmite from '@primitivefi/hardhat-marmite';

async function main() {
    await marmite(hre, async (flag) => {
        const Complex = await hre.ethers.getContractFactory('Complex');
        const complex = await Complex.deploy(1);

        const tx = await complex.set(42);
        await flag('Set function', tx);
    });
}

main();

contract:

// SPDX-License-Identifier: WTFPL
pragma solidity 0.8.9;

contract Complex {
    uint256 public bar;

    constructor(uint256 initBar) {
        bar = initBar;
    }

    function set(uint256 newBar) external {
        @start<test1>
        if (newBar > 0) {
            bar = newBar;
        }
        @end

        @start<test2>
        if (newBar != 0) {
            bar = newBar;
        }
        @end
    }
}

executing: npx hardhat golf:script ./scripts/marmite.ts

returns:

image

Greater-than โ”‚ Different-from are from another contract in the same folder than Complex

I would expect return only from the contract I am running in the script

Passing arrays as args

This is probably due to my lack of understanding of bash and/or zsh.

npx hardhat golf:contract --contract Foo --func mintManyToSender --params ("value"),1,"0x0" 

// returns
zsh: no matches found: (value),1,0x0

this fails because ("value") gets interpreted as a string. This doesn't even compile

If I set a reference above it doesn't pass the reference:

array=(value)
npx hardhat golf:contract --contract Foo --func mintManyToSender --params array,1,"0x0" 

This compiles BUT errors out with this:

  reason: 'invalid value for array',
  code: 'INVALID_ARGUMENT',
  argument: 'value',
  value: 'array'

Any ideas? I'm sure this will be an issue with others as well but again don't think it's necessarily related to this package just understanding of bash ๐Ÿ˜„

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.