Questions tagged [remix]

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

Filter by
Sorted by
Tagged with
1
vote
1answer
28 views

Using contract to create Child contracts (web3j Java wrapper)

I have a simple Parent contract that creates child contracts and stores their address. contract Parent { address[] public registry; function createChild () public { address newChild =...
0
votes
0answers
11 views

How to decode InputValue of ethereum using java web3j

**I'm trying to decode the inputValue of an transaction using web3j without using any contract abi and wrapper class,Im loading the contract using its contract address ,is there any way/inbuilt ...
0
votes
1answer
35 views

Gas estimation failed when using web3 provider testrpc

Gas estimation failed error while invoking a simple function pragma solidity ^0.5.9; contract sample{ uint number; function setNumber(uint _number) public{ number = _number; } ...
0
votes
2answers
30 views

Linking to Compound Smart Contract

I'm still new with the solidity and it seems to be a very basics question. What i'm trying to do is to call the link the compound smart contract with mine. And when i try to compile is complaining : "...
2
votes
2answers
837 views

Gas estimation failed in Remix

Can't really use the transfer function as it is written. It assumes the owner uses it. So made a new function for the "minting" function for the faucet to use. Not sure why the compiler message is so ...
0
votes
0answers
6 views

Difference between “decoded input” and “input” in Remix?

What is the difference between "decoded input" and "input" in the remix output? If these functions were to be called in an actual blockchain, would the "decoded input" be saved in a block, and thus ...
0
votes
1answer
18 views

How to substitute attributes instead of roles in access control coding for solidity?

Say, the role-based access control consists of two roles. But if I want to replace the roles to maybe location and time, how to go about it?
0
votes
1answer
21 views

Error when checking the value in a mapping

I am trying to keep track of the number of bidders in my contract. function bid() public payable an_ongoing_auction returns (bool){ uint oldval = bids[msg.sender]; require(msg.value+oldval &...
0
votes
4answers
157 views

Gas estimation failed - remix

I am trying to figure out what is wrong with the following code as it does deploy successfully on remix. pragma solidity ^0.5.11; contract MyContract { // Storage address contractOwner; ...
0
votes
1answer
59 views

Solidity not updating value from delegate contract [SOLVED]

Assuming this contract: contract getSome { finalizeToken token; constructor() { token = finalizeToken(0xdc0974e65e479fa587118eb7588f426229a39d31); } function testWrite() ...
0
votes
1answer
48 views

i want to get data from the transaction hash i tried many codes at last i am getting boxes in the output

1) First, I got the input console.log(web3.eth.getTransaction('0x725fc75264726f409793164e336e7d5ed35df8d2be469a0cc1a3a8cc4756b9b9').then((i) => console.log(i) )); 2) I manually pasted the input ...
0
votes
1answer
50 views

i have erorr when sendTransaction web3

file javascript //smartcontract window.onload = function() { if (typeof web3 === 'undefined') { document.getElementById('metamask').innerHTML = 'Instal metamask dulu' ...
0
votes
1answer
49 views

How can I read the entire Solidity warning in the Remix browser?

When I get a Solidity warning in the Remix browser, I can usually just hover over the warning symbol to the left of the editor and read the error message. But, this time the end of the error message ...
8
votes
2answers
700 views

TestRPC and Metamask: hanging on pending transactions

I'm using Remix and connecting to Testrpc via Metamask. I can successfully launch contracts to testrpc, but then it hangs on the subsequent calls that Remix makes to the public methods (Remix says "9 ...
0
votes
1answer
18 views

How to store data on ethereum blockchain WITHOUT IPFS

Hi guys ^^ i want to store PDF file on ethereum blockchain without use of IPFS. I want to do it because i have my own private network where this data will be only stored. That's why i want to store it ...
1
vote
1answer
47 views

Vyper fundraising smart contract: 'Attribute' object has no attribute 'func'

[SOLVED]: See below. I am taking a blockchain and security class and we are working with vyper. We have been tasked with rewriting a fundraising smart contract. However, the compilers do not seem to ...
2
votes
1answer
49 views

Ethereum Smart Contract deployed token not showing

pragma solidity ^0.4.24; contract owned { address public owner; function owned() public { owner = msg.sender; } modifier onlyOwner { require(msg.sender == owner); ...
1
vote
2answers
511 views

Calling a function from a contract passed in as an argument

Im Trying to create a DAPP with two contracts generating assets. One is acting as the "factory" for the other contracts. From the latter I try to call a function in the factory without knowing its ...
0
votes
2answers
359 views

Remix warning - Is constant but potentially should not be.

I am getting the warning on the code shown below. Could you please assist me know to resolve this warning ? warning message - "Is constant but potentially should not be"
0
votes
1answer
147 views

How to set default gas limit for my custom private network?

I've connected to my custom private ethereum network in remix with web3 provider. Everything was fine, account balance, and address was retrieved successfully. But I don't know why, but I could not ...
0
votes
0answers
9 views

nested calls fail on geth --dev but pass ganache-cli

I have the following solidity contracts defined. I want to test nested calls using the lowlevel api where C->D->E. However, running this code passes on ganache-cli but fails on geth --dev node. Im ...
0
votes
1answer
40 views

Why is gasestimate coming as “infinite” when I'm trying to return a dynamic array in solidity?

I understand, that as the list grows it is going to cost infinite gas. I'm making a temp array in memory of size of our dynamic array at present size and then returning that array. But does that make ...
0
votes
2answers
21 views

How to find private keys on Remix ide

I want to sign a message on Remix and I can't find the pair of private/public key. For example - I going to Deploy & Run Transactions, then trying to "Sign a message using this account key" with ...
3
votes
1answer
56 views

How to use enums for conditions on constructor?

I am learning to code with solidity. need help to solve this I have a membership system where users can have basic, gold, diamond membership types. Users can use coupons every 5 minutes and for basic ...
0
votes
1answer
52 views

remix - gas limit exceeded, but contract is running on blockchain

i studying remix and ethereum, and create my local blockchain. and create contract with remix.the contract just print simple word. pragma solidity ^0.4.8; contract HelloWorld{ string public ...
3
votes
2answers
72 views

Format of Event logs structure in Remix

I am running a simple contract in remix. I have an event in my contract which will be emitted just to check values of stateVariables. contract stateVariable{ uint stateVariable1=10; uint ...
0
votes
1answer
37 views

Can I write a smart contract to access a database and verify details of a student?

I have to write a smart contract to create a degree certificate of a student in the University. To generate the certificate, I have to clear all the dues in my University's library, Sport's department,...
0
votes
1answer
11 views

browser/demo01.sol:8:33: ParserError: Expected '{' but got 'return' function age() private view return (unit) ^----^

pragma solidity ^0.4.24; //properties functions request contract AttrFnDemo{ uint private _age; string internal _name; int public _num; function age() private view return (unit) {...
1
vote
0answers
19 views

Is there a way to view the private key of test account in Remix (javascript VM)

Seeing how the keys are random and those "100 ethers" aren't real I can't think of why this is not obvious functionality, I'll need this for many reasons.
0
votes
0answers
14 views

Solidity's address.transfer() function throwing exceeds gas limit error

I am learning Solidity in order to make a simple user interface in which users can purchase items and have ether sent from the purchaser to the Store. First, I have created one contract, one for the ...
1
vote
2answers
100 views

Array Costs in Solidity

Why is storing in an array the first time in solidity costs higher than the other times? The other times it has a constant cost which is less than the first time.
0
votes
1answer
28 views

Compile source code error expected pragma

I am getting an error when coding a token with the Ethereum wallet. Namely, Expected pragma, import directive or contract/interface/library definition. function burn (uint256 _value)public returns(...
1
vote
1answer
35 views

Multiple Array[] along with mapping handling

This code is running but when the same user make a bid then the bid is being replaced from the first bid and event is printing twice the same record. i want that one address make a bid and for his ...
0
votes
1answer
111 views

Function burnfrom error: gas required exceeds allowance or always failing transaction

I have created a contract using Remix. When I run the function burnFrom(), it shows: gas required exceeds allowance or always failing transaction. What am I doing wrong? function burnFrom(address ...
2
votes
1answer
25 views

Contract - Demo - Identifier - Only 3 Lines for my contract to work - ¿does somebody know how to fix this?

pragma solidity ^0.4.23; contract Owned { address owner; function owned() public { owner = msg.sender; } modifier onlyOwner { require(msg.sender == owner); ...
0
votes
0answers
33 views

Gas estimation errored with the following message (see below). The transaction execution will likely fail

When I try to excute the deposit function it shows Gas estimation errored with the following message (see below). The transaction execution will likely fail. Do you want to force sending? execution ...
0
votes
1answer
209 views

Store data on ethereum blockchain from a text file

I have a simple smart contract running over a local Ethereum node. It has two functions: one for sending data and another for retrieving it back. I have a text file and want to send data from it to ...
0
votes
1answer
84 views

Unable to connect to 'Web3 Provider' on Remix using http connection

I am using an http connection to connect to the Web3 Provider using Remix. The port 8454 is listening as expected. I am getting the following error: Not possible to connect to the Web3 provider. ...
0
votes
2answers
39 views

Tokens on a Contract

Want to get tokens amount sent to my contract address on chain, but don't know address of token. Can I get through any function ? Any possible way to so ?
0
votes
1answer
46 views

The correct approach to changing inherited variable content

What is the correct approach to change the content of an inherited variable? If contract A inherits contract B which has an variable b, and contract A is initialising the inherited variable b ...
0
votes
1answer
17 views

REMIX debugger invalid opcode before JUMP

I am testing simple ERC20 token creation with the following in remix: pragma solidity ^0.5.0; import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v2.4.0/contracts/token/ERC20/ERC20....
1
vote
1answer
25 views

mapping Struct to bytes32 can't read from map

I am saving under byte32 key some struct, it is saved, but I really trust it is saved at all. When try to read, I get 0x0 in all fields. mapping (bytes32 => Document) documents; bytes32[] public ...
0
votes
1answer
15 views

what is declaration error in remix ide and how to solve it

What is declaration error here! I can't figure it out and the error is shown as an unidentified declaration error. Please help me out
0
votes
1answer
26 views

Contract failing at updateUserTask

The contract intends to create a set of tasks dynamically, eg: tasks can be added(There is no need for deletion.) Some tasks will be related by a variable within the struct called smart contract Each ...
2
votes
1answer
39 views

How to get the return type of a function of an already deployed contract?

I am currently working on a real estate blockchain project. Now I have 2 contracts user.sol and property.sol. The person who is registered on the website through user.sol can only buy or sell property ...
0
votes
1answer
15 views

Get contract data if all I have is a contract address

I have the address of a smart contract and I need to get the data residing in that address. I seem to have been struck at this for a while now and I want all this inside a smart contract. pragma ...
0
votes
0answers
26 views

Error with the function

pragma solidity ^0.4.24; contract XXXX{ address owner; constructor()public { owner=msg.sender;//To store address of contract deployer } struct Project//struct to ...
0
votes
1answer
60 views

Getter and Setter Functions in Solidity not showing any output

I have written a smart contract with the Getter and Setter functions but it is not showing any output in IDE-Remix. My code is ''' pragma solidity ^0.4.21; contract GetandSet{ string name; ...
0
votes
1answer
78 views

I want to withdraw amount from Receiver Contract's tokenFallback() function in ERC223 how to implement this scenario?

I am using ERC223 standard token transfer contract and receiver contract which includes tokenFallback(). I've transferred tokens from my ERC223 contract to receiver's contract address, now I want to ...
0
votes
1answer
53 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,...