Questions tagged [javascript-vm]
The javascript-vm tag has no usage guidance.
22
questions
0
votes
0
answers
21
views
how to handle eth and wei together in ethers.js
suppose I have the function to send multiple amount's at once from an array but each value is uncertain or unknown:
let value = [0,0.87,9.5,0.342,0.66,8]
let valueInWei;
for(let i =0;i<value.length;...
1
vote
1
answer
86
views
I can't manage to find the JVM(javascript Virtual Machine) as an environment to deploy my solidity smart contract on Remix IDE, Any idea why?
I can't manage to find the JVM(javascript Virtual Machine) as an environment to deploy my solidity smart contract on Remix IDE, Any idea why?
0
votes
1
answer
17
views
Iterating over a list of payable addresses throws error that "the value you send should be less than your current balance"
Stuck with this for a few days already, looking for some help.
I write a contract that allows users to bet on a certain event and then once the result of the event is evaluated it should change their ...
0
votes
0
answers
15
views
How to import deployed contact on public testnet into remix [duplicate]
I see that there are lots of information on how to deploy your contact to rinkbey using remix but not vice versa. I want to copy deployed contact from rinkbey testnet to local Blockchain simulator ...
0
votes
1
answer
487
views
How to import deployed contract from rinkeby to browser blockchain remix
I saw a lot of tutorials on running the Rinkbey testnet injected using MetaMask on Remix to call functions such as to get conversion rates from Ether to USD using chainlink.
I would like to do so ...
0
votes
1
answer
548
views
Solidiy remix VM error: revert
I am kinda new to solidity and I have this error that keeps popping up after I deployed the contract and run the initTest() function. What I am trying to do is passing the string that I insert in the ...
0
votes
0
answers
93
views
Remix. Different contract behavior on Javascript VM and Injected Web3
The following basic contract does not have the same behavior when
deployed on Javascript VM and on Injected Web3:
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.9.0;
contract ...
0
votes
0
answers
90
views
Error : Called function should be payable
I am trying to create a token contract and the token sale contract.
Token Contract : ERC20 token is ready and it is flawless
TokenSale Contract : I have passed the "Token"" contract to &...
2
votes
2
answers
1k
views
Unable to fetch output from a public function in solidity
I am writing a solidity public function that changes the value of state variable and then returns it.
pragma solidity >=0.4.22 <0.6.0;
contract white_label {
uint currentId = 1;
...
1
vote
0
answers
278
views
Remix testing timeout with JavaScript VM when calling a large array
I'm trying to test a contract getter method that returns a large array. I am using Remix and deploying using JavaScript VM. My contract deploys alright, but trying to call the getArray() method causes ...
1
vote
1
answer
142
views
Problem deploying in JavaScriptVM
I have a really strange problem. When I deploy a contract in JavaScriptVM using Remix including the following function:
function setLoanStatus(address _loan, bytes1 _newStatus) public {
// "A" = ...
2
votes
1
answer
69
views
Run contracts and create traces with Node
I came across an article:
https://wanderer.github.io/ethereum/nodejs/code/2014/08/12/running-contracts-with-vm/
At the bottom of the page is shown how to write a contract execution route.
But ...
1
vote
0
answers
222
views
Can't call another contract constant function in Remix in Web3 provider mode, but it works in Javascript VM
Remix behaves differently when running Javascript VM and web3 provider mode.
I have two contracts:
contract ERC20Basic {
function totalSupply() public view returns (uint256){}
function ...
0
votes
1
answer
78
views
UI integration with Smart Contract in case of using JavaScript VM
Is it possible to integrate an UI with a smart sontract in case of using java script vm in remix ? or we have to use web3 provider ?
1
vote
0
answers
240
views
Simple Bool Assignment runs out of Gas- can't figure out why?
I'm testing using Remix against web3 provider (Ganache).
Here is my code:
when "Startup = false" is uncommented, it runs out of gas. It works fine on Javascript VM in Remix, but not on Ganache ...
0
votes
1
answer
203
views
How to debug Web3JS for a not yet deployed contract?
I have remix-ide installed.
I want to debug how my contract can be interacted in a browser using Web3JS.
How can I can run it in browser? Can it be done with JavaScript VM? Or which VM I should ...
1
vote
1
answer
181
views
Oraclize Sample contracts failing in JavaScript VM: VM Exception: out of gas / invalid opcode
I'm simply trying to run one of the sample contracts here at dapps.oraclize.it/browser-solidity/ e.g. DieselPrice.sol.
When I create the contract without passing a value I get VM Exception: out of ...
1
vote
2
answers
1k
views
(Remix IDE) Getting VM error: invalid opcode in Javascript VM, [closed]
I'm creating an ERC20 token that will have 9 separate funding rounds. When I call the startNextRound function in the JavaScript VM, I get the following error:
transact to browser/SatanCoin.sol:...
0
votes
1
answer
202
views
Out of Gas exception on testnet but on JVM it works
I am trying to withdraw a contracts balance to the owner of that contracts account. It works perfectly on the JVM in solidity browser. But on TestRPC it has an out of gas exception.
The account has a ...
3
votes
1
answer
301
views
Exception of Unknown kind of function call
I am using remix IDE and I am getting this error:
Internal exception in StandardCompiler::compileInternal: /src/libsolidity/ast/ASTJsonConverter.cpp(791): Throw in function string dev::solidity::...
2
votes
2
answers
519
views
How do I add Ether to Browser Solidity for Testing?
I am unable to perform any transaction in Browser Solidity as there is no ether in the account.
The contract is being created, but now ether is needed to test the functions.
I have tried using the "...
5
votes
1
answer
497
views
Why do Solidity Browser non-constant functions return values?
When calling a state mutating function on the chain, the TX receipt object is returned. In Solidity Browser, under the Javascript VM, a return value is returned if one is set.
Why does the ...