Questions tagged [remix]

Questions about Remix, an online browser compiler for Solidity, formerly called Browser Solidity.

Filter by
Sorted by
Tagged with
0
votes
1answer
59 views

I am trying to execute a simple contract on Solidity Remix. But the page have different options compared to the tutorial videos?

I am new to the blockchain world. So I was trying to build a simple contract using ERC20 on solidity remix. But the tutorials I have seen have different options when they run the same program, I am ...
0
votes
1answer
43 views

Error deploying new contract in Javascript using Meteor and TemplateVar

I am trying to create a new contract on button click using Meteor and TemplateVar. The relevant code is: Template.Borrower.events({ 'click button'(event, instance) { // Create new Borrower ...
0
votes
1answer
202 views

Loading truffle library in remix browser IDE

Besides writing smart contracts in the browser, I would also like to write my test in this IDE. Any suggestions how to load the truffle files in http://remix.ethereum.org? I appreciate your help!
0
votes
1answer
529 views

Solidity error : errored: Gas required exceeds limit: 30000

i am new to solidity and trying to learn it. I was looking at some contract source codes and trying to run them in testnet. i found the below contract and used remix ide to test it in ropsnet but get ...
0
votes
2answers
1k views

Remix Gas limit exceeded regardless of how high I set it

I am deploying a crowdsale contract in Remix but no matter how high I set the gas limit (set it to 40000000 once) or even how much I change the value field I can't get this contract to not exceed the ...
0
votes
1answer
569 views

Error when trying to return string mapping value [duplicate]

I am still learning the best way to use mappings and how to access mapped elements. I understand how they work, but I tried to write some simple code to map an ID to a name. It works fine except for ...
0
votes
0answers
265 views

Why is the value of variable in solidity state empty?

I have the following code contract User { using strings for *; address public DB; function User(address _DB) { if(_DB == 0x0) throw; DB = _DB; } function setUser(...
0
votes
1answer
236 views

How to construct the network and account at client side

I am doing a project which is related to the Ethereum. But I faced the problem, so I want to ask you something. I’ll explain my project briefly. After a team meeting or purchase of materials, the ...
0
votes
2answers
497 views

Getting Invalid sender error while creating contract from remix

I am getting Invalid sender error while creating contact in private network. Though i have kept chainId and networkId are same.
0
votes
1answer
171 views

JavascriptVM(remix) bug deploying multiple tokens

I'm currently coding a crowdsale for school in which the fictious participants can buy a token. During the first round the participants would also get a second token which would act as a governance ...
0
votes
1answer
708 views

Multiple smart contracts

What is the process called when using e.g a token smart contract in an ICO smart contract? and could someone provide an explanation of the process. I'm not sure that I understand how interaction ...
0
votes
1answer
51 views

Gas requirement of function postrecord on retrunstring is high, anyone know how to bring it down?

pragma solidity ^0.4.0; contract insure { address public doctor; function Person() private { doctor = msg.sender; } modifier onlyDoctor { require(msg.sender == doctor); _; } } ...
0
votes
1answer
448 views

Why does not this contract send the tokens to the creator?

I m testing ERC20 token contracts. I could be able to create and get back the tokens in the Ropstan test network. When I deploy the same contract.sol in the main network my creator address doe not get ...
0
votes
0answers
746 views

can we implement proof of stake contracts or proof of stake based token in solidity on ethereum network?

I have written a contract in solidity that operates on the basis of proof of stake. I want to know is it possible to create a pos based token or contracts and deploy them on ether network. And are ...
0
votes
0answers
359 views

How to hide attributes in contracts? [duplicate]

When I set an attribute to private it's not accessible from outside, but everyone who runs a node can still see it. Someone told me to use encryption to hide attribute values, but how should this ...
0
votes
0answers
70 views

Struggling with Interactions and Effects when coding

I don't think there is a better place to ask than here. I enjoy coding but I feel like I'm having an uphill battle when I'm getting to the interaction and effect part of various functions, what sort ...
0
votes
1answer
201 views

transferOwnership function

Shouldn't following function function transferOwnership(address newOwner) public onlyOwner { require(newOwner != address(0)); OwnershipTransferred(owner, newOwner); owner = newOwner; } ...
0
votes
1answer
34 views

Need to define all the varibales for an exchage during the contract deployment?

Creating ERC20 is not that hard. We can just copy the source code and deploy it on the main network. But creating an own exchange system for the token is a differnt part. If we create a standard ...
0
votes
1answer
107 views

When transferring value

When transferring value within a function which one is best practices to do? require(refundAddresses[x].send(refunds[refundAddresses[x]])) refundAddresses[x].send(refunds[refundAddresses[x]
0
votes
0answers
249 views

Can't Send ETH to Crowdsale in Ropsten

I'm trying to test a token sale contract on the Ropsten test network but am having an issue. I am using Ethereum Wallet. I am following the guide at http://www.ethereum.org/crowdsale. I am getting ...
0
votes
2answers
281 views

Test pass with Remix but fails with Truffle

I have two contracts: ElephanteumStorage and ElephanteumCore. Storage just keeps some data. Core is provided to change the data in the Storage. As a constructor argument, ElephanteumCore receives ...
0
votes
1answer
820 views

Understanding Remix Outputs

I have begun using Remix IDE and need clarification on some of its outputs 1) Why is x treated as a function? why would it require any gas? 2) Why are there outputs for constructor and c.bar() ...
0
votes
1answer
68 views

Unable to change the length of a global 2D storage array

I am facing difficulties changing the length of a global 2D storage array. It seems to be working correctly on Remix IDE, but when I try to test it on ganache-cli (formerly known as testrpc) - either ...
0
votes
1answer
403 views

Error when trying to create new Solidity contract using Geth

Very new to Geth and Ethereum, and I'm just trying to create my first contract and deploy it to my private blockchain using Geth. Geth version 1.7.3 Below is my Solidity contract code: pragma ...
0
votes
1answer
69 views

minimumBet Appears to be Returning Incorrect Amount

I'm following this tutorial, which seems like a great intro to solidity contracts, but I've got an issue where I don't see the same results as on the post. When calling minimumBet from remix.solidity,...
0
votes
1answer
50 views

Structs and their content

When I'm creating structs, and those structs contain various types of variables, uint, string etc. Should i declare the visibility and if constant on those variables like with state variables?
0
votes
1answer
258 views

Transfer a fixed value of ether

pragma solidity ^0.4.19; contract Test { address one; function Test(address _one) public { one = _one; } function send1() public payable { one.transfer(10); } function send2() public ...
0
votes
1answer
305 views

I cant get the value of a state variable public

I am developing a smart contract which I have two contracts(A and B). I have an array variable in A and fill it with values but when I get that variable from B, the array address is empty. pragma ...
0
votes
1answer
3k views

Airdropping ERC20 Tokens to multiple addresses in a single transaction

done , wrong question. better to use this contract ERC20 { function transfer(address _recipient, uint256 _value) public returns (bool success); } contract Airdrop { function drop(ERC20 token, ...
0
votes
1answer
917 views

How to create random number in solidity except sha3? [duplicate]

I am using sha3 to create 3 unique id in a same function. But results are same for all of them because it is using timestamp like this "uint256 random = uint256(sha3(block.timestamp)) +1;". So, I ...
0
votes
0answers
27 views

What's the best way to monitor contract variables whilst developing?

I'm running a contract locally using Truffle, is there a way I can keep track of the variables in real-time whilst interacting with it on the front-end (Web3). I guess what I'm looking for here is ...
0
votes
1answer
173 views

Missing Token Contract Address

Two months ago, I wrote solidity contracts on remix.ethereum.org. They compiled and ran fine. This code, which you can see here https://gist.github.com/anonymous/1b5c669c09683f285d44c36ab40555dd , ...
0
votes
2answers
77 views

Error when Creating a Contract - related to Mapping

When I create a ABC_Creator Contract. It gives the following error. The code works fine for the intent. Wondering why is this error showing up, what is the invalid opcode and what can be done to ...
0
votes
1answer
133 views

function inheritance doesn't work

Why does the attached contract always throw an invalid opcode when I execute test() and verify() (in that order)? pragma solidity ^0.4.10; contract Parent { uint value; function isValueOne(...
0
votes
1answer
530 views

Solidity Debugging in Remix

I am working Remix Browser for the following simple Contract. I had a couple of questions. I could not find the right answers. During Contract Creation: It gives the following error. What is ...
0
votes
1answer
329 views

Why does Remix / Metamask sometimes fail to publish a contract

When I paste my contract into Remix and try to Create it, I occasionally get: callback contain no result Error: SyntaxError: Unexpected token < in JSON at position 0 If I click create a few more ...
0
votes
2answers
343 views

Start and endblock function Reverted Transactions

I am trying to create a function which allows users to only purchase tokens in between specific block numbers reverting all other transactions that try to purchase after or before theese block numbers,...
0
votes
1answer
53 views

Why does this smart contract compile? [duplicate]

Can someone please help me understand why this smart contract compiles in ReMix? What is the purpose of the word constant if it doesn't preclude the code from changing the state? I'm looking for a ...
0
votes
2answers
690 views

I need help with a crowdfunding contract

This crowdfunding contract is far from complete, I'm still in the process of writing the code and testing each individual function. The approach that I have taken with the getRefund() function seems ...
0
votes
1answer
489 views

Creating contract from another contract - remix issue

UPDATE: This works fine on the testnet/mainnet. For some reason the JavascriptVM in remix doesn't like it. If anyone from remix sees this and could lend a hand though! I wrote some a contract ...
0
votes
0answers
547 views

"callback contain no result Error: Error: base fee exceeds gas limit" when call selfdestruct function (using Remix IDE)

I'm testing this simple contract. All the functions works well, but when I call the kill() function I'm getting this error: callback contain no result Error: Error: base fee exceeds gas limit I'm ...
0
votes
1answer
14 views

buy function is not working please help

transact to FpsCrowdsale.buyTokens errored: VM error: revert. revert The transaction has been reverted to the initial state. Note: The called function should be payable if you send value and the value ...
0
votes
3answers
3k views

how to use import "@openzeppelin" in remix or import "https://github..." in truffle?

I can do import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; in truffle and import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20....
0
votes
3answers
241 views

ABIs and Solidity programming

This is a practical question. I am developing an application in Solidity with Remix. One thing that takes a lot of time is that when I make changes in the code, I then have to compile it in Remix and ...
0
votes
2answers
376 views

Remix IDE: Infinite gas problem with withdraw(...) method

I am trying to compile the following contract. I am using Remix IDE. It is giving me infinite error in the Withdraw method. pragma solidity ^0.4.24; contract financialContracts4{ ...
0
votes
2answers
224 views

Calling external contract running out of gas?

hope you can assist. I have this very basic template setup, where contract TokenVote should simply store some data on the SimpleStore contract (Sort of eternal storage) Yet my code always runs out ...
0
votes
1answer
771 views

Lottery Contract for an ERC20 token

I've just recently started developing in solidity and was wondering if I was using the ERC20 standard correctly. When I attempt to test the contract on remix i get "Error: gas required exceeds ...
0
votes
2answers
318 views

Deployment to ropsten through remix works but mainnet fails

I just tried to deploy a smart contract to the mainnet. The transaction failed: Etherscan link The error is Warning! Error encountered during contract execution [Reverted] Before I tried to ...
0
votes
1answer
23 views

create Tookens problem

For some time I have been writing my own tooken. I call it COIN I come across the last three problems: my fallback function does not work code: function () payable { createTookens (); he ...
0
votes
1answer
4k views

Remix Solidity Compiler does not work after the update on my browser

http://remix.ethereum.org Remix Solidity Compiler does not work, solidity compiler does not show up. I guess there is heavy load on the web-page of remix so browser could not handle it and freezes. ...