Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Femi
    @femostic4j
    @Tahlil Thanks
    darkdoom1
    @darkdoom1
    hi
    is any one here
    nick
    @nick1227223
    Yes Darkdoon
    Any problem ?
    ?
    nick
    @nick1227223
    hi can anyone help me to add frontend to a smart contract ?
    helloworld.png
    written in --- solidity
    prints --- a string
    how do i add frontend using web3.js
    ?
    Liana Husikyan
    @LianaHus
    you may consider to use the 'one click dapp' plugin
    nick
    @nick1227223
    no brother i want learn it web3.js
    Femi
    @femostic4j
    Please and please house, how do i solve the issues this error, i am getting this error message each time i try to migrate to binance smart chain testnet. errorrrr.PNG
    nick
    @nick1227223
    @nick1227223
    this is a serverside problem mr.Femi
    make sure you have server.js file inluded in the folder while deploying
    Femi
    @femostic4j
    @nick1227223 Thanks nick, i appreciate
    nick
    @nick1227223
    first solve it
    only then thanks me //// even i am new to coding
    William Entriken
    @fulldecent
    Hello room, I need a lot of Ropsten ETH for testing. I have real ETH. Who wants to trade?
    nick
    @nick1227223
    yess
    contact me @ nickj8366@gmail.com
    send message 'trade'
    Marcos Tadeu Cardoso
    @solenergy:matrix.org
    [m]
    hello how do I access an old contract, I'm not able to, I'm not able to access and view the old contracts at https://remix.ethereum.org/
    ?
    nick
    @nick1227223
    do you have the contract address ?
    Marcos Tadeu Cardoso
    @solenergy:matrix.org
    [m]
    just the contract number
    nick
    @nick1227223
    what
    send it
    4 replies
    Marcos Tadeu Cardoso
    @solenergy:matrix.org
    [m]
    0xf390fE56e4403D55F202037DC0bBa9302E1dEa2e
    binance
    binance
    nick
    @nick1227223
    ok
    Samuel French
    @samuelfrench
    contract lottoMultipleEntranceTest {
    
    LottoMock lotto;
    
    /// #sender: account-0
    /// #value: 500000000000000
    function beforeEach() public payable {
        lotto = new LottoMock();
    
        Assert.equal(lotto.getQuantityOfEntrants(), uint256(0), "expecting 0 entrants before entering");
        Assert.equal(lotto.getLotteryBalance(), uint256(0), "expecting 0 lottery balance before entering");
        Assert.equal(msg.sender, TestsAccounts.getAccount(0), "Invalid sender");
    
    
        lotto.enter{value:500000000000000}();
    
        Assert.equal(lotto.getLotteryBalance(), uint256(500000000000000), "expecting lottery balance equal to entrance fee after entering");
        Assert.equal(lotto.getQuantityOfEntrants(), uint256(1), "user should have successfully entered the lottery");
    }
    
    //TODO: needs debugging https://stackoverflow.com/questions/69200464/solidity-unit-testing-isnt-using-the-correct-sender-to-call-the-function-under
    ///case 7: multiple entrants
    /// #sender: account-1
    /// #value: 500000000000000
    function enterSuccessfullyMultipleEntrants() public payable {
        Assert.equal(lotto.getLotteryBalance(), uint256(500000000000000), "One user has already entered.");
        Assert.equal(lotto.getQuantityOfEntrants(), uint256(1), "Expecting an existing entry.");
        Assert.equal(msg.sender, TestsAccounts.getAccount(1), "Invalid sender");
    
        //TODO - this is using account-0
        try lotto.enterDebug1{value:500000000000000}() {
            Assert.ok(false, 'succeed unexpected');
        } catch Error(string memory reason) {
            Assert.equal(reason, "debug", "debug.");
        } catch (bytes memory) {
            Assert.ok(false, 'failed unexpected');
        }
    
        Assert.equal(lotto.getLotteryBalance(), uint256(1000000000000000), "expecting lottery balance equal to entrance fee for two users after entering");
        Assert.equal(lotto.getQuantityOfEntrants(), uint256(2), "second user should have successfully entered the lottery");
    }
    }
    No matter what I try, I'm unable to get the msg.sender to resolve to account-1 in the actual code under test, the contract under test is always being called by account-0
    Any ideas?
    I've tried inheriting from the contract under test, it doesn't change this behavior.
    yann300
    @yann300
    how are you running the test @samuelfrench ?
    from the remix ide UI?
    yuandeng228
    @yuandeng228
    Hello everyone
    I want to know the commands constructed when remix compiles the contract, because the code compiled by solc is not the same as the code compiled by remix
    yuandeng228
    @yuandeng228
    I use the same compiler version
    yann300
    @yann300
    is the difference in the end of the bytecode?
    yuandeng228
    @yuandeng228
    I compared the end of the two bytecodes, the inconsistencies are as follows:
    remix:bc2bea4848af007d965fdc7b78d9779398fcdc18b060f5498b2655e9f004399e64736f6c63430007040033
    Mine: d557cc484bceee144ad459ba573601b1865d114467bf8778386be1aad8cb48bf64736f6c63430007040033
    yann300
    @yann300
    this is the end right?
    this correspond to the metadata hash
    https://docs.soliditylang.org/en/v0.8.7/metadata.html#encoding-of-the-metadata-hash-in-the-bytecode
    it looks like the metadata file from remix and solc is not exactly the same, probably you use a different file name.
    can you see the metadata generated by solc?
    yuandeng228
    @yuandeng228
    @yann300 Thanks, I study the contract metadata
    yuandeng228
    @yuandeng228
    My problem is solved, thank you very much @yann300
    funkyenough
    @funkyenough:matrix.org
    [m]
    Hi, complete noob here. Trying to connect Remix to Ganache, but the dropdown pin of hostname only supports three options: 0.0.0.0, 192.168.11.59 and 127.0.0.1. I tried all three with "web3 provider" option, but the same error appears that says "not possible to connect to the Web3 provider. Make sure the provider is running, a connection is open (via IPC or RPC) or that the provider plugin is properly configured."
    Samuel French
    @samuelfrench
    @yann300 I was trying to run the test in the remix ide UI, yes.