Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [remix]

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

0
votes
0answers
18 views

How should I pass a nested struct as a function argument in Remix IDE?

Example contract: pragma solidity ^0.4.24; pragma experimental ABIEncoderV2; contract someContract { struct structOne { uint a; } struct structTwo { uint b; ...
1
vote
1answer
16 views

Create Contract Solidity 0.5

My code works with compiler 0.4.25 but not with the latest version. I want to keep track of every "Contract 2" that "Contract 1" create. Contract 1 uint public countContract; address[] public ...
1
vote
1answer
14 views

Encoded input params

I created a simple test contract with a single method: pragma solidity ^0.4.24; contract SimpleTest { function testFunc(string name, bool isFirst) public { //do stuff } } I'm ...
0
votes
2answers
148 views

Remix IDE error: send transaction failed : invalid address. if you use injected provider, please check it is properly unlocked

I've got the error message in the title when I'm trying to deploy my contract: pragma solidity ^0.4.22; contract University { address public owner; address public student; address ...
0
votes
0answers
25 views

How dapp owners pay for their clients transcaction fees in the Ethereum Blockchain?

I am currently dealing with a problem in Ethereum Blockchain. I wrote a smart contract in Solidity Language, about a site that someone can make his Registration and after the transaction is completed ...
0
votes
1answer
35 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
43 views

The funds sent to the contract do not show the correct value on the side of the contributor.?

The question is not answered that's why I ask again. Can someone tell me and point out ( correct me) where the problem lies. Eth has been sent to the crowdsale contract successfully. BalanceOf and ...
1
vote
1answer
17 views

Why is solidity throwing “Note: The constructor should be payable if you send value. ”, when clearly the issue is elsewhere?

I'm writing a contract on Remix that is able to deploy and track child contracts. Here are the 2 contracts: pragma solidity ^0.5.0; Contract Factory contract ContractFactory{ ChildContract[] ...
0
votes
2answers
41 views

How to check transferfrom and burnfrom function in remix?

I am creating simple ERC20 token which involves functions like transfer burn totalsupply transferFrom burnFrom How can I check function transferFrom and burnFrom from remix browser because it ...
1
vote
3answers
863 views

How to see events in Remix - Solidity

I am new to solidity and trying to deploy a contract to see whether the address is EOA or Smart Contract. The code is listed below. I am not able to see the boolean value when I executed the contract ...
1
vote
1answer
36 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
39 views

Solidity not updating value from delegate contract [SOLVED]

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

Remix IDE: How to get rid of the stated warning message on the online Remix IDE

I am trying to compile the following contract on Remix IDE. pragma solidity ^0.5.1; contract ProofofExistence{ event ProofCreated( uint256 indexed id, bytes32 documentHash);//an ...
1
vote
1answer
37 views

Smart Contract To Send Multiple Outputs

I'm learning about smart contracts currently and a bit confused as to how they really work. My website allows users to send ETH from their wallet on site to another address off site. During which I'd ...
0
votes
1answer
42 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
36 views

Is there any way to debug a smart contract bytecode by Remix?

I'm looking for a way to avoid using 3-rd party tools to debug smartcontract without source code. Can I do it by Remix? I think this way: we need some tool to convert a bytecode or assembly of ...
0
votes
1answer
42 views

Solidity smart contract interacting with deployed smartcontract

Below are the steps (take note, no issues when I test this on remix, it works absolutely fine) Two smart contracts, Usermapping.sol and CoffeeNetworking.sol in truffle "2_deploy_contract.js" enable ...
0
votes
1answer
42 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); _; } } ...
2
votes
1answer
13 views

What is the alternative to using **label** in solidity inline assembly code?

What is the alternative to using label in Solidity inline assembly code? Label is deprecated in new version.
2
votes
1answer
17 views

Invalid implicit conversion from uint256 to bytes memory requested

I am trying to create a simple random function but it gives me an error. I can't figure out what I do wrong. Solidity 0.5.0; function random() private view returns(uint){ uint source = ...
0
votes
0answers
28 views

TypeError: Data location must be “memory” for parameter in function, but none was given

Contract fail to compile in IDE Remix.due to the following error: TypeError: Data location must be "storage" or "memory" for parameter in function, but none was given. version:0.5.6+commit....
2
votes
1answer
44 views

Remix + Metamask not fetching any values

I have a simple test contract that stores a hash and I deployed it via Remix and Metamask pragma solidity 0.4.25; contract Hash { bytes32 hash; constructor(bytes32 _hash) public { ...
0
votes
1answer
42 views

The constructor should be payable if you send value ? It seems no error on my code

I am a student who studies solidity now. I am following the tutorial now to study how to write solidity code on Remix. But I think below code does not have any problem, but it keeps making an error. ...
0
votes
1answer
43 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 ...
0
votes
1answer
44 views

Static Analysis raised 9 warning(s) that requires your attention. Click here to show the warning(s)

I receive these warnings in REMIX so the question is: Can I compile my contract and then verify it regardless of these warnings? pragma solidity ^0.4.25; library SafeMath { function mul(uint256 a,...
0
votes
3answers
183 views

Remixd fails to run, cannot find web3-requestmanager

I have installed remixd using NPM. If I run it, it gives me the following error: Error: Cannot find module 'web3-requestManager' at Function.Module._resolveFilename (module.js:555:15) at ...
0
votes
1answer
49 views

How is gas adjusted for a transfer in solidity?

I am using Remix with Metamask on the Ropsten test system, and when I try and transfer Wei I get a gas error. I tried a few combinations but there are various errors relating to gas. Has anyone any ...
0
votes
1answer
12 views

error handling in sending custom token to multiple addresses in one transaction

i am trying to write a contract in which there is a function to divide the amount into equal parts and then deposit it into multiple accounts in one transaction. The problem is that, i want function ...
1
vote
2answers
120 views

what is the meaning of 0x0? say when variable gets assigned to it, example: keccak256(number) = 0x0;

Is 0x0 just zero? thanks keccak256(number) = 0x0; Or when not used as address I mean just to denote variable?
0
votes
1answer
48 views

Set a number in Remix payable source

There's buyprice on function buy and sellprice on function sell. I would like to set up 1 ETH = 10000(SYMBOL) 0.1 ETH = 1000 (SYMBOL) 0.01 ETH = 100 (SYMBOL) 0.001 ETH = 10 (SYMBOL) HOW can I set a ...
0
votes
2answers
41 views

Infinite gas on assigning struct

I have this code and it gives me infinite gas. please help me improve it. pragma solidity ^0.4.23; // v6 contract owned { constructor() public { owner = msg.sender; } address owner; ...
0
votes
1answer
41 views

Writing contract for airdrop distribution

I have a problem. we have an ico. I would like to use the selfdrop method for airdrop distribution. While the superskynet's ico continued, they also wrote a selfdrop contract. can you tell me how I ...
1
vote
0answers
110 views

web3.eth.getAccounts() : Cannot read property 'map' of undefined

const HDWalletProvider = require('truffle-hdwallet-provider'); const Web3 = require('web3'); const provider = new HDWalletProvider( 'passphrase', 'rinkeby.infura.io/v3/mytoken' ); const web3 = new ...
0
votes
1answer
54 views

SafeMath .add() imposes infinite gas

When I use add() function from Solidity SafeMath library, I get infinite gas requirement in remix (and this reflects in transactions that wont go through). Simplified example: function someFunction()...
0
votes
1answer
25 views

Gas specification for function call

Is it possible to specify gas cost for a particular function call? E.g. Let's say I want a transfer() function to cost 50000000 gas, would I be able to hardcode this into the function?
0
votes
1answer
51 views

How do I take value from array of objects? [duplicate]

I have a problem with my code. contract Registration { address public owner; uint conceptPrice; uint conceptValue; function Registration(uint _conceptPrice) public { owner = msg.sender; ...
0
votes
0answers
35 views

transferFrom function works but approve does not

I'm building an escrow contract and using web3js to interact with it. Currently, I am trying to approve and send an amount of custom ERC20 token from a wallet to the escrow contract. The problem is, ...
1
vote
1answer
31 views

can't call function from contract using web3.js due to gas issue

i'm really new to ethereum and solidity, so any help will be approtiat. i'm building a smart contract and dapp using ganach and web3.js . in my smart contract I have a function(named "add_pilot") ...
0
votes
1answer
48 views

make a contract send a percentage to a specific wallet (always)

how can I make a contract send a percentage to a specific wallet (always)? Example that whenever a transaction is made from this token the 1% go to X wallet. Thank you. Ok felix dolderer thanks for ...
0
votes
1answer
24 views

2FA / Authentication Through Smart Contract

How can I generate something similar to 2FA on-chain? Could the private key or public key be used somehow in secrecy to compute a value or something? I need a way to authenticate a smart contract user ...
0
votes
1answer
30 views

How to split bytes32 into multiples of 8 in solidity

I want to split bytes32 into multiples of 8 (in assembly). I have the following code(After referring here): function testAssembly(bytes32 _msg) public pure returns (bytes8 i, bytes8 j, bytes8 k, ...
1
vote
1answer
234 views

Test function that only fires an event

I have the following function: pragma solidity ^0.4.18; contract PromoContract { uint256 public promoCreatedCount; function createPromoPerson(address _owner, string _name, uint256 ...
0
votes
1answer
48 views

Uncaught error: VM Exception while processing transaction:out of gas

pragma solidity^0.4.18; contract project3{ address owner; struct Users{ string companyName; string role; string country; string city; uint phoneNo; string physicalAddress;} constructor (uint ...
0
votes
1answer
45 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
0answers
12 views

ethereum smart cotract ioT implementation

For the preparation of a project in my thesis, I need to implement ethereum blockchain to control the access of the IoT using smart contract. Can you recommend me a tutorial to prepare this without ...
1
vote
2answers
2k views

No matching declaration found after argument-dependent lookup

Currently I'm trying to find a solution for this problem TypeError: Member "toTimestamp" is not available in contract DateTime outside of storage , and I decided to take another approach. I'...
1
vote
2answers
58 views

Remix doesn't show the constructor call for contract deployment (bug in remix?)

I would like to test sending ERC20 tokens with my client, so I need to create some tokens on a Testnet. I'm using Remix and Rinkeby testnet, but remix is not what I'm used to anymore. When I did this ...
0
votes
2answers
53 views

Smart Contract Withdrawal Function Not Working Properly

For some reason my function keeps throwing at 2nd line, where I'm declaring an uint256 named depositedContribution, I have no idea why and I've tried to debug it for hours with no results, what could ...
0
votes
1answer
52 views

Best practices for importing contracts (Github vs. Including in project)?

On the remix docs, it gives examples of importing contracts from source either locally or from github. I'm wondering for importing standard contracts (like say, OpenZeppelin's ERC20 StandardToken) ...
0
votes
1answer
27 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 ...