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
601 views

Remix Warning : Assert

I am trying to compile a contract on remix and have run into the following warning : Use assert(x) if you never ever want x to be false, not in any circumstance (apart from a bug in your code). ...
1
vote
2answers
136 views

How to manually add numbers to CappedCrowdsale

How do I add number of hard cap tokens in the below code (where in code), for instance 2000 ETH. I cant add it in Create of RUn (Remix) since Crowdsale and CappedCrowdsale are separate contracts. ...
0
votes
1answer
309 views

msg.sender returing 0x000

pragma solidity ^0.4.18; contract TransferFunds{ address owner; mapping (address => uint) public balances; event Sent(address from, address to, uint amount); function ...
0
votes
1answer
258 views

Contract is deployed but token is not there?

In Rinkeby, I deploy the following contract on Remix (injectedweb3). I pay contract, it goes well, gives Contract address BUT on Mist contract is watchable (can find with address) + Etherscan Rinkeby ...
-1
votes
1answer
325 views

What is the problem with Transfer function?

Here, ERC20(token) - 'token' is given Undeclared identification issue, why? // low level token purchase function function buyTokens(address beneficiary) public payable { require(beneficiary != ...
0
votes
1answer
355 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 ...
1
vote
1answer
1k views

msg.value instead of this.balance

What the theory behind using msg.value instead of this.balance when e.g withdrawing contributed funds from a contract? E.g wallet.transfer(this.balance); wallet.transfer(msg.value);
12
votes
4answers
4k views

How to Compile and Deploy a Smart Contract without running a full node?

I'm new to solidity and smart contract programming. I have already made and deploy smart contracts successfully, but always using Mist. Now I'm not able to do so, because I can't complete a node ...
0
votes
1answer
970 views

How to convert decode/encode string to Base58?

How to convert decode/encode string to Base58 on solidity?
1
vote
1answer
2k views

How to input multiple arguments in remix?

My contract has a function transfer(address _to, uint256 _value) returns (bool), I want to run this function in remix injected web3 env. I wanted to transfer 100 tokens of this contract https://kovan....
1
vote
0answers
1k views

Zeppelin StandardToken infinite gas

I am trying Zeppelin StandardToken contract, and see warnings on infinite gas. Why this happens? Gas requirement of function BasicToken.transfer(address,uint256) high: infinite. If the gas ...
2
votes
1answer
148 views

When do we typecast an ethereum address to a contract name ? Also, what is the purpose of the same?

I have been learning and working on Solidity for quite a while now. One thing that I have seen in many codes but did not understand was typecasting (looks like typecasting to me) of addresses to a ...
0
votes
1answer
57 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
2answers
1k views

Why MetaMask always asking high gas price? which one can i use alternative to metamask for token distribution?

While i am distributing tokens i am using a special contract to airdrop the tokens to multiple addresses at a time but metamask is demanding high gas prices which costs me huge am always ...
0
votes
1answer
44 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
2answers
579 views

remix not showing me any error but output 0

pragma solidity ^0.4.19; contract Bank{ uint private value; function Bank(uint amount){ value = amount; } function deposit(uint amount){ value += amount; } ...
2
votes
2answers
102 views

Remix not allowing public arrays

I've seen sample code in various places that have public arrays, but when I try to create this contract in Remix: pragma solidity ^0.4.19; contract Ballot { uint8[] public proposals; } It always ...
0
votes
1answer
180 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 ...
1
vote
0answers
376 views

'out of gas' error when running a payable function on Remix+TestRPC

I'm using Remix connected to TestRPC and I'm getting an out of gas error when calling the sendEther() function with the argument set to the address of one of the accounts created by TestRPC at startup:...
1
vote
2answers
567 views

How to know solidity version of remix for already deployed contract

I recently deployed a smart contact using remix and MyEtherWallet. The contract is deployed successfully. But when I am trying to verify the contract code on etherscan. I need compiler version for ...
1
vote
1answer
1k views

Transferring ether from test account to contract in Remix

I have a contract successfully deployed and working well in the Javascript VM on Remix. contract BlipCoinIco is PausableToken { *snip* function() isIcoOpen payable { totalRaised = ...
0
votes
1answer
641 views

How to call Internal functions ? or how to protect Withdraw and kill functions?

I had some function like withdraw and self-destruct functions set as internal, but I can't call them from "Mist", then I turned them to public but I set the modifier : modifier isOwner() { if (msg....
1
vote
1answer
2k views

getting contract address on remix compiler

When a contract is deployed on remix online web compiler, it displays the deployment by showing: browser/thecontract.sol:TheContract at 0xb9b...3de18 (blockchain) How can we copy/paste the full ...
1
vote
1answer
37 views

BurnTotalSupply

If all tokens are distributed and no one is burning their own tokens then how can a function like below burn from total supply? can a function like this really burn other peoples tokens? function ...
0
votes
1answer
912 views

Why view/pure functions need gas?

pragma solidity ^0.4.11; contract Test { function toBytes(address a) public pure returns (bytes b) { assembly { let m := mload(0x40) mstore(add(m, 20), xor(...
2
votes
0answers
387 views

undefined contract address when trying to deploy with web3 and Metamask

I am trying to develop a simple wallet type contract but having troubles deploying it. I am trying to deploy it using the method described here. I am using truffle and web3 along with Metamask. Now, ...
0
votes
1answer
134 views

How to verify whether an address variable points to an existing account?

function pay(address payee, uint value) public { // How to ensure that payee is an existing account? payee.transfer(value); } Many thanks!
1
vote
2answers
636 views

How to find input creation byte code for constructor argument?

I want to verify and publish my solidity source code on Etherscan.io. My smart contract has an argument in it's constructor for which I need to fill a field in the form that takes Constructor ...
0
votes
1answer
351 views

Contract working on Remix but not with truffle

I have a simple certifications contract that sends a certification to the blockchain. This is the full contract: pragma solidity ^0.4.2; /// @title Sending and storing certifications to the ...
0
votes
1answer
271 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 ...
1
vote
2answers
398 views

How does web3.py cope with constant getter functions?

I've build a smart contract and now I'm testing it using the python interface of web3.py. In my contract, I declared some private variables and I created getter functions with modifiers to return ...
0
votes
1answer
2k 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, ...
1
vote
2answers
815 views

Unable to test allowance and transferFrom function in a ERC20 contract?

I am learning ERC20 contract and stuck with allowance and transferFrom part. Approve function approves an allowance for an address (spender) to transfer tokens from owner's contract to another ...
9
votes
3answers
6k views

Is it possible to include all the openzeppelin library files on Remix?

I am trying out Remix as an IDE. However, I'm using the excellent open-zeppelin library for development. Is there any way to include all the files from open-zeppelin in the build path for Remix ...
4
votes
2answers
451 views

Run EVM Code outside the Blockchain

is there any way to execute functions on a smart contract (as EVM-Bytecode) in a separate program like evm (provided by go-ethereum) without having to run a test-network? I need to find a way to run ...
1
vote
1answer
4k views

Transaction revert in Remix

Here is my contract pragma solidity ^0.4.14; contract Sample { address private receiver; uint public amount; function pay(address _receiver, uint _amount) payable public returns (bool) { ...
1
vote
1answer
635 views

One-to-many Token Transfer with address specific values [duplicate]

I'm trying to figure out a way to transfer some tokens from my address to multiple other addresses which all must receive a specific value associated with the specific address, how would I go about ...
0
votes
1answer
797 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
26 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 ...
1
vote
1answer
838 views

Function does not return value [duplicate]

The function caller() below does not return any value pragma solidity ^0.4.18; contract M2M{ function setvalues(uint a ,uint b) returns (uint){ return a; } function caller() ...
2
votes
3answers
1k views

How to receive/swap tokens on a new Solidity contract?

hope you can assist me on this matter: Scenario: One year ago a token has been created. Right now, the developer wants to add some nice feature for the users. The users need to send X amount (let's ...
1
vote
2answers
357 views

What is At Address placeholder in solidity online compiler?

On solidity online compiler along with create contract button/div there is another placeholder At Address what does it do? Picture is attached for reference.
1
vote
1answer
631 views

Unable to transfer funds in contract

Inside Remix I'm using one address (addr1) to deploy the contract, and another (addr2) to call a function within the contract. The function is a simple transfer function. I'm transferring ...
1
vote
1answer
850 views

Is there a maximum size for arrays in Solidity?

In my solidity code I define 3 arrays with around 700 elements inside. However, when I try to deploy the contract using Geth I am having the following error message: Error: oversized data undefined ...
2
votes
2answers
2k views

`Error: authentication needed: password or unlock` in solidity chrome plugin. Couldn't deploy smart contract to local node

I run local private ethereum network using the below commands. ./geth --datadir=./data/test init genesis/genesis.json ./geth --datadir=./data/test --rpc --rpccorsdomain "http://localhost:8000" --...
0
votes
1answer
660 views

Contract throwing VM exception: Invalid Opcode

pragma solidity ^0.4.0; import "github.com/oraclize/ethereum-api/oraclizeAPI.sol"; contract DieselPrice is usingOraclize { event one(string description); event newDieselPrice(...
1
vote
1answer
1k views

Is it possible to pass struct as a parameter of function in Solidity without using Libraries?

Isnt it possible to do something like following in Solidity? ps: i am taking example of "C" thinking it is somewhat similar to solidity. Correct me if i am wrong #include <stdio.h> struct ...
3
votes
2answers
957 views

How to pass struct data type in constructor?

let us suppose my contract looks like: contract Site_contract{ struct details{ bytes32[] name; bytes32[] location; uint256 number; } site_details private ...
2
votes
1answer
1k views

VM error: invalid opcode resulting from array operations

pragma solidity ^0.4.18; contract VectorTest { /* this runs when the contract is executed */ function VectorTest() public { // initialize the variables } // returns an int ...
2
votes
0answers
171 views

Remix/Android wallet app?

Is it possible to create an ethereum smart contract using remix from the browser of your android device and then linking it to your android ether wallet app without using a PC anywhere along the token ...

1
25 26
27
28 29
33