Search Results
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 |
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.
1
vote
Looping over scheduling ETH transaction
The code below is shown in the help for recurrent transactions:
pragma solidity ^0.4.24;
// interface Aion
contract Aion {
uint256 public serviceFee;
function ScheduleCall(uint256 blocknumber, …
1
vote
Accepted
sha256 works with string memory but doesn't work with bytes32
The issue is the representation of the data. When you move to bytes32 the resulting data after abi.encodedPacked has 32 bytes, but the data used for the hash in your code SHA256(A) is not 32 bytes. So …
3
votes
Accepted
Unable to add transaction to blockchain (I'm invoking the setMessage(str) method but the str...
when you are calling setMessage function you should use send instead of call
$("#setMessageButton").click(function () {
var val = $("#userInput").val();
RemixContract.methods.setMessag …
2
votes
Accepted
how to get array that contain certain value
I test it on remix.
pragma solidity 0.5;
contract userID{
mapping (uint256 => bytes32[]) public users;
function sendReview(uint256 _uid, bytes32 _item) public{
users[_uid].push(_item);
}
function … getitem(uint256 _uid) public view returns(bytes32[] memory){
return(users[_uid]);
}
}
If you want to return structures then you can use this:
pragma experimental ABIEncoderV2;
pragma solidity …
2
votes
Can a contract auto execute a transaction given certain conditions?
Smart contracts can not autoexecute, they should always be triggered by a transaction.
In your case you have a contract A and a contract B. When contract B balance is below a particular values you w …
1
vote
Accepted
Difference between Micropayment channel and ReceiverPays in Solidity docs
In the first case, Alice make several small payments that Bob can claim at any time. There is no need for expiration. This makes Bob topay for the transaction fees every time he claims one payment.
I …
0
votes
Accepted
A smart contract's storage problem , further ERC ?
It is not true that the limit is 1.46GB. A smart contract can theoretically store 2^256 words of 32 bytes. That is a ridiculously huge amount of data.
The amount of data used by a smart contract that …
3
votes
Accepted
Calling a smart-contract fallback function from another contract
The thing is that the transfer method allows for 2300 gas stipend. Because the fallback has a transfer again, 2300 won't be enough. You can use
addressB.call.value(msg.value)()
which will pass all …
0
votes
Accepted
How to get all the function names with their respective parameters from smart contract?
This can be done only for contracts for which you have the ABI. Etherscan allows people to verify the contracts and the ABI becomes available through Etherscan API. Then you just need to read the JSON …
2
votes
Accepted
Atomic Transactions
In the case that you present, there is no way that these function will fail. I assume your question is if in general there is a way to control the atomicity.
I assume your question is that you requir …
1
vote
Accepted
Smart contract method relayer
Yes, this can be done. Assuming that these two contracts are deployed indipendently:
First, deploy the first contract:
contract first{
function one(uint256 a, uint256 b) public pure returns(uin …
5
votes
Accepted
How can I create an array of objects of a specific smart contract in solidity?
The id is used to index the student
pragma solidity 0.5.1;
contract Management{
struct studentInfo {
string name;
string birthdate;
string department;
string location;
string email …
0
votes
Best way to create identity contracts for organisations
725 v2 definitely works, each entity will be able to execute arbitrary bytecode and to store data. However, they will be able to change that data as well. Of course, these changes will be visible in t …
1
vote
Accepted
How can the smart contract auto execute the function in the private chain?
In the case of Aion, you have the smart contract available on the Aion's GitHub page, so you can just deploy it in your private network. However, you will need to develop the script that executes the …
1
vote
Limit the number of times a static function is called
I assume you mean public nodes. if this is the case publics node will just limit the number of API request per second as Etherscan do, to about 5 request per second.
Hope this helps