Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 36566

Solidity is a contract-oriented, high-level language whose syntax is similar to that of JavaScript and it is designed for writing smart contracts in Ethereum to run on the EVM. Solidity is statically typed, supports inheritance, libraries and complex user-defined types among other features.

0 votes
1 answer
1k views

How to use a variable with an Ether unit suffix

I have this code in my contract: require(msg.value == 0.06 ether); But I want to replace 0.06 with a variable. So I tried this: uint256 price = 0.06; require(msg.value == price ether); But this …
John DeBord's user avatar
1 vote
1 answer
237 views

What type of decentralized programs require a Turing Complete programming language?

For example many Solidity (the Ethereum programming language) tutorials use a voting smart contract as an example to introduce smart contract programming basics. …
John DeBord's user avatar
1 vote
1 answer
78 views

Can't wrap my head around a mapping of mappings

I'm trying to fully comprehend what is going on in a standard ERC721 token. But this statement is really tripping me up: // Mapping from owner to operator approvals mapping (address => mapping (add …
John DeBord's user avatar
4 votes
1 answer
1k views

What is the difference between an approved address and an operator address?

I'm looking at OpenZeppelin's implementation of an ERC721 token and I'm lost at what the difference is between an approved address and an operator address. Here's a code snippet: /// @dev Checks ms …
John DeBord's user avatar
2 votes
1 answer
188 views

How does Ethereum know who called a function first?

Scenerio 1 Say I have a function f(). Whoever calls the function first gets a reward. Persons A, B, and C all call the function at roughly the same time. Who will receive the reward? Scenerio 2 …
John DeBord's user avatar
2 votes
1 answer
381 views

What is the most efficient way to parse a string of integers to an array?

I perform an Oraclize query on an XML file, and receive this string in return: ["31", "25", "24"] What would be the most efficient way to parse through this string and store the numbers into a uin …
John DeBord's user avatar
8 votes
2 answers
11k views

What's the point of ERC721Receiver.sol and ERC721Holder.sol in OpenZeppelin's implementation?

Relevant Code: ERC721Receiver.sol pragma solidity ^0.4.23; /// @title ERC721 token receiver interface /// @dev Interface for any contract that wants to support safeTransfers from ERC721 asset contracts … return `bytes4(keccak256("onERC721Received(address,uint256,bytes)"))` function onERC721Received(address _from, uint256 _tokenId, bytes _data) public returns(bytes4); } ERC721Holder.sol pragma solidity
John DeBord's user avatar