Skip to content
This repository has been archived by the owner on Apr 18, 2021. It is now read-only.

Bug: cannot parse with annonymous function parameter #191

Open
ryan-chae opened this issue Oct 25, 2019 · 0 comments
Open

Bug: cannot parse with annonymous function parameter #191

ryan-chae opened this issue Oct 25, 2019 · 0 comments
Labels
bug Something isn't working

Comments

@ryan-chae
Copy link
Contributor

ryan-chae commented Oct 25, 2019

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report  
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Other... Please describe:

Current behavior

When there are some functions with anonymous parameter especially in interface, vvisp cannot parse that interface.

interface BridgeInterface {
    function makerToCompound(uint, uint, uint) external returns (uint);
    function compoundToMaker(uint, uint, uint) external;
    function refillFunds(uint) external;
}

If the above interface is in the solidity file, vvisp parses it as follows:

methods: {
      makerToCompound: function(, , , options) {
        const txData = contract.methods.makerToCompound(, , , ).encodeABI();
        options = {
          ...options,
          data: txData,
          platform: platform
        };
        return sendTx(contract.options.address, options ? options.value : 0, loadPrivateKey(), options);
      },
      compoundToMaker: function(, , , options) {
        const txData = contract.methods.compoundToMaker(, , , ).encodeABI();
        options = {
          ...options,
          data: txData,
          platform: platform
        };
        return sendTx(contract.options.address, options ? options.value : 0, loadPrivateKey(), options);
      },
      refillFunds: function(, options) {
        const txData = contract.methods.refillFunds(, ).encodeABI();
        options = {
          ...options,
          data: txData,
          platform: platform
        };
        return sendTx(contract.options.address, options ? options.value : 0, loadPrivateKey(), options);
      },
    }

Expected behavior

Minimal reproduction of the problem with instructions

What is the motivation / use case for changing the behavior?

Environment


vvisp version: 2.1.1


Environment:
- Node version: 11.14.0
- Operating system: osx catalina 10.15

Others:

@ryan-chae ryan-chae added the bug Something isn't working label Oct 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant