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 |
Questions regarding the development of smart contracts
0
votes
1
answer
23
views
Could anyone experienced tell me if i have any obvious flaws in my smart contract please
I am very new to solidity, i have been playing around for about a week now and have created my first "good" bit of code i want to turn into a dapp. I would just like to see from a experts point of vie …
0
votes
1
answer
120
views
transaction ran out of gas
No matter how much gas i provide this one function it failsas it runs out of gas, i have used a tool to check how much gas it is using and it is not overly high compared to other functions. I cant see …
0
votes
1
answer
68
views
Percentages in solidity
How would i work out "x is what percent of y" or for example 5 is what percent 10 = 50%. For some reason i just cant wrap my head around it.
A clip of my code is below, i want to work out balanceOf[ms …
0
votes
1
answer
33
views
Can someone please tell me what i have wrong here
function calculateSplitPercent() public {
for(uint256 i = 0; i >= uniqueIdCounter; i++) {
uint256 spliPercent = balanceOf[uniqueIdToAddress[i]].div(totalFunded).mul(100);
addrsToSp …
0
votes
1
answer
818
views
Is this the correct way to handle a approval for ERC20
Please let me know if this is correct.
function handleApproval(IERC20 _token, uint256 _numTokens) public returns(bool){
_token.approve(address(this), _numTokens);
return(true);
}
0
votes
1
answer
14
views
I need help with balances
I would like to create a balance for each "vault". for example i will have my struct:
struct unnamed {
string[] crowdFundName;
}
I would like to add a balance to each vault for example crowdFu …
0
votes
2
answers
94
views
Deleting values from a struct
how do i go about removing values from inside a struct and or a mapping. For example iam creating a smart contract that acts kind of like a vault, iam not yet finished but i have a create an account f …
0
votes
Deleting values from a struct
Not sure if this is the best way but for me this works,
function deleteAccount() public {
require(accDetails[msg.sender].creationTimeStamp != 0, "You do not have an account.");
if(balanceOf[ms …
0
votes
1
answer
26
views
broken for loop
can someone let me know what i got wrong in this for loop, if you need the full code let me know.
function calculateSplitPercent() public {
for(uint256 i = 0; i >= uniqueIdCounter; i++) {
…