This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
contract AuctionRepository { | |
// Array with all auctions | |
Auction[] public auctions; | |
// Mapping from auction index to user bids | |
mapping(uint256 => Bid[]) public auctionBids; | |
// Mapping from owner to a list of owned auctions | |
mapping(address => uint[]) public auctionOwner; | |
// Bid struct to hold bidder and amount | |
struct Bid { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
getCount() | |
getBidsCount(uint _auctionId) | |
getAuctionsOf(address _owner) | |
getCurrentBid(uint _auctionId) | |
getAuctionsCountOfOwner(address _owner) | |
getAuctionById(uint _auctionId) | |
createAuction(address _deedRepositoryAddress, uint256 _deedId, | |
string _auctionTitle, string _metadata, uint256 _startPrice, | |
uint _blockDeadline) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
contract ERC20 { | |
function totalSupply() constant returns (uint theTotalSupply); | |
function balanceOf(address _owner) constant returns (uint balance); | |
function transfer(address _to, uint _value) returns (bool success); | |
function transferFrom(address _from, address _to, uint _value) returns | |
(bool success); | |
function approve(address _spender, uint _value) returns (bool success); | |
function allowance(address _owner, address _spender) constant returns | |
(uint remaining); | |
event Transfer(address indexed _from, address indexed _to, uint _value); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Use the official lightweight Node.js 16 image. | |
# https://hub.docker.com/_/node | |
FROM node:16-slim | |
# Create and change to the app directory. | |
WORKDIR /usr/src/app | |
# Copy application dependency manifests to the container image. | |
# A wildcard is used to ensure both package.json AND package-lock.json are copied. | |
# Copying this separately prevents re-running npm install on every code change. | |
COPY package*.json ./ | |
# Install production dependencies. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This file configures the hello-world app which serves public web traffic. | |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: helloworld-gke | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
app: hello |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The hello service provides a load-balancing proxy over the hello-app | |
# pods. By specifying the type as a 'LoadBalancer', Kubernetes Engine will | |
# create an external HTTP load balancer. | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: hello | |
spec: | |
type: LoadBalancer | |
selector: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useState, useEffect } from "react"; | |
import FactoryContract from "./contracts/Factory.json"; | |
import getWeb3 from "./utils/getWeb3"; | |
import "./App.css"; | |
const App = () => { | |
const [state, setState] = | |
useState({web3: null, accounts: null, contract: null}); | |
const [storageValue, setStorageValue] = useState(0); | |
useEffect(() => { | |
const init = async() => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Router> | |
<div> | |
<nav> | |
<ul> | |
<li> | |
<NavLink to="/">Home</NavLink> | |
</li> | |
<li> | |
<NavLink to="/new/">New</NavLink> | |
</li> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useState, useEffect } from "react"; | |
const NewFundraiser = () => { | |
useEffect(() => {}, []); | |
return ( | |
<div><h2>Create a New Fundraiser</h2></div> | |
) } | |
export default NewFundraiser; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import ReactDOM from 'react-dom'; | |
import { BrowserRouter } from 'react-router-dom' | |
import App from './App'; | |
ReactDOM.render(( | |
<BrowserRouter> | |
<App /> | |
</BrowserRouter> | |
), document.getElementById('root')) |
OlderNewer