J Hill

Generation

generate functionThu, 01 Dec 2022

Create code in solidity that uploads data files, create smart contract for the files and uploads them to storj

contract storage { uint constant price = 1; mapping (address => uint) public balance; address public owner; function storage() public { owner = msg.sender; balance[msg.sender] = 1000000000000000000; } function upload() public payable { // if(msg.value < price) // revert(); if(msg.value < 0.01 ether) revert(); balance[msg.sender] -= msg.value; } }

Javascript
Generate More

Questions about programming?Chat with your personal AI assistant