decentragram's People
Forkers
case7026 joelunmsm2003 fbaskara dareljohnson dzineer vhpvmx codenamejason kzieber 0xd49daa ashish1198 pironmind mayank0508 h0plyn refcell r1k0 ellisbywater artzbr mkipcak ltlmaps rharriso stuartryder martingy jehilthakkar matt-mertens mkragness freddymu paulwongx emersonjsouza simonfuture2 fuinha luizoamorim tyagivi03 debjitdbb sa-mike mikedutuandu duguorong009 rahat878 4p010 vaibhavshete007 fakhrealamm marttp dachkovski deepakhb2 devmane spardha-hash dwaipayan05 fine-lines rpellegrinelli nameawashinderu mcgraneder galenwong ghostwalkerj catmcgee holyhansss ownercods 28gass kcolbchain harmony-one dancsiqueira prim4t ayushgupta0110 0xblockchainx0 paxonpresley 1alireza32109 2alireza32109 jjcatulle agnxsh princedisant olusamimaths enfitycorp 1337-ishaan pguso rayanabid macedoraf csagymbek martinontcode hyeongd rushil10 kevinb84 chxckj theekharbanda kaijiuno msgpo singh1aryan abhishek2717 kevinleeming ilanlad janhavi23 ahsanelahi748 vidwatk willpower98 gogolxdong fritzhoy distroinfinity gadgetboy27 vibhor0911 zionlikelion system-in-a-system aviral10x aryansaidecentragram's Issues
Unable to run React app
Module not found: Error: Can't resolve 'http' in '/home/[email protected]/Downloads/decentragram/node_modules/web3-providers-http/lib'
BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.
If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "http": require.resolve("stream-http") }'
- install 'stream-http'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "http": false }
Truffle test is failing for images
TypeError: decentragram.uploadImage is not a function
issue to compile contract
Invalid type for argument in function call. Invalid implicit conversion from address to address payable requested.
`pragma solidity >=0.5.0;
contract Decentragram {
string public name;
uint256 public imageCount = 0;
mapping(uint256 => Image) public images;
struct Image {
uint256 id;
string hash;
string description;
uint256 tipAmount;
address payable author;
}
event ImageCreated(
uint256 id,
string hash,
string description,
uint256 tipAmount,
address payable author
);
event ImageTipped(
uint256 id,
string hash,
string description,
uint256 tipAmount,
address payable author
);
constructor() public {
name = "Decentragram";
}
function uploadImage(string memory _imgHash, string memory _description)
public
{
// Make sure the image hash exists
require(bytes(_imgHash).length > 0);
// Make sure image description exists
require(bytes(_description).length > 0);
// Make sure uploader address exists
require(msg.sender != address(0));
// Increment image id
imageCount++;
// Add Image to the contract
images[imageCount] = Image(
imageCount,
_imgHash,
_description,
0,
msg.sender
);
// Trigger an event
**emit ImageCreated(imageCount, _imgHash, _description, 0, msg.sender);**
//the error is just because msg.sender is address and we can't pass an address to address payable
}
function tipImageOwner(uint256 _id) public payable {
// Make sure the id is valid
require(_id > 0 && _id <= imageCount);
// Fetch the image
Image memory _image = images[_id];
// Fetch the author
address payable _author = _image.author;
// Pay the author by sending them Ether
address(_author).transfer(msg.value);
//"send" and "transfer" are only available for objects of type "address payable", not "address".
// Increment the tip amount
_image.tipAmount = _image.tipAmount + msg.value;
// Update the image
images[_id] = _image;
// Trigger an event
emit ImageTipped(
_id,
_image.hash,
_image.description,
_image.tipAmount,
_author
);
}
}
`
tips
is it possible to change the tip using our custom bep20/ erc20 contract / token instead of eth/BNB?
Images wont load
When I upload and run the website it only displays the most recently uploaded image, and none of the other previously uploaded images. Even if it has the most tips it just shows a tiny icon for a image not the actual image uploaded. I figured it would be in app.js to configure but I cannot find a way as of now.
issure regarding ipfs
While uploading image i am receiving error saying project id required.
is it necessary to create account in infura ipfs as it asks for credit card details.
First Truffle Test In Tutorial Fails
I get this error
Compiling your contracts...
Everything is up to date, there is nothing to compile.
Contract: Decentragram
1) "before all" hook in "Contract: Decentragram"
0 passing (38ms)
1 failing
- Contract: Decentragram
"before all" hook in "Contract: Decentragram":
Error: Decentragram has not been deployed to detected network (network/artifact mismatch)
at Object.checkNetworkArtifactMatch (/usr/local/lib/node_modules/truffle/build/webpack:/packages/contract/lib/utils/index.js:249:1)
at Function.deployed (/usr/local/lib/node_modules/truffle/build/webpack:/packages/contract/lib/contract/constructorMethods.js:84:1)
at process._tickCallback (internal/process/next_tick.js:68:7)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.