Skip to content

Ipfs file uploader and soldiity contract generator

Notifications You must be signed in to change notification settings

flipchan/ipfs_contract

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ipfs_contract

A minimal file uploader that uploads a a file to ipfs, compiles an ethereum smart contract with the file identifer from ipfs(cid). Allowing
dapp developers to query for the ipfs file on ethereum's blockchain

Platform:

Built and tested on debian 10

Requirements:

local instance of ipfs(run sh make install) solc(run sh make install_solc) Rust

Build:

$ make install   
$ make build  

Run:

You can either just run the binary from the target folder or use:

$ cargo run --release myfile.txt
    Finished release [optimized] target(s) in 0.07s                  
     Running `target/release/ipfs_contract`                          
Welcome to the IPFS file uploader and cid smart contract generator   
usage: target/release/ipfs_contract file_to_upload                   

Or target/release/ipfs_contract:

./target/release/ipfs_contract /tmp/test
Welcome to the IPFS file uploader and cid smart contract generator
Connecting to ipfs on localhost
Uploaded file to ipfs with Cid: "QmeomffUNfmQy76CQGy9NdmqEnnHU9soCexBnGU3ezPHVH"
Generated solidity contract: QmeomffUNfmQy76CQGy9NdmqEnnHU9soCexBnGU3ezPHVH.sol
Compiled the smart contract
You can now deploy the compiled contract and get the cid to your file on ipfs by quering the getfile function

About

Ipfs file uploader and soldiity contract generator

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published