Questions tagged [solidity]

Solidity is a high-level language whose syntax is similar to that of JavaScript and it is designed to compile to code for the Ethereum Virtual Machine. A contract in the sense of Solidity is a collection of code (its functions) and data (its state) that resides at a specific address on the Ethereum blockchain.

Solidity is a high-level language whose syntax is similar to that of JavaScript and it is designed to compile to code for the Ethereum Virtual Machine.

2349 questions
0
votes
1 answer

KeyError: 'Value' when running slither on a contract

Python version: 3.8.5 Solc version: 0.7.0+commit.9e61f92b.Linux.g++ Slither version: 0.6.13 When trying to run slither . on a solidity contract I get the following stack trace: Traceback (most recent call last): File…
Token Joe
  • 159
  • 9
0
votes
0 answers

ERROR: invalid address (arg="", coderType="address", value=[0])

I am building a token smart contract using truffle and ganache. i was testing the transfer function. Code is in the image below In my token.sol file i created a function name transfer function transfer(address _to, uint _value) public { When i ran…
0
votes
1 answer

How to manage ownership of contract while deploying

I have three contracts: Contract1.sol, Contract2.sol, Contract2.sol. And this truffle migration file: const _startBlock = 18; module.exports = async function (deployer) { deployer .deploy(Contract1) .then(async function (instance) { …
Soufa
  • 1
0
votes
0 answers

How to use node path with wsl?

I am developing Solidity contracts on Windows WSL2 and have not found a way to mount the underlying diskspace to compile the contracts. Anyone have any suggestions? Ex: compile.js const path = require('path'); const fs = require('fs'); const solc =…
Jason Sprouse
  • 61
  • 1
  • 4
0
votes
1 answer

How I call a function with multi accounts?

I created a smart contract that should execute a function after its called by two owners, if and only if both owners call for function X, then this function is performed. It's like a multi signature type. My code is below, but its still not…
Vincent
  • 117
  • 9
0
votes
1 answer

How to insert user input data in an array in remix IDE using solidity?

I am a beginner learning solidity language. How can I insert the user input data in an array in solidity language. Following is the code I have coded so far with some errors. pragma solidity ^0.4.19; contract SampleContract{ struct User{ …
user10309403
0
votes
0 answers

Sending value from escrow contract address with transfer function

I want to call transferMoney() function which should send value (requests[_id].value) to an address address(uint160(requests[_id].provider)) with the transfer function of solidity. When I call this function via my DApp-Frontend using MetaMask, first…
0
votes
0 answers

Can I create smart contract on solidity like forsage.io/doubleway.io with custom erc20-token?

`constructor(address ownerAddress) public { levelPrice[1] = 25 ether; for (uint8 i = 2; i <= LAST_LEVEL; i++) { levelPrice[i] = levelPrice[i-1] * 2; }` If i put a price value Custom token (not "ether".…
0
votes
1 answer

Console loging a double array from a solidity function?

I'm doing chai tests and want to get a double array from a smart contract function and console log it. My function: function getBuyOrderBook(string symbolName) constant returns (uint[], uint[]) { uint8 tokenNameIndex =…
heyooo12
  • 53
  • 1
  • 9
0
votes
1 answer

How to create a server socket in Ethereum?

I need my Ethereum app to receive messages coming from outside through an SSL socket. I have no idea how realize it. Have you got any suggestion? I was thinking of creating a socket inside the app.js, but how? Can anyone help me, by giving me some…
Vaahn69
  • 23
  • 2
0
votes
0 answers

how do I run solidity-coverage to an external ganache instance

I'm trying to run a coverage report for the solidity smart contracts using solidity-coverage npm. I'm using the Truffle framework with external ganache instance and openzeppelin library. When I run solidity coverage using truffle run coverage,…
FLASH
  • 491
  • 2
  • 5
  • 10
0
votes
1 answer

Create map of existing objects in mint function for a smart contract

I'm really new to solidity and there is still alot I dont fully get. I have created this smart contract. I am getting an error while performing a test stating that the id to be set by the push cant be performed due to the following: Error: Different…
0
votes
0 answers

how to install SolidityCoder or get Coder.js as a standalone file?

How can I install or get coder.js mentioned in the following link: https://ethereum.stackexchange.com/questions/6615/is-there-a-way-to-use-the-web3-coder-module-as-a-standalone/6622
0
votes
0 answers

Try to transfer eth from one contract to another, but always complain error

This is the function to be called: function hackContract(address payable account) public { //crowdsaleAddr = account; uint256 totalReceived = address(this).balance; account.transfer(totalReceived); emit PaymentReleased(account,…
Chan Austin
  • 1,724
  • 3
  • 10
  • 16
0
votes
1 answer

Random "github" folder under browser in File Explorers in Remix IDE

Why do I get this random folder named "github" under browser in File Explorers in Remix IDE? It wasn't there when I started using Remix IDE but after a month or two it just appeared. I can't delete it or do anything with it. It's empty and I tried…
Nikola
  • 3
  • 1
1 2 3
99
100