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 28303

Questions regarding the development of smart contracts

2 votes
Accepted

Checks-Effects-Interactions Pattern - External Call not reached

You don't need to worry about that. If the transaction runs out of gas, it is reverted as a whole. That means, as far as your smart contract is concerned, it will be like the transaction never happene …
Henk's user avatar
  • 4,291
0 votes

Monitor another contract with smart contract

1- Can I develop a contract that will be triggered when the transaction is sent to another contract (that is not owned by me)? No, this cannot be done currently purely with contract. There is no …
Henk's user avatar
  • 4,291
1 vote

transaction get revert by calling view method from another contract constructor

guestA and guestB are not initialized yet. Therefore, their values will be 0. You can't call getName on address 0. You'll have to initialize these variables with the addresses of the actual deployed …
Henk's user avatar
  • 4,291
0 votes

Using ERC20 token contract with my own token code

The code compiles just fine in Remix. I think you should read a bit more on inheritance of smart contracts. What GrandFleet is suggesting is exactly what you are doing. You created a smart contract A …
Henk's user avatar
  • 4,291
1 vote

identifier problem with "require"

A couple of things are wrong with this function. The signature ends with a ;, where a { should be variables inside functions cannot be public. Public fields should be declared outside the function, …
Henk's user avatar
  • 4,291
3 votes
Accepted

How to call function from child contract in parent contract?

Here's the problem in ParentContract: constructor() public{ two = ConfigContract(msg.sender); } You are assigning a ConfigContract with address of msg.sender to two. But, msg.sender isn't actu …
Henk's user avatar
  • 4,291
2 votes

How to get constants value by using Contract name

The constant is defined and stored in the contract. Therefore, you do need the instance of the contract the constant is defined in.
Henk's user avatar
  • 4,291
1 vote

Call geth functions through smart contracts

Not possible. A smart contract runs on every node on the Ethereum network. It makes no sense to create a new account on every node. Smart contracts run in the context of the Ethereum blockchain. That …
Henk's user avatar
  • 4,291
3 votes

Can I define global variables in Library contract?

Libraries don't have storage. Their methods are invoked with the delegatecall opcode, which means that they are run in the context of the caller. In a library, this points to the calling contract. If …
Henk's user avatar
  • 4,291
0 votes
Accepted

Internal Compiler Error: Unknow Magic Member

block.blockhash takes a block number as parameter. Replace uint rand = uint256(keccak256(now, block.blockhash)); with uint rand = uint256(keccak256(now, block.blockhash(block.number))); and it …
Henk's user avatar
  • 4,291
2 votes
Accepted

How to order struct in descending and ascending order?

Sorting in a smart contract is going to cost you a lot of gas, especially with large arrays. You could set up a centralized database that replicates the data in the smart contract. Then, you could ha …
Henk's user avatar
  • 4,291
2 votes
Accepted

Delegate function really needed while loop(Voting example)?

The while loop is for checking that no delegation loop exists like this: voter A === delegate ===> voter B === delegate ===> ... === delegate ===> voter A Whereas the line require(to != msg.sender, …
Henk's user avatar
  • 4,291
1 vote
Accepted

How can I withdraw funds from an escrow contract in [email protected]?

try this: `contract.methods.refundBalance().send().then(console.log)`. call is used for functions that do not change the state. They're decared as view or pure. However, refundBalance() does chang …
Henk's user avatar
  • 4,291
1 vote

questions regarding how many bytes each type is

Question 1) now() timestamp. i think it's uint which means uint256 which means 32 bytes? Am I right? Yes, that is correct. Question 2) what does bytes32 mean? They say it's an array. but i c …
Henk's user avatar
  • 4,291
3 votes
Accepted

Web3js 1.0 events: closing the contract.events "socket"

The web3.js 1.0 documentation states that the return value of creating an event is an EventEmitter. To close the event, you have to remove all of the EventEmitter's listeners using the bound event's n …
Henk's user avatar
  • 4,291

15 30 50 per page