ethereum / remix-vscode

Remix VS Code extension
99 stars 18 forks source link

Payable Constructor does not register #21

Open MrSquiggles13 opened 2 years ago

MrSquiggles13 commented 2 years ago

When I tried to implement a payable constructor in my contract I notice payable is not recognized as a keyword nor does it change the deploy color to red nor give the capability of sending value on deployment. I tested my contract in the browser version of remix and it is able to recognize the payable constructor and receive the value yet I am unable to do so in the VS code extension.

pragma solidity ^0.8.0;

contract DBank {
    address payable supplier;

    constructor () payable { //<=== does not highlight keyword nor recognize it in the interactive drop down
        supplier = payable(msg.sender);
    }
}
LuckyLukeArbitrage commented 2 years ago

I am new to Solidity and smart contracts. I had the same issue and this driving me nuts why it doesn't work. Thank you for reporting this issue! Did anybody had an intermediate solution?

neosizzle commented 1 year ago

Same here, this is happening to me as well in version v0.0.12