Skip to main content
Bumped by Community user
added 147 characters in body
Source Link

When i try to deploy my example contract it gives me the error creation of Auction errored: Error encoding arguments: Error: invalid BigNumber string (argument="value", value="", code=INVALID_ARGUMENT, version=bignumber/5.0.8)

// SPDX-License-Identifier: GPL-3.0

pragma solidity ^0.5.2;


contract Auction{
    mapping(address=> uint)public bids;

    struct Car{
        string description;
        uint value;
        uint built_year;
    }
    
    Car public private_car;
    mapping(address=> Car) public cars;
    
    
    constructor(string memory _description, uint _value, uint _built_year) public{
    private_car.description = _description;
    private_car.value = _value;
    private_car.built_year = _built_year;
    
       cars[msg.sender] = private_car;
    }
    
    function bid() payable public{
        bids[msg.sender] = msg.value;
    }
    
    
}

Why it gives this error when i pass nothing in the constructor? It works fine if i pass something in the constructor at the time of deployment.

When i try to deploy my example contract it gives me the error creation of Auction errored: Error encoding arguments: Error: invalid BigNumber string (argument="value", value="", code=INVALID_ARGUMENT, version=bignumber/5.0.8)

// SPDX-License-Identifier: GPL-3.0

pragma solidity ^0.5.2;


contract Auction{
    mapping(address=> uint)public bids;

    struct Car{
        string description;
        uint value;
        uint built_year;
    }
    
    Car public private_car;
    mapping(address=> Car) public cars;
    
    
    constructor(string memory _description, uint _value, uint _built_year) public{
    private_car.description = _description;
    private_car.value = _value;
    private_car.built_year = _built_year;
    
       cars[msg.sender] = private_car;
    }
    
    function bid() payable public{
        bids[msg.sender] = msg.value;
    }
    
    
}

When i try to deploy my example contract it gives me the error creation of Auction errored: Error encoding arguments: Error: invalid BigNumber string (argument="value", value="", code=INVALID_ARGUMENT, version=bignumber/5.0.8)

// SPDX-License-Identifier: GPL-3.0

pragma solidity ^0.5.2;


contract Auction{
    mapping(address=> uint)public bids;

    struct Car{
        string description;
        uint value;
        uint built_year;
    }
    
    Car public private_car;
    mapping(address=> Car) public cars;
    
    
    constructor(string memory _description, uint _value, uint _built_year) public{
    private_car.description = _description;
    private_car.value = _value;
    private_car.built_year = _built_year;
    
       cars[msg.sender] = private_car;
    }
    
    function bid() payable public{
        bids[msg.sender] = msg.value;
    }
    
    
}

Why it gives this error when i pass nothing in the constructor? It works fine if i pass something in the constructor at the time of deployment.

Source Link

Invalid Big number

When i try to deploy my example contract it gives me the error creation of Auction errored: Error encoding arguments: Error: invalid BigNumber string (argument="value", value="", code=INVALID_ARGUMENT, version=bignumber/5.0.8)

// SPDX-License-Identifier: GPL-3.0

pragma solidity ^0.5.2;


contract Auction{
    mapping(address=> uint)public bids;

    struct Car{
        string description;
        uint value;
        uint built_year;
    }
    
    Car public private_car;
    mapping(address=> Car) public cars;
    
    
    constructor(string memory _description, uint _value, uint _built_year) public{
    private_car.description = _description;
    private_car.value = _value;
    private_car.built_year = _built_year;
    
       cars[msg.sender] = private_car;
    }
    
    function bid() payable public{
        bids[msg.sender] = msg.value;
    }
    
    
}