diff --git a/.gitignore b/.gitignore index 8e4b84b5..3735a3ef 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,4 @@ bin/ vendor/ /data/ .DS_Store +chain-data/ \ No newline at end of file diff --git a/cloudflared.deb b/cloudflared.deb new file mode 100644 index 00000000..801ab1d6 Binary files /dev/null and b/cloudflared.deb differ diff --git a/docker/docker-compose.orbit.yml b/docker/docker-compose.orbit.yml new file mode 100644 index 00000000..09be0f9d --- /dev/null +++ b/docker/docker-compose.orbit.yml @@ -0,0 +1,177 @@ +name: lilypad_orbit +services: + ipfs: + image: ipfs/kubo:v0.32.1 + container_name: orbit_ipfs + restart: unless-stopped + # ports: + # - 5001:5001 + volumes: + - ipfs-data:/data/ipfs + # bacalhau: + # image: ghcr.io/lilypad-tech/bacalhau + # container_name: bacalhau + # restart: unless-stopped + # depends_on: + # ipfs: + # condition: service_healthy + # build: + # context: .. + # dockerfile: ./docker/bacalhau/Dockerfile + # extra_hosts: + # - "localhost:host-gateway" + # environment: + # - BACALHAU_ENVIRONMENT=local + # command: + # [ + # "serve", + # "--node-type", + # "compute,requester", + # "--peer", + # "none", + # "--private-internal-ipfs=false", + # "--job-selection-accept-networked", + # "--ipfs-connect", + # "/dns4/ipfs/tcp/5001", + # ] + # volumes: + # - bacalhau-data:/root/.bacalhau + # - /var/run/docker.sock:/var/run/docker.sock + solver: + image: ghcr.io/lilypad-tech/solver + container_name: orbit_solver + # depends_on: + # - chain + # build: + # context: .. + # dockerfile: ./docker/solver/Dockerfile + # args: + # - network=dev + extra_hosts: + - "localhost:host-gateway" + environment: + + - LOG_LEVEL=debug + - SERVER_PORT=8002 + - API_HOST= + # - SERVER_URL=https://solver.orbit.arsenum.com + # - WEB3_RPC_URL=ws://local.switch:8448 + - SERVER_URL=https://solver.orbit.arsenum.com + # https://solver.orbit.arsenum.com + # - WEB3_RPC_URL=ws://local.switch:8448 + - WEB3_RPC_URL=wss://wss.orbit.arsenum.com + #wss://wss.orbit.arsenum.com + - DISABLE_TELEMETRY=1 # Disable telemetry for local development + - WEB3_CHAIN_ID=68283778764 + - WEB3_PRIVATE_KEY=0x5de4111afa1a4b94908f83103eb1f1706367c2e68ca870fc3fb9a804cdab365a + - WEB3_CONTROLLER_ADDRESS=0xa85233C63b9Ee964Add6F2cffe00Fd84eb32338f + - WEB3_PAYMENTS_ADDRESS=0x2279B7A0a67DB372996a5FaB50D91eAA73d2eBe6 + - WEB3_POW_ADDRESS=0x4ed7c70F96B99c776995fB64377f0d4aB3B0e1C1 + - WEB3_STORAGE_ADDRESS=0xB7f8BC63BbcaD18155201308C8f3540b07f84F5e + - WEB3_TOKEN_ADDRESS=0xa513E6E4b8f2a923D98304ec87F64353C4D5C853 + - WEB3_USERS_ADDRESS=0x0DCd1Bf9A1b36cE34237eEaFef220932846BCD82 + + # - WEB3_PRIVATE_KEY=0x5de4111afa1a4b94908f83103eb1f1706367c2e68ca870fc3fb9a804cdab365a + # - WEB3_CONTROLLER_ADDRESS=0xdF2bc8d64A869eF4605BA821cE7183A702D5Bf72 + # - WEB3_PAYMENTS_ADDRESS=0xE7FdFfD56797a6E6024a09bd168effCa6C5208cE + # - WEB3_POW_ADDRESS=0x7cFA21dB253afBcD9AaCf2dE58FC3C0e9D1a9149 + # - WEB3_STORAGE_ADDRESS=0xDf9EAf5f1020d75c502DC66FFCC43a634E10017b + # - WEB3_TOKEN_ADDRESS=0x2B0722b2C623b19aDA2ec56D50487203a7475C38 + # - WEB3_USERS_ADDRESS=0x3f4048eBDB5C853EDBe30843f8e8e6CC9aFfAbFe + # ports: + # - 8081:8081 + # healthcheck: + # test: ["CMD", "curl", "-f", "http://localhost:8081/api/v1/job_offers"] + # interval: 30s + # timeout: 10s + # retries: 5 + networks: + - localnet + job-creator: + networks: + - localnet + image: ghcr.io/lilypad-tech/job-creator + container_name: orbit_job-creator + restart: unless-stopped + depends_on: + # - chain + - solver + build: + context: .. + dockerfile: ./docker/job-creator/Dockerfile + # args: + # - network=dev + extra_hosts: + - "localhost:host-gateway" + environment: + # - WEB3_PRIVATE_KEY=0x5de4111afa1a4b94908f83103eb1f1706367c2e68ca870fc3fb9a804cdab365a + - LOG_LEVEL=debug + - SERVER_PORT=8002 + - API_HOST= + # - SERVER_URL=http://solver:8002 + - SERVER_URL=https://solver.orbit.arsenum.com + # https://solver.orbit.arsenum.com + # - WEB3_RPC_URL=ws://local.switch:8448 + - WEB3_RPC_URL=wss://wss.orbit.arsenum.com + #wss://wss.orbit.arsenum.com + - DISABLE_TELEMETRY=1 # Disable telemetry for local development + - WEB3_CHAIN_ID=68283778764 + - WEB3_PRIVATE_KEY=0x5de4111afa1a4b94908f83103eb1f1706367c2e68ca870fc3fb9a804cdab365a + - WEB3_CONTROLLER_ADDRESS=0xa85233C63b9Ee964Add6F2cffe00Fd84eb32338f + - WEB3_PAYMENTS_ADDRESS=0x2279B7A0a67DB372996a5FaB50D91eAA73d2eBe6 + - WEB3_POW_ADDRESS=0x4ed7c70F96B99c776995fB64377f0d4aB3B0e1C1 + - WEB3_STORAGE_ADDRESS=0xB7f8BC63BbcaD18155201308C8f3540b07f84F5e + - WEB3_TOKEN_ADDRESS=0xa513E6E4b8f2a923D98304ec87F64353C4D5C853 + - WEB3_USERS_ADDRESS=0x0DCd1Bf9A1b36cE34237eEaFef220932846BCD82 + - WEB3_JOBCREATOR_ADDRESS=0x9A9f2CCfdE556A7E9Ff0848998Aa4a0CFD8863AE + - SERVICE_MEDIATORS=[0x7B49d6ee530B0A538D26E344f3B02E79ACa96De2] + # - WEB3_CHAIN_ID=68283778764 + # - WEB3_CONTROLLER_ADDRESS=0xdF2bc8d64A869eF4605BA821cE7183A702D5Bf72 + # - WEB3_PAYMENTS_ADDRESS=0xE7FdFfD56797a6E6024a09bd168effCa6C5208cE + # - WEB3_POW_ADDRESS=0x7cFA21dB253afBcD9AaCf2dE58FC3C0e9D1a9149 + # - WEB3_STORAGE_ADDRESS=0xDf9EAf5f1020d75c502DC66FFCC43a634E10017b + # - WEB3_TOKEN_ADDRESS=0x2B0722b2C623b19aDA2ec56D50487203a7475C38 + # - WEB3_USERS_ADDRESS=0x3f4048eBDB5C853EDBe30843f8e8e6CC9aFfAbFe + # - SERVICE_SOLVER=0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC + # - WEB3_JOBCREATOR_ADDRESS=0x5a6d1D3E7e16Dc69d61232A395773301b4580849 + # - WEB3_PRIVATE_KEY=${JOB_CREATOR_PRIVATE_KEY} + # - LOG_LEVEL=debug + # resource-provider: + # image: ghcr.io/lilypad-tech/resource-provider + # container_name: resource-provider + # restart: unless-stopped + # depends_on: + # ipfs: + # condition: service_healthy + # solver: + # condition: service_healthy + # bacalhau: + # condition: service_healthy + # build: + # context: .. + # dockerfile: ./docker/resource-provider/Dockerfile + # args: + # - NETWORK=dev + # - COMPUTE_MODE=cpu + # - VERSION=${VERSION} + # - COMMIT_SHA=${COMMIT_SHA} + # extra_hosts: + # - "localhost:host-gateway" + # volumes: + # - lilypad-data:/tmp/lilypad/data + # environment: + # - WEB3_PRIVATE_KEY=${RESOURCE_PROVIDER_PRIVATE_KEY} + # - IPFS_CONNECT=/dns4/ipfs/tcp/5001 + # - LOG_LEVEL=debug + # - DISABLE_TELEMETRY=${DISABLE_TELEMETRY} + # - BACALHAU_API_HOST=bacalhau + # - BACALHAU_NODE_CLIENTAPI_HOST=bacalhau + # - BACALHAU_NODE_CLIENTAPI_PORT=1234 +volumes: + # chain-data: + ipfs-data: + bacalhau-data: + lilypad-data: +networks: + localnet: + external: true \ No newline at end of file diff --git a/docker/preflight/Dockerfile b/docker/preflight/Dockerfile new file mode 100644 index 00000000..21b47d8c --- /dev/null +++ b/docker/preflight/Dockerfile @@ -0,0 +1,56 @@ +# FROM alpine:latest AS base +# WORKDIR /usr/src/app + +# ARG network=dev + +# COPY . . +# RUN go mod download && go mod verify +# RUN go build -v . +# RUN go install + +# RUN (curl -Ls --tlsv1.2 --proto "=https" --retry 3 https://cli.doppler.com/install.sh || wget -t 3 -qO- https://cli.doppler.com/install.sh) | sh + +# RUN touch run +# RUN echo "#!/bin/bash" >> run +# RUN if [ "${network}" = "dev" ]; then \ +# echo "lilypad jobcreator --network $network" >> run; \ +# else \ +# echo "doppler run -- lilypad jobcreator --network $network" >> run; \ +# fi +# RUN chmod +x run +# WORKDIR /app +# COPY ./preflight /app +# RUN chmod +x /app/preflight +# # CMD ["/app/preflight"] +# # CMD ["/bin/sh"] +# CMD tail -f /dev/null +FROM golang:1.23 AS builder +WORKDIR /app +# RUN pwd +COPY ./preflight.go /app +# COPY . . +# RUN cd preflight +RUN go mod init preflight +RUN go mod tidy +RUN go build -o ./preflight preflight.go + +FROM nvidia/cuda:12.0.1-cudnn8-devel-ubuntu22.04 AS base + +RUN apt-get update && \ + apt-get install -y \ + apt-transport-https \ + ca-certificates \ + curl \ + gnupg \ + lsb-release && \ + curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - && \ + echo "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null && \ + apt-get update && \ + apt-get install -y docker-ce docker-ce-cli containerd.io && \ + rm -rf /var/lib/apt/lists/* + + +WORKDIR /app +COPY --from=builder /app . +RUN chmod +x /app/preflight +# CMD ["/app/preflight","arsenum"] \ No newline at end of file diff --git a/docker/preflight/docker-compose-pre-flight.yml b/docker/preflight/docker-compose-pre-flight.yml new file mode 100644 index 00000000..cf816c68 --- /dev/null +++ b/docker/preflight/docker-compose-pre-flight.yml @@ -0,0 +1,169 @@ +# This is a docker-compose file for use by Resource Providers +services: + ipfs: + image: ipfs/kubo:v0.31.0 + container_name: ${ORG:-default_org}_ipfs + restart: unless-stopped + command: ["daemon", "--enable-pubsub-experiment"] + + # ports: + # - 4001:4001 + # - 127.0.0.1:5001:5001 + # - 127.0.0.1:8080:8080 + volumes: + - ipfs-data:/data/ipfs + # healthcheck: + # test: ["CMD-SHELL", "docker logs ${ORG}_ipfs 2>&1 | grep -q 'Daemon is ready'"] + # interval: 1s + # timeout: 5s + # retries: 5 + # start_period: 1s + # depends_on: + # preflight: + # condition: service_completed_successfully + environment: + - WEB3_PRIVATE_KEY=${WEB3_PRIVATE_KEY} + - WEB3_RPC_URL=${WEB3_RPC_URL} + - WEB3_CHAIN_ID=${WEB3_CHAIN_ID} + - WEB3_CONTROLLER_ADDRESS=${WEB3_CONTROLLER_ADDRESS} + - IPFS_CONNECT=/dns4/ipfs/tcp/5001 + - IPFS_ADDR=/dns4/ipfs/tcp/5001 + - DISABLE_TELEMETRY=1 + - OFFER_GPU=1 + - WEB3_PAYMENTS_ADDRESS=${WEB3_PAYMENTS_ADDRESS} + - WEB3_POW_ADDRESS=${WEB3_POW_ADDRESS} + - WEB3_STORAGE_ADDRESS=${WEB3_STORAGE_ADDRESS} + - WEB3_TOKEN_ADDRESS=${WEB3_TOKEN_ADDRESS} + - WEB3_USERS_ADDRESS=${WEB3_USERS_ADDRESS} + - SERVICE_SOLVER=${SERVICE_SOLVER} + preflight: + build: + context: . + dockerfile: ./Dockerfile + args: + - BUILDKIT_PROGRESS=plain + # context: ../../ # Point to root project directory + # dockerfile: docker/preflight/Dockerfile + image: preflight + container_name: ${ORG:-default_org}_preflight + environment: + - WEB3_PRIVATE_KEY=${WEB3_PRIVATE_KEY} + - WEB3_RPC_URL=${WEB3_RPC_URL} + - WEB3_CHAIN_ID=${WEB3_CHAIN_ID} + - WEB3_CONTROLLER_ADDRESS=${WEB3_CONTROLLER_ADDRESS} + - IPFS_CONNECT=/dns4/ipfs/tcp/5001 + - IPFS_ADDR=/dns4/ipfs/tcp/5001 + - DISABLE_TELEMETRY=1 + - OFFER_GPU=1 + - WEB3_PAYMENTS_ADDRESS=${WEB3_PAYMENTS_ADDRESS} + - WEB3_POW_ADDRESS=${WEB3_POW_ADDRESS} + - WEB3_STORAGE_ADDRESS=${WEB3_STORAGE_ADDRESS} + - WEB3_TOKEN_ADDRESS=${WEB3_TOKEN_ADDRESS} + - WEB3_USERS_ADDRESS=${WEB3_USERS_ADDRESS} + - SERVICE_SOLVER=${SERVICE_SOLVER} + env_file: + - .env + volumes: + - /var/run/docker.sock:/var/run/docker.sock + # command: ["sh", "-c", "echo Running preflight checks... && sleep 5 && echo Preflight checks completed."] + command: ["/app/preflight",$ORG] + # healthcheck: + # test: ["CMD-SHELL", "exit 1"] + # interval: 10s + # retries: 1 + # start_period: 9s + # timeout: 50s + bacalhau: + image: ghcr.io/lilypad-tech/resource-provider:latest + container_name: ${ORG:-default_org}_bacalhau + # restart: unless-stopped + depends_on: + ipfs: + condition: service_healthy + # condition: service_started + # preflight: + # condition: service_healthy + # build: + # context: ../.. + # dockerfile: docker/resource-provider/Dockerfile + # args: + # - COMPUTE_MODE=gpu + # command: ["sh", "-c", "echo Running preflight checks... && sleep 5 && echo Preflight checks completed."] + command : ["sh", "-c", "bacalhau serve --node-type compute,requester --peer none --private-internal-ipfs=false --job-selection-accept-networked"] + volumes: + - bacalhau-data:/tmp/lilypad/data + - /var/run/docker.sock:/var/run/docker.sock + environment: + - LOG_LEVEL=debug + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:1234/"] + interval: 5s + timeout: 5s + retries: 15 + resource-provider: + image: ghcr.io/lilypad-tech/resource-provider:latest + container_name: ${ORG:-default_org}_resource-provider + # restart: unless-stopped + depends_on: + ipfs: + condition: service_healthy + bacalhau: + condition: service_healthy + # condition: service_started + # preflight: + # condition: service_healthy + # build: + # context: ../.. + # dockerfile: docker/resource-provider/Dockerfile + # args: + # - COMPUTE_MODE=gpu + volumes: + - bacalhau-data:/tmp/lilypad/data + - /var/run/docker.sock:/var/run/docker.sock + environment: + - BACALHAU_API_HOST=${ORG:-default_org}_bacalhau + - WEB3_PRIVATE_KEY=${WEB3_PRIVATE_KEY} + - WEB3_RPC_URL=${WEB3_RPC_URL} + - WEB3_CHAIN_ID=${WEB3_CHAIN_ID} + - WEB3_CONTROLLER_ADDRESS=${WEB3_CONTROLLER_ADDRESS} + - IPFS_CONNECT=/dns4/ipfs/tcp/5001 + - IPFS_ADDR=/dns4/ipfs/tcp/5001 + - DISABLE_TELEMETRY=1 + - OFFER_GPU=1 + - WEB3_PAYMENTS_ADDRESS=${WEB3_PAYMENTS_ADDRESS} + - WEB3_POW_ADDRESS=${WEB3_POW_ADDRESS} + - WEB3_STORAGE_ADDRESS=${WEB3_STORAGE_ADDRESS} + - WEB3_TOKEN_ADDRESS=${WEB3_TOKEN_ADDRESS} + - WEB3_USERS_ADDRESS=${WEB3_USERS_ADDRESS} + - SERVICE_SOLVER=${SERVICES_SOLVER} + - LOG_LEVEL=debug + - SERVICE_MEDIATORS=${SERVICES_MEDIATOR} + + env_file: + - .env + watchtower: + image: containrrr/watchtower + container_name: ${ORG:-default_org}_watchtower + restart: always + volumes: + - /var/run/docker.sock:/var/run/docker.sock + environment: + - WEB3_PRIVATE_KEY=${WEB3_PRIVATE_KEY} + - WEB3_RPC_URL=${WEB3_RPC_URL} + - WEB3_CHAIN_ID=${WEB3_CHAIN_ID} + - WEB3_CONTROLLER_ADDRESS=${WEB3_CONTROLLER_ADDRESS} + - IPFS_CONNECT=/dns4/ipfs/tcp/5001 + - IPFS_ADDR=/dns4/ipfs/tcp/5001 + - DISABLE_TELEMETRY=1 + - OFFER_GPU=1 + - WEB3_PAYMENTS_ADDRESS=${WEB3_PAYMENTS_ADDRESS} + - WEB3_POW_ADDRESS=${WEB3_POW_ADDRESS} + - WEB3_STORAGE_ADDRESS=${WEB3_STORAGE_ADDRESS} + - WEB3_TOKEN_ADDRESS=${WEB3_TOKEN_ADDRESS} + - WEB3_USERS_ADDRESS=${WEB3_USERS_ADDRESS} + - SERVICE_SOLVER=${SERVICE_SOLVER} + env_file: + - .env +volumes: + ipfs-data: + bacalhau-data: diff --git a/docker/preflight/preflight.go b/docker/preflight/preflight.go new file mode 100644 index 00000000..d57a6c67 --- /dev/null +++ b/docker/preflight/preflight.go @@ -0,0 +1,555 @@ +package main + +import ( + "bufio" + "context" + "crypto/ecdsa" + "crypto/rand" + "encoding/hex" + "encoding/json" + "fmt" + "io/ioutil" + "log" + "math/big" + "net/http" + "os" + "os/exec" + "regexp" + "strconv" + "strings" + + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/crypto" + "github.com/ethereum/go-ethereum/ethclient" + "github.com/pelletier/go-toml" +) + +const ERC20TokenABI = `[{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"balance","type":"uint256"}],"type":"function"}]` + +type Module struct { + ModuleId string `json:"ModuleId"` + Image string `json:"Image,omitempty"` +} + +type GPUStats struct { + Name string + GUID string + Utilization int + MemoryUsed int + TotalMemory int +} + +func pullAllowList() { + if len(os.Args) < 2 { + fmt.Println("Please specify a GitHub organization with module-allowlist") + fmt.Println("Usage: preflight ") + fmt.Println("Example: preflight lilypad-tech") + fmt.Println("You may fork https://github.com/Lilypad-Tech/module-allowlist and use your own organization") + os.Exit(1) + } + allLilypadURL := fmt.Sprintf("https://raw.githubusercontent.com/%s/module-allowlist/main/allowlist.json", os.Args[1]) + resp, err := http.Get(allLilypadURL) + if err != nil || resp.StatusCode != http.StatusOK { + fmt.Println("Failed to fetch allowlist. specify github organization with module-allowlist") + fmt.Println("Usage: preflight ") + fmt.Println("Example: preflight lilypad-tech") + fmt.Println("You may fork https://github.com/Lilypad-Tech/module-allowlist and use your own organization") + log.Fatalf("Failed to fetch allowlist: %v", err) + } + defer resp.Body.Close() + + body, err := ioutil.ReadAll(resp.Body) + if err != nil { + log.Fatalf("Failed to read response body: %v", err) + } + + var modules []Module + if err := json.Unmarshal(body, &modules); err != nil { + log.Fatalf("Failed to unmarshal JSON: %v", err) + } + + for i, module := range modules { + if strings.HasPrefix(module.ModuleId, "http") { + moduleUrl := strings.Replace(module.ModuleId, "github.com", "raw.githubusercontent.com", 1) + "/main/lilypad_module.json.tmpl" + respModule, err := http.Get(moduleUrl) + if err != nil { + log.Printf("Failed to fetch module: %v", err) + continue + } + defer respModule.Body.Close() + + bodyModule, err := ioutil.ReadAll(respModule.Body) + if err != nil { + log.Printf("Failed to read module response body: %v", err) + continue + } + + re := regexp.MustCompile(`"Image":\s*"([^"]+)"`) + matches := re.FindStringSubmatch(string(bodyModule)) + if len(matches) > 1 { + modules[i].Image = matches[1] + } else { + log.Printf("Failed to find image in module: %s", moduleUrl) + } + } + } + + for _, module := range modules { + if module.Image != "" { + fmt.Println("Module ModuleId:", module.ModuleId) + fmt.Println("Module Image:", module.Image) + cmd := exec.Command("docker", "pull", module.Image) + stdout, err := cmd.StdoutPipe() + if err != nil { + log.Fatalf("Failed to get stdout: %v", err) + } + stderr, err := cmd.StderrPipe() + if err != nil { + log.Fatalf("Failed to get stderr: %v", err) + } + + if err := cmd.Start(); err != nil { + log.Fatalf("Failed to start command: %v", err) + } + go func() { + reader := bufio.NewReader(stdout) // Change to stderr for progress + var output string + for { + char, err := reader.ReadByte() + if err != nil { + break + } + + // Print raw byte for real-time display + fmt.Print(string(char)) + + output += string(char) + // Handle both CR and NL as line endings + if char == '\r' || char == '\n' { + // Strip ANSI escape codes for parsing + cleanOutput := stripAnsi(output) + printProgress(cleanOutput) + output = "" + } + } + }() + + // Helper function to strip ANSI escape codes + + go func() { + scanner := bufio.NewScanner(stderr) + for scanner.Scan() { + line := scanner.Text() + fmt.Println(line) + printProgress(line) + } + }() + + if err := cmd.Wait(); err != nil { + log.Fatalf("Failed to pull Docker image %s: %v", module.Image, err) + } else { + log.Printf("Successfully pulled Docker image: %s\n", module.Image) + } + } + + } + +} +func stripAnsi(str string) string { + ansi := regexp.MustCompile(`\x1b\[[0-9;]*[a-zA-Z]`) + return ansi.ReplaceAllString(str, "") +} +func printProgress(line string) { + // Example line: "Downloading [==================> ] 50.32MB/100.64MB" + re := regexp.MustCompile(`Downloading.*?(\d+\.\d+)(MB|GB)/(\d+\.\d+)(MB|GB)`) + matches := re.FindStringSubmatch(line) + + if matches == nil { + return + } + fmt.Print(len(matches)) + if len(matches) > 1 { + current, err1 := strconv.ParseFloat(matches[1], 64) + total, err2 := strconv.ParseFloat(matches[3], 64) + unit := matches[2] + + if err1 == nil && err2 == nil { + if unit == "GB" { + current *= 1024 + total *= 1024 + } + + fmt.Printf("Progress: %.2fMB/%.2fMB\n", current, total) + } + } +} + +func getGPUStats() ([]GPUStats, error) { + cmd := exec.Command("nvidia-smi", "--query-gpu=name,gpu_uuid,utilization.gpu,memory.used,memory.total", "--format=csv,noheader,nounits") + output, err := cmd.Output() + if err != nil { + return nil, err + } + + lines := strings.Split(string(output), "\n") + var stats []GPUStats + for _, line := range lines { + if line == "" { + continue + } + fields := strings.Split(line, ", ") + utilization, _ := strconv.Atoi(fields[2]) + memoryUsed, _ := strconv.Atoi(fields[3]) + totalMemory, _ := strconv.Atoi(fields[4]) + stats = append(stats, GPUStats{ + Name: fields[0], + GUID: fields[1], + Utilization: utilization, + MemoryUsed: memoryUsed, + TotalMemory: totalMemory, + }) + } + return stats, nil +} + +func getMemoryUtilization() int { + stats, err := getGPUStats() + if err != nil { + log.Fatalf("Error getting GPU stats: %v\n", err) + // return 100 + // log.Fatalf("Failed to start command + } + + for _, stat := range stats { + memoryUtilization := float64(stat.MemoryUsed) / float64(stat.TotalMemory) * 100 + fmt.Printf("GPU %s (%s): Memory Utilization: %.2f%%\n", + stat.Name, stat.GUID, memoryUtilization) + if int(memoryUtilization) > 50 { + log.Fatalf("Memory Utilization is greater than 50%") + } else { + return int(memoryUtilization) + } + } + log.Fatalf("Np GPU stats found") + return 100 +} + +func getCoreUtilization() int { + stats, err := getGPUStats() + if err != nil { + log.Fatalf("Error getting GPU stats: %v\n", err) + return 100 + } + + for _, stat := range stats { + fmt.Printf("GPU %s (%s): Core Utilization: %d%%\n", + stat.Name, stat.GUID, stat.Utilization) + // return stat.Utilization + if int(stat.Utilization) > 50 { + log.Fatalf("Core Utilization is greater than 50%") + } else { + return int(stat.Utilization) + } + } + log.Fatalf("Np GPU stats found") + return 100 +} + +func getBalances() { + privateKeyHex := os.Getenv("WEB3_PRIVATE_KEY") + if privateKeyHex == "" { + log.Fatal("PRIVATE_KEY environment variable not set") + } + + privateKey, err := crypto.HexToECDSA(strings.TrimPrefix(privateKeyHex, "0x")) + if err != nil { + log.Fatalf("Failed to convert private key: %v", err) + } + + publicKey := privateKey.Public() + publicKeyECDSA, ok := publicKey.(*ecdsa.PublicKey) + if !ok { + log.Fatal("Failed to cast public key to ECDSA") + } + walletAddress := crypto.PubkeyToAddress(*publicKeyECDSA) + + fmt.Printf("Public Address: %s\n", walletAddress.Hex()) + + // client, err := ethclient.Dial("wss://rpc.ankr.com/arbitrum_sepolia") + client, err := ethclient.Dial(os.Getenv("WEB3_RPC_URL")) + + if err != nil { + log.Fatalf("Failed to connect to the Ethereum client: %v", err) + } + + balance, err := client.BalanceAt(context.Background(), walletAddress, nil) + if err != nil { + log.Fatalf("Failed to retrieve the balance: %v", err) + } + + ethBalance := new(big.Float).Quo(new(big.Float).SetInt(balance), big.NewFloat(1e18)) + + fmt.Printf("ETH Balance: %s\n", ethBalance.Text('f', 18)) + if ethBalance.Cmp(big.NewFloat(.01)) < 0 { + log.Fatalf("Insufficient ETH balance: minimum 0.01 ETH required") + } + tokenAddress := common.HexToAddress(os.Getenv("WEB3_TOKEN_ADDRESS")) //"0x0352485f8a3cB6d305875FaC0C40ef01e0C06535") + + parsedABI, err := abi.JSON(strings.NewReader(ERC20TokenABI)) + if err != nil { + log.Fatalf("Failed to parse token ABI: %v", err) + } + token := bind.NewBoundContract(tokenAddress, parsedABI, client, client, client) + + var tokenBalance = new(big.Int) + var result []interface{} + err = token.Call(&bind.CallOpts{}, &result, "balanceOf", walletAddress) + if err == nil && len(result) > 0 { + tokenBalance = result[0].(*big.Int) + } + if err != nil { + log.Fatalf("Failed to retrieve the token balance: %v", err) + } + + tokenBalanceFloat := new(big.Float).Quo(new(big.Float).SetInt(tokenBalance), big.NewFloat(1e18)) + + fmt.Printf("ERC-20 Token Balance: %s\n", tokenBalanceFloat.Text('f', 18)) + if tokenBalanceFloat.Cmp(big.NewFloat(10)) < 0 { + log.Fatalf("LP Token balance is less than 10") + } +} +func updateBashrc(privateKey string) error { + // Get home directory + home, err := os.UserHomeDir() + if err != nil { + return fmt.Errorf("failed to get home directory: %v", err) + } + + // Open .bashrc in append mode + f, err := os.OpenFile(home+"/.bashrc", os.O_APPEND|os.O_WRONLY, 0644) + if err != nil { + return fmt.Errorf("failed to open .bashrc: %v", err) + } + defer f.Close() + + // Write export line + exportLine := fmt.Sprintf("\nexport WEB3_PRIVATE_KEY=\"%s\"\n", privateKey) + if _, err := f.WriteString(exportLine); err != nil { + return fmt.Errorf("failed to write to .bashrc: %v", err) + } + + // Source .bashrc + cmd := exec.Command("bash", "-c", "source ~/.bashrc") + if err := cmd.Run(); err != nil { + return fmt.Errorf("failed to source .bashrc: %v", err) + } + + return nil +} +func readPrivKeyFromBashrc() string { + home, err := os.UserHomeDir() + if err != nil { + log.Fatalf("Failed to get home directory: %v", err) + } + + content, err := os.ReadFile(home + "/.bashrc") + if err != nil { + log.Fatalf("Failed to read .bashrc: %v", err) + } + + lines := strings.Split(string(content), "\n") + for _, line := range lines { + if strings.HasPrefix(line, "export WEB3_PRIVATE_KEY=") { + value := strings.TrimPrefix(line, "export WEB3_PRIVATE_KEY=") + // Remove quotes if present + return strings.Trim(value, "\"'") + } + } + return "" +} +func main() { + fmt.Println("Lilypad Pre-Flight Check") + // cmd := exec.Command("bash", "-c", "source ~/.bashrc") + // if err := cmd.Run(); err != nil { + // log.Fatalf("Failed to source .bashrc: %v", err) + // } + privKey := readPrivKeyFromBashrc() + if privKey == "" { + privKey = os.Getenv("WEB3_PRIVATE_KEY") + } else { + os.Setenv("WEB3_PRIVATE_KEY", privKey) + fmt.Println("WEB3_PRIVATE_KEY found in ~/.bashrc") + } + fmt.Println("Private Key:", privKey) + if privKey == "" { + // Generate new private key + key, err := ecdsa.GenerateKey(crypto.S256(), rand.Reader) + if err != nil { + log.Fatalf("Failed to generate private key: %v", err) + } + + // Convert to hex string without 0x prefix + privKey = hex.EncodeToString(key.D.Bytes()) + + // Set env var + os.Setenv("WEB3_PRIVATE_KEY", privKey) + + err = updateBashrc(privKey) + if err != nil { + log.Fatalf("Failed to update bashrc: %v", err) + } + // Write to .env file + f, err := os.OpenFile(".env", os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644) + if err != nil { + log.Fatalf("Failed to open .env file: %v", err) + } + defer f.Close() + + if _, err := f.WriteString(fmt.Sprintf("WEB3_PRIVATE_KEY=%s\n", privKey)); err != nil { + log.Fatalf("Failed to write to .env file: %v", err) + } + } + repo := "lilypad_network" + if len(os.Args) > 1 { + repo = os.Args[len(os.Args)-1] + } + if len(os.Args) > 1 && os.Args[1] == "docker" { + cmd := exec.Command("docker-compose", + "-f", "docker-compose-pre-flight.yml", + "-p", os.Args[2]+"-"+os.Args[3], + "up", + "--build") + // , + // "--build") + cmd.Env = append(os.Environ(), fmt.Sprintf("ORG=%s", os.Args[2])) + + cmd.Env = append(cmd.Env, fmt.Sprintf("ORG=%s", repo)) + //https://raw.githubusercontent.com/arsenum/lilypad_network/refs/heads/main/config.toml + // Parse TOML + envVars := getVarsFromRepo(repo) + cmd.Env = append(cmd.Env, envVars...) + for _, envVar := range cmd.Env { + fmt.Println("ENV Var:", envVar) + + } + + // if err != nil { + // fmt.Errorf("failed to parse TOML: %v", err) + // } + + // // Convert TOML to env vars and append + // for _, k := range tree.Keys() { + // value := tree.Get(k) + // strValue := tomlValueToString(value) + // cmd.Env = append(cmd.Env, fmt.Sprintf("%s=%s", k, strValue)) + // } + + cmd.Stdout = os.Stdout + cmd.Stderr = os.Stderr + + if err := cmd.Run(); err != nil { + log.Fatalf("Failed to run docker-compose: %v", err) + } + return + } else { + envVars := getVarsFromRepo(repo) + for _, envVar := range envVars { + fmt.Println("ENV Var:", envVar) + os.Setenv(strings.Split(envVar, "=")[0], strings.Split(envVar, "=")[1]) + + } + getMemoryUtilization() + getCoreUtilization() + getBalances() + // pullAllowList() + } +} + +func getVarsFromRepo(repo string) []string { + resp, err := http.Get(fmt.Sprintf("https://raw.githubusercontent.com/%s/%s/refs/heads/main/config.toml", os.Args[len(os.Args)-2], repo)) + + if err != nil || resp.StatusCode != http.StatusOK { + fmt.Errorf("failed to download TOML: %v", err) + } else { + defer resp.Body.Close() + content, err := ioutil.ReadAll(resp.Body) + if err != nil { + fmt.Errorf("failed to read TOML content: %v", err) + } + + tree, err := toml.LoadBytes(content) + envVars := strings.Split(tomlValueToString(tree, ""), "\n") + return envVars + } + return nil +} +func tomlValueToString(value interface{}, parentKey string) string { + switch v := value.(type) { + case *toml.Tree: + var envVars []string + for _, k := range v.Keys() { + key := k + if parentKey != "" { + key = parentKey + "_" + k + } + value := v.Get(k) + if subTree, ok := value.(*toml.Tree); ok { + envVars = append(envVars, tomlValueToString(subTree, strings.ToUpper(key))) + } else { + envVars = append(envVars, fmt.Sprintf("%s=%v", strings.ToUpper(key), value)) + } + } + return strings.Join(envVars, "\n") + default: + if parentKey != "" { + return fmt.Sprintf("%s=%v", strings.ToUpper(parentKey), v) + } + return fmt.Sprintf("%v", v) + } +} + +// Flags: +// --api-host string The api host to connect to (API_HOST) +// --bacalhau-api-host string The api hostname for the bacalhau cluster to run jobs (default "localhost") +// --bacalhau-api-port string The api port for the bacalhau cluster to run jobs (default "1234") +// --cuda-block-size int Cuda block size (CUDA_BLOCK_SIZE) (default 1024) +// --cuda-grid-size int Cuda grid size (sm*2) (CUDA_GRID_SIZE) (default 128) +// --cuda-hash-per-thread int Cuda hash per threads (CUDA_HASH_PER_THREAD) (default 1000) +// --disable-pow Disable pow mining (DISABLE_POW) +// --disable-telemetry Disable telemetry (DISABLE_TELEMETRY) +// -h, --help help for resource-provider +// --ipfs-connect string The IPFS multiaddress to connect to (IPFS_CONNECT) +// --num-worker int Pow worker number (NUM_WORKER) +// --offer-count int How many machines will we offer using the cpu, ram and gpu settings (OFFER_COUNT). (default 1) +// --offer-cpu int How many milli-cpus to offer the network (OFFER_CPU). (default 1000) +// --offer-gpu int How many milli-gpus to offer the network (OFFER_GPU). +// --offer-modules stringArray The modules you are willing to run (OFFER_MODULES). +// --offer-ram int How many megabytes of RAM to offer the network (OFFER_RAM). (default 1024) +// --pricing-instruction-price uint The price per instruction to offer (PRICING_INSTRUCTION_PRICE) (default 1) +// --pricing-mediation-fee uint The mediation fee (PRICING_MEDIATION_FEE) (default 1) +// --pricing-mode string set pricing mode (MarketPrice/FixedPrice) (default "FixedPrice") +// --pricing-payment-collateral uint The payment collateral (PRICING_PAYMENT_COLLATERAL) (default 2) +// --pricing-results-collateral-multiple uint The results collateral multiple (PRICING_RESULTS_COLLATERAL_MULTIPLE) (default 2) +// --service-mediators strings The mediators we trust (SERVICE_MEDIATORS) +// --service-solver string The solver to connect to (SERVICE_SOLVER) +// --telemetry-token string The token to auth with telemetry service (TELEMETRY_TOKEN) +// --telemetry-url string The telemetry endpoint to connect to (TELEMETRY_URL) +// --timeout-agree-collateral uint The collateral to timeout a deal when agreeing (TIMEOUT_AGREE_COLLATERAL) (default 1) +// --timeout-agree-time uint The number of seconds to timeout a deal when agreeing (TIMEOUT_AGREE_TIME) (default 3600) +// --timeout-judge-results-collateral uint The collateral to timeout a deal when judging results (TIMEOUT_JUDGE_RESULTS_COLLATERAL) (default 1) +// --timeout-judge-results-time uint The number of seconds to timeout a deal when judging results (TIMEOUT_JUDGE_RESULTS_TIME) (default 3600) +// --timeout-mediate-results-collateral uint The collateral to timeout a deal when mediating results (TIMEOUT_MEDIATE_RESULTS_COLLATERAL) (default 1) +// --timeout-mediate-results-time uint The number of seconds to timeout a deal when mediating results (TIMEOUT_MEDIATE_RESULTS_TIME) (default 3600) +// --timeout-submit-results-collateral uint The collateral to timeout a deal when submitting results (TIMEOUT_SUBMIT_RESULTS_COLLATERAL) (default 1) +// --timeout-submit-results-time uint The number of seconds to timeout a deal when submitting results (TIMEOUT_SUBMIT_RESULTS_TIME) (default 3600) +// --web3-chain-id int The chain id for the web3 RPC server (WEB3_CHAIN_ID). +// --web3-controller-address string The address of the controller contract (WEB3_CONTROLLER_ADDRESS). +// --web3-payments-address string The address of the payments contract (WEB3_PAYMENTS_ADDRESS). +// --web3-pow-address string The address of the pow contract (WEB3_POW_ADDRESS). +// --web3-private-key string The private key to use for signing web3 transactions (WEB3_PRIVATE_KEY). +// --web3-rpc-url string The URL of the web3 RPC server (WEB3_RPC_URL). +// --web3-storage-address string The address of the storage contract (WEB3_STORAGE_ADDRESS). +// --web3-token-address string The address of the token contract (WEB3_TOKEN_ADDRESS). +// --web3-users-address string The address of the users contract (WEB3_USERS_ADDRESS). diff --git a/docker/resource-provider/Dockerfile b/docker/resource-provider/Dockerfile index 8ed2e21e..7809a9ec 100644 --- a/docker/resource-provider/Dockerfile +++ b/docker/resource-provider/Dockerfile @@ -13,7 +13,7 @@ ENV WEB3_PRIVATE_KEY="" ENV DISABLE_TELEMETRY=false # Install necessary dependencies -RUN apt update && apt install -y wget bash curl && apt clean +RUN apt update && apt install -y jq wget bash curl && apt clean # Install Bacalhau RUN cd /tmp && \ @@ -44,14 +44,20 @@ RUN mv lilypad /usr/local/bin ENV PATH="/usr/local/bin:${PATH}" # Create a startup script to run both services simultaneously +COPY ./docker/resource-provider/test.sh . RUN touch run RUN echo "#!/bin/bash" >> run # Launch Bacalhau -RUN echo "/usr/local/bin/bacalhau serve --node-type compute,requester --peer none --private-internal-ipfs=false --job-selection-accept-networked &" >> run + +RUN echo 'if [ -n "$IPFS_CONNECT" ]; then' >> run +RUN echo ' /usr/local/bin/bacalhau serve --node-type compute,requester --peer none --private-internal-ipfs=false --job-selection-accept-networked --ipfs-connect $IPFS_CONNECT &' >> run +RUN echo 'else' >> run +RUN echo ' /usr/local/bin/bacalhau serve --node-type compute,requester --peer none --private-internal-ipfs=false --job-selection-accept-networked &' >> run +RUN echo 'fi' >> run # Wait for Bacalhau to be ready by checking the correct API endpoint RUN echo "while ! curl -s http://0.0.0.0:1234/api/v1/agent/alive | grep '\"Status\": \"OK\"'; do echo 'Waiting for Bacalhau...'; sleep 2; done" >> run - +RUN cat ./test.sh >> run # Launch Lilypad RUN echo "/usr/local/bin/lilypad resource-provider --network ${NETWORK} --disable-pow=${DISABLE_POW} --disable-telemetry=${DISABLE_TELEMETRY} &" >> run RUN echo "wait -n" >> run diff --git a/docker/resource-provider/test.sh b/docker/resource-provider/test.sh new file mode 100755 index 00000000..ed480773 --- /dev/null +++ b/docker/resource-provider/test.sh @@ -0,0 +1,9 @@ + +last_line=$(echo "$(bacalhau docker run richbrem/cowsay:latest)" | tail -n 1) +status=$($last_line --json | jq '.["State"]["Executions"][0]["Status"]') +if [ "$status" = "\"Accepted job. execution completed\"" ]; then + echo "Test Job completed successfully" +else + echo "Test Job failed with status: $status" + sleep infinity +fi diff --git a/docs/smart-contract-jobs.md b/docs/smart-contract-jobs.md index 3b34446c..9053a58f 100644 --- a/docs/smart-contract-jobs.md +++ b/docs/smart-contract-jobs.md @@ -162,10 +162,12 @@ async function main() { console.log(`Job ID: ${jobID}`) console.log(`Waiting for job to be completed...`) - let result = '' + // let result = '' while(!result) { - result = await client.getJobResult(jobID) + console.log("before",result) + result = client.getJobResult(jobID) + console.log("after",result) if(!result) { await bluebird.delay(1000) } diff --git a/go.mod b/go.mod index fef1ea17..2fffb393 100644 --- a/go.mod +++ b/go.mod @@ -8,6 +8,7 @@ require ( github.com/davecgh/go-spew v1.1.1 github.com/ethereum/go-ethereum v1.13.4 github.com/fatih/color v1.15.0 + github.com/go-chi/httprate v0.14.1 github.com/go-git/go-git/v5 v5.10.0 github.com/google/uuid v1.6.0 github.com/gorilla/mux v1.8.1 @@ -21,6 +22,7 @@ require ( github.com/ipfs/kubo v0.30.0 github.com/jaypipes/ghw v0.12.0 github.com/multiformats/go-multiaddr v0.13.0 + github.com/pelletier/go-toml v1.9.5 github.com/pkg/errors v0.9.1 github.com/rs/zerolog v1.31.0 github.com/spf13/cobra v1.8.0 @@ -68,7 +70,6 @@ require ( github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/ghodss/yaml v1.0.0 // indirect - github.com/go-chi/httprate v0.14.1 // indirect github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect github.com/go-git/go-billy/v5 v5.5.0 // indirect github.com/go-logr/logr v1.4.2 // indirect diff --git a/go.sum b/go.sum index b4c97452..a4ffaff0 100644 --- a/go.sum +++ b/go.sum @@ -645,6 +645,8 @@ github.com/openzipkin/zipkin-go v0.4.3 h1:9EGwpqkgnwdEIJ+Od7QVSEIH+ocmm5nPat0G7s github.com/openzipkin/zipkin-go v0.4.3/go.mod h1:M9wCJZFWCo2RiY+o1eBCEMe0Dp2S5LDHcMZmk3RmK7c= github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 h1:onHthvaw9LFnH4t2DcNVpwGmV9E1BkGknEliJkfwQj0= github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58/go.mod h1:DXv8WO4yhMYhSNPKjeNKa5WY9YCIEBRbNzFFPJbWO6Y= +github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= +github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ= github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= github.com/petar/GoLLRB v0.0.0-20210522233825-ae3b015fd3e9 h1:1/WtZae0yGtPq+TI6+Tv1WTxkukpXeMlviSxvL7SRgk= diff --git a/hardhat/deployments/orbit/.chainId b/hardhat/deployments/orbit/.chainId new file mode 100644 index 00000000..0a3d8a84 --- /dev/null +++ b/hardhat/deployments/orbit/.chainId @@ -0,0 +1 @@ +68283778764 \ No newline at end of file diff --git a/hardhat/deployments/orbit/.migrations.json b/hardhat/deployments/orbit/.migrations.json new file mode 100644 index 00000000..87054068 --- /dev/null +++ b/hardhat/deployments/orbit/.migrations.json @@ -0,0 +1,12 @@ +{ + "deployToken": 1732663462, + "deployPayments": 1732663462, + "deployStorage": 1732663463, + "deployUsers": 1732663463, + "deployMediation": 1732663464, + "deployJobCreator": 1732663465, + "deployPow": 1732663465, + "deployController": 1732663467, + "upgradePowV2": 1732663468, + "updatePowV2": 1732663468 +} \ No newline at end of file diff --git a/hardhat/deployments/orbit/ExampleClient.json b/hardhat/deployments/orbit/ExampleClient.json new file mode 100644 index 00000000..da3ac756 --- /dev/null +++ b/hardhat/deployments/orbit/ExampleClient.json @@ -0,0 +1,348 @@ +{ + "address": "0x68B1D87F95878fE05B998F19b66F4baba5De1aed", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "dealId", + "type": "string" + }, + { + "indexed": false, + "internalType": "string", + "name": "dataId", + "type": "string" + } + ], + "name": "JobCompleted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "message", + "type": "string" + } + ], + "name": "JobCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_jobID", + "type": "uint256" + } + ], + "name": "getJobResult", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_jobManagerAddress", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "message", + "type": "string" + } + ], + "name": "runCowsay", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_jobManagerAddress", + "type": "address" + } + ], + "name": "setJobManagerAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "string", + "name": "dealId", + "type": "string" + }, + { + "internalType": "string", + "name": "dataId", + "type": "string" + } + ], + "name": "submitResults", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0xf3c92cd81861a6bb416eb08b55aa4ab8c2fde137586662e13c2e5a814a8e82b0", + "receipt": { + "to": null, + "from": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266", + "contractAddress": "0x68B1D87F95878fE05B998F19b66F4baba5De1aed", + "transactionIndex": 1, + "gasUsed": "1268398", + "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000020000000000000100000800000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000200000000000000000000000002000000000000000000020000000000000000000000000000000000000000000000000000100000000000000", + "blockHash": "0xc5be3f08b268afaf6045ba7a93d345df47b968cd87dc40e5e7da6ef1409791e0", + "transactionHash": "0xf3c92cd81861a6bb416eb08b55aa4ab8c2fde137586662e13c2e5a814a8e82b0", + "logs": [ + { + "transactionIndex": 1, + "blockNumber": 38, + "transactionHash": "0xf3c92cd81861a6bb416eb08b55aa4ab8c2fde137586662e13c2e5a814a8e82b0", + "address": "0x68B1D87F95878fE05B998F19b66F4baba5De1aed", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0xc5be3f08b268afaf6045ba7a93d345df47b968cd87dc40e5e7da6ef1409791e0" + } + ], + "blockNumber": 38, + "cumulativeGasUsed": "1268398", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "06e78eaee1ee101e9b46d15f399432ba", + "metadata": "{\"compiler\":{\"version\":\"0.8.21+commit.d9974bed\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"dataId\",\"type\":\"string\"}],\"name\":\"JobCompleted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"message\",\"type\":\"string\"}],\"name\":\"JobCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_jobID\",\"type\":\"uint256\"}],\"name\":\"getJobResult\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_jobManagerAddress\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"message\",\"type\":\"string\"}],\"name\":\"runCowsay\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_jobManagerAddress\",\"type\":\"address\"}],\"name\":\"setJobManagerAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"dataId\",\"type\":\"string\"}],\"name\":\"submitResults\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"}},\"kind\":\"dev\",\"methods\":{\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/ExampleClient.sol\":\"ExampleClient\"},\"evmVersion\":\"shanghai\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized != type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x9c80f545915582e63fe206c6ce27cbe85a86fc10b9cd2a0e8c9488fb7c2ee422\",\"license\":\"MIT\"},\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor() {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby disabling any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xba43b97fba0d32eb4254f6a5a297b39a19a247082a02d6e69349e071e2946218\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"contracts/ExampleClient.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\npragma solidity ^0.8.6;\\n\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport \\\"./ILilypadJobManager.sol\\\";\\nimport \\\"./ILilypadJobClient.sol\\\";\\n\\ncontract ExampleClient is Ownable, Initializable, ILilypadJobClient {\\n\\n address private jobManagerAddress;\\n ILilypadJobManager private jobManagerContract;\\n\\n mapping(uint256 => string) private jobResults;\\n\\n event JobCreated(\\n uint256 id,\\n string message\\n );\\n\\n event JobCompleted(\\n uint256 id,\\n string dealId,\\n string dataId\\n );\\n\\n function initialize(address _jobManagerAddress) public initializer {\\n setJobManagerAddress(_jobManagerAddress);\\n }\\n\\n function setJobManagerAddress(address _jobManagerAddress) public onlyOwner {\\n require(_jobManagerAddress != address(0), \\\"Job manager address\\\");\\n jobManagerAddress = _jobManagerAddress;\\n jobManagerContract = ILilypadJobManager(jobManagerAddress);\\n }\\n\\n function getJobResult(uint256 _jobID) public view returns (string memory) {\\n return jobResults[_jobID];\\n }\\n\\n function runCowsay(\\n string memory message\\n ) public {\\n string[] memory inputs = new string[](1);\\n inputs[0] = string(abi.encodePacked(\\\"Message=\\\", message));\\n uint256 id = jobManagerContract.runJob(\\n \\\"cowsay:v0.0.4\\\",\\n inputs,\\n msg.sender\\n );\\n\\n emit JobCreated(\\n id,\\n message\\n );\\n }\\n\\n function submitResults(\\n uint256 id,\\n string memory dealId,\\n string memory dataId\\n ) public override {\\n jobResults[id] = dataId;\\n emit JobCompleted(\\n id,\\n dealId,\\n dataId\\n );\\n }\\n}\\n\",\"keccak256\":\"0xc4d8a3d909aa9bdaab8a87bf6fe760f1a14cfdc10003a2cc4979b19cf156ab76\",\"license\":\"Apache-2.0\"},\"contracts/ILilypadJobClient.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\npragma solidity ^0.8.6;\\n\\n// a smart contract that is running a job\\n// it will call the IOnChainJobManager with it's job\\n// which will end up with the resultsAdded function being called by the manager\\ninterface ILilypadJobClient {\\n function submitResults(\\n uint256 id,\\n string memory dealId,\\n string memory dataId\\n ) external;\\n}\\n\",\"keccak256\":\"0xbdb36ace8c31e47b30abaa2ce713cec8f488f9dfaac50c7372a5f5196cc3dfcc\",\"license\":\"Apache-2.0\"},\"contracts/ILilypadJobManager.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\npragma solidity ^0.8.6;\\n\\nimport \\\"./ILilypadJobClient.sol\\\";\\n\\n// the smart contract that is responsible for handling the life\\n// cycle of a job - it will pay the registered solver to manage the job\\n// this is the simple implementation - later we can implement the whole protocol\\n// where the calling smart contract can decide if it wants to agree to a resource offer\\n// and accept results\\ninterface ILilypadJobManager is ILilypadJobClient {\\n function runJob(\\n string memory module,\\n string[] memory inputs,\\n address payee\\n ) external returns (uint256);\\n}\\n\",\"keccak256\":\"0xde04dd8ee1fc403b1ec73c2e4dec5881542525823b9bf80199606b44e00691f7\",\"license\":\"Apache-2.0\"}},\"version\":1}", + "bytecode": "0x608060405234801561000f575f80fd5b5061002c61002161003160201b60201c565b61003860201b60201c565b6100f9565b5f33905090565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b611481806101065f395ff3fe608060405234801561000f575f80fd5b5060043610610086575f3560e01c8063c4d66de811610059578063c4d66de8146100fe578063cabc00d11461011a578063ec67df4c14610136578063f2fde38b1461015257610086565b80633b89dcab1461008a5780636c0f1f58146100ba578063715018a6146100d65780638da5cb5b146100e0575b5f80fd5b6100a4600480360381019061009f919061089c565b61016e565b6040516100b19190610951565b60405180910390f35b6100d460048036038101906100cf9190610a9d565b61020f565b005b6100de61026e565b005b6100e8610281565b6040516100f59190610b64565b60405180910390f35b61011860048036038101906101139190610ba7565b6102a8565b005b610134600480360381019061012f9190610bd2565b6103e7565b005b610150600480360381019061014b9190610ba7565b610554565b005b61016c60048036038101906101679190610ba7565b61066e565b005b606060035f8381526020019081526020015f20805461018c90610c46565b80601f01602080910402602001604051908101604052809291908181526020018280546101b890610c46565b80156102035780601f106101da57610100808354040283529160200191610203565b820191905f5260205f20905b8154815290600101906020018083116101e657829003601f168201915b50505050509050919050565b8060035f8581526020019081526020015f20908161022d9190610e13565b507f3849c58b4b39b379bddc5973e71a10ded174f54140916d81986c7eec092e5c4283838360405161026193929190610ef1565b60405180910390a1505050565b6102766106f0565b61027f5f61076e565b565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b5f8060159054906101000a900460ff161590508080156102d9575060015f60149054906101000a900460ff1660ff16105b8061030757506102e83061082f565b158015610306575060015f60149054906101000a900460ff1660ff16145b5b610346576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161033d90610fa4565b60405180910390fd5b60015f60146101000a81548160ff021916908360ff16021790555080156103825760015f60156101000a81548160ff0219169083151502179055505b61038b82610554565b80156103e3575f8060156101000a81548160ff0219169083151502179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249860016040516103da9190611007565b60405180910390a15b5050565b5f600167ffffffffffffffff81111561040357610402610979565b5b60405190808252806020026020018201604052801561043657816020015b60608152602001906001900390816104215790505b5090508160405160200161044a91906110a4565b604051602081830303815290604052815f8151811061046c5761046b6110c5565b5b60200260200101819052505f60025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c75555fa83336040518363ffffffff1660e01b81526004016104d492919061123f565b6020604051808303815f875af11580156104f0573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105149190611294565b90507fb63f0fdfb200b05c8b95fb4dcf8f8abd30f0b6884d532792e705afab4f37380a81846040516105479291906112bf565b60405180910390a1505050565b61055c6106f0565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036105ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105c190611337565b60405180910390fd5b8060015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660025f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6106766106f0565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036106e4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106db906113c5565b60405180910390fd5b6106ed8161076e565b50565b6106f8610851565b73ffffffffffffffffffffffffffffffffffffffff16610716610281565b73ffffffffffffffffffffffffffffffffffffffff161461076c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107639061142d565b60405180910390fd5b565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b5f33905090565b5f604051905090565b5f80fd5b5f80fd5b5f819050919050565b61087b81610869565b8114610885575f80fd5b50565b5f8135905061089681610872565b92915050565b5f602082840312156108b1576108b0610861565b5b5f6108be84828501610888565b91505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f5b838110156108fe5780820151818401526020810190506108e3565b5f8484015250505050565b5f601f19601f8301169050919050565b5f610923826108c7565b61092d81856108d1565b935061093d8185602086016108e1565b61094681610909565b840191505092915050565b5f6020820190508181035f8301526109698184610919565b905092915050565b5f80fd5b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6109af82610909565b810181811067ffffffffffffffff821117156109ce576109cd610979565b5b80604052505050565b5f6109e0610858565b90506109ec82826109a6565b919050565b5f67ffffffffffffffff821115610a0b57610a0a610979565b5b610a1482610909565b9050602081019050919050565b828183375f83830152505050565b5f610a41610a3c846109f1565b6109d7565b905082815260208101848484011115610a5d57610a5c610975565b5b610a68848285610a21565b509392505050565b5f82601f830112610a8457610a83610971565b5b8135610a94848260208601610a2f565b91505092915050565b5f805f60608486031215610ab457610ab3610861565b5b5f610ac186828701610888565b935050602084013567ffffffffffffffff811115610ae257610ae1610865565b5b610aee86828701610a70565b925050604084013567ffffffffffffffff811115610b0f57610b0e610865565b5b610b1b86828701610a70565b9150509250925092565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f610b4e82610b25565b9050919050565b610b5e81610b44565b82525050565b5f602082019050610b775f830184610b55565b92915050565b610b8681610b44565b8114610b90575f80fd5b50565b5f81359050610ba181610b7d565b92915050565b5f60208284031215610bbc57610bbb610861565b5b5f610bc984828501610b93565b91505092915050565b5f60208284031215610be757610be6610861565b5b5f82013567ffffffffffffffff811115610c0457610c03610865565b5b610c1084828501610a70565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f6002820490506001821680610c5d57607f821691505b602082108103610c7057610c6f610c19565b5b50919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f60088302610cd27fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82610c97565b610cdc8683610c97565b95508019841693508086168417925050509392505050565b5f819050919050565b5f610d17610d12610d0d84610869565b610cf4565b610869565b9050919050565b5f819050919050565b610d3083610cfd565b610d44610d3c82610d1e565b848454610ca3565b825550505050565b5f90565b610d58610d4c565b610d63818484610d27565b505050565b5b81811015610d8657610d7b5f82610d50565b600181019050610d69565b5050565b601f821115610dcb57610d9c81610c76565b610da584610c88565b81016020851015610db4578190505b610dc8610dc085610c88565b830182610d68565b50505b505050565b5f82821c905092915050565b5f610deb5f1984600802610dd0565b1980831691505092915050565b5f610e038383610ddc565b9150826002028217905092915050565b610e1c826108c7565b67ffffffffffffffff811115610e3557610e34610979565b5b610e3f8254610c46565b610e4a828285610d8a565b5f60209050601f831160018114610e7b575f8415610e69578287015190505b610e738582610df8565b865550610eda565b601f198416610e8986610c76565b5f5b82811015610eb057848901518255600182019150602085019450602081019050610e8b565b86831015610ecd5784890151610ec9601f891682610ddc565b8355505b6001600288020188555050505b505050505050565b610eeb81610869565b82525050565b5f606082019050610f045f830186610ee2565b8181036020830152610f168185610919565b90508181036040830152610f2a8184610919565b9050949350505050565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c7265615f8201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b5f610f8e602e836108d1565b9150610f9982610f34565b604082019050919050565b5f6020820190508181035f830152610fbb81610f82565b9050919050565b5f819050919050565b5f60ff82169050919050565b5f610ff1610fec610fe784610fc2565b610cf4565b610fcb565b9050919050565b61100181610fd7565b82525050565b5f60208201905061101a5f830184610ff8565b92915050565b5f81905092915050565b7f4d6573736167653d0000000000000000000000000000000000000000000000005f82015250565b5f61105e600883611020565b91506110698261102a565b600882019050919050565b5f61107e826108c7565b6110888185611020565b93506110988185602086016108e1565b80840191505092915050565b5f6110ae82611052565b91506110ba8284611074565b915081905092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b7f636f777361793a76302e302e34000000000000000000000000000000000000005f82015250565b5f611126600d836108d1565b9150611131826110f2565b602082019050919050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b5f82825260208201905092915050565b5f61117f826108c7565b6111898185611165565b93506111998185602086016108e1565b6111a281610909565b840191505092915050565b5f6111b88383611175565b905092915050565b5f602082019050919050565b5f6111d68261113c565b6111e08185611146565b9350836020820285016111f285611156565b805f5b8581101561122d578484038952815161120e85826111ad565b9450611219836111c0565b925060208a019950506001810190506111f5565b50829750879550505050505092915050565b5f6060820190508181035f8301526112568161111a565b9050818103602083015261126a81856111cc565b90506112796040830184610b55565b9392505050565b5f8151905061128e81610872565b92915050565b5f602082840312156112a9576112a8610861565b5b5f6112b684828501611280565b91505092915050565b5f6040820190506112d25f830185610ee2565b81810360208301526112e48184610919565b90509392505050565b7f4a6f62206d616e616765722061646472657373000000000000000000000000005f82015250565b5f6113216013836108d1565b915061132c826112ed565b602082019050919050565b5f6020820190508181035f83015261134e81611315565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f20615f8201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b5f6113af6026836108d1565b91506113ba82611355565b604082019050919050565b5f6020820190508181035f8301526113dc816113a3565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725f82015250565b5f6114176020836108d1565b9150611422826113e3565b602082019050919050565b5f6020820190508181035f8301526114448161140b565b905091905056fea26469706673582212209b7c3f11d4c5029e8b5cf82227b1d6995ff786ad63ad10d82a1c2107eb14831264736f6c63430008150033", + "deployedBytecode": "0x608060405234801561000f575f80fd5b5060043610610086575f3560e01c8063c4d66de811610059578063c4d66de8146100fe578063cabc00d11461011a578063ec67df4c14610136578063f2fde38b1461015257610086565b80633b89dcab1461008a5780636c0f1f58146100ba578063715018a6146100d65780638da5cb5b146100e0575b5f80fd5b6100a4600480360381019061009f919061089c565b61016e565b6040516100b19190610951565b60405180910390f35b6100d460048036038101906100cf9190610a9d565b61020f565b005b6100de61026e565b005b6100e8610281565b6040516100f59190610b64565b60405180910390f35b61011860048036038101906101139190610ba7565b6102a8565b005b610134600480360381019061012f9190610bd2565b6103e7565b005b610150600480360381019061014b9190610ba7565b610554565b005b61016c60048036038101906101679190610ba7565b61066e565b005b606060035f8381526020019081526020015f20805461018c90610c46565b80601f01602080910402602001604051908101604052809291908181526020018280546101b890610c46565b80156102035780601f106101da57610100808354040283529160200191610203565b820191905f5260205f20905b8154815290600101906020018083116101e657829003601f168201915b50505050509050919050565b8060035f8581526020019081526020015f20908161022d9190610e13565b507f3849c58b4b39b379bddc5973e71a10ded174f54140916d81986c7eec092e5c4283838360405161026193929190610ef1565b60405180910390a1505050565b6102766106f0565b61027f5f61076e565b565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b5f8060159054906101000a900460ff161590508080156102d9575060015f60149054906101000a900460ff1660ff16105b8061030757506102e83061082f565b158015610306575060015f60149054906101000a900460ff1660ff16145b5b610346576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161033d90610fa4565b60405180910390fd5b60015f60146101000a81548160ff021916908360ff16021790555080156103825760015f60156101000a81548160ff0219169083151502179055505b61038b82610554565b80156103e3575f8060156101000a81548160ff0219169083151502179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249860016040516103da9190611007565b60405180910390a15b5050565b5f600167ffffffffffffffff81111561040357610402610979565b5b60405190808252806020026020018201604052801561043657816020015b60608152602001906001900390816104215790505b5090508160405160200161044a91906110a4565b604051602081830303815290604052815f8151811061046c5761046b6110c5565b5b60200260200101819052505f60025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c75555fa83336040518363ffffffff1660e01b81526004016104d492919061123f565b6020604051808303815f875af11580156104f0573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105149190611294565b90507fb63f0fdfb200b05c8b95fb4dcf8f8abd30f0b6884d532792e705afab4f37380a81846040516105479291906112bf565b60405180910390a1505050565b61055c6106f0565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036105ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105c190611337565b60405180910390fd5b8060015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660025f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6106766106f0565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036106e4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106db906113c5565b60405180910390fd5b6106ed8161076e565b50565b6106f8610851565b73ffffffffffffffffffffffffffffffffffffffff16610716610281565b73ffffffffffffffffffffffffffffffffffffffff161461076c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107639061142d565b60405180910390fd5b565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b5f33905090565b5f604051905090565b5f80fd5b5f80fd5b5f819050919050565b61087b81610869565b8114610885575f80fd5b50565b5f8135905061089681610872565b92915050565b5f602082840312156108b1576108b0610861565b5b5f6108be84828501610888565b91505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f5b838110156108fe5780820151818401526020810190506108e3565b5f8484015250505050565b5f601f19601f8301169050919050565b5f610923826108c7565b61092d81856108d1565b935061093d8185602086016108e1565b61094681610909565b840191505092915050565b5f6020820190508181035f8301526109698184610919565b905092915050565b5f80fd5b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6109af82610909565b810181811067ffffffffffffffff821117156109ce576109cd610979565b5b80604052505050565b5f6109e0610858565b90506109ec82826109a6565b919050565b5f67ffffffffffffffff821115610a0b57610a0a610979565b5b610a1482610909565b9050602081019050919050565b828183375f83830152505050565b5f610a41610a3c846109f1565b6109d7565b905082815260208101848484011115610a5d57610a5c610975565b5b610a68848285610a21565b509392505050565b5f82601f830112610a8457610a83610971565b5b8135610a94848260208601610a2f565b91505092915050565b5f805f60608486031215610ab457610ab3610861565b5b5f610ac186828701610888565b935050602084013567ffffffffffffffff811115610ae257610ae1610865565b5b610aee86828701610a70565b925050604084013567ffffffffffffffff811115610b0f57610b0e610865565b5b610b1b86828701610a70565b9150509250925092565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f610b4e82610b25565b9050919050565b610b5e81610b44565b82525050565b5f602082019050610b775f830184610b55565b92915050565b610b8681610b44565b8114610b90575f80fd5b50565b5f81359050610ba181610b7d565b92915050565b5f60208284031215610bbc57610bbb610861565b5b5f610bc984828501610b93565b91505092915050565b5f60208284031215610be757610be6610861565b5b5f82013567ffffffffffffffff811115610c0457610c03610865565b5b610c1084828501610a70565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f6002820490506001821680610c5d57607f821691505b602082108103610c7057610c6f610c19565b5b50919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f60088302610cd27fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82610c97565b610cdc8683610c97565b95508019841693508086168417925050509392505050565b5f819050919050565b5f610d17610d12610d0d84610869565b610cf4565b610869565b9050919050565b5f819050919050565b610d3083610cfd565b610d44610d3c82610d1e565b848454610ca3565b825550505050565b5f90565b610d58610d4c565b610d63818484610d27565b505050565b5b81811015610d8657610d7b5f82610d50565b600181019050610d69565b5050565b601f821115610dcb57610d9c81610c76565b610da584610c88565b81016020851015610db4578190505b610dc8610dc085610c88565b830182610d68565b50505b505050565b5f82821c905092915050565b5f610deb5f1984600802610dd0565b1980831691505092915050565b5f610e038383610ddc565b9150826002028217905092915050565b610e1c826108c7565b67ffffffffffffffff811115610e3557610e34610979565b5b610e3f8254610c46565b610e4a828285610d8a565b5f60209050601f831160018114610e7b575f8415610e69578287015190505b610e738582610df8565b865550610eda565b601f198416610e8986610c76565b5f5b82811015610eb057848901518255600182019150602085019450602081019050610e8b565b86831015610ecd5784890151610ec9601f891682610ddc565b8355505b6001600288020188555050505b505050505050565b610eeb81610869565b82525050565b5f606082019050610f045f830186610ee2565b8181036020830152610f168185610919565b90508181036040830152610f2a8184610919565b9050949350505050565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c7265615f8201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b5f610f8e602e836108d1565b9150610f9982610f34565b604082019050919050565b5f6020820190508181035f830152610fbb81610f82565b9050919050565b5f819050919050565b5f60ff82169050919050565b5f610ff1610fec610fe784610fc2565b610cf4565b610fcb565b9050919050565b61100181610fd7565b82525050565b5f60208201905061101a5f830184610ff8565b92915050565b5f81905092915050565b7f4d6573736167653d0000000000000000000000000000000000000000000000005f82015250565b5f61105e600883611020565b91506110698261102a565b600882019050919050565b5f61107e826108c7565b6110888185611020565b93506110988185602086016108e1565b80840191505092915050565b5f6110ae82611052565b91506110ba8284611074565b915081905092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b7f636f777361793a76302e302e34000000000000000000000000000000000000005f82015250565b5f611126600d836108d1565b9150611131826110f2565b602082019050919050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b5f82825260208201905092915050565b5f61117f826108c7565b6111898185611165565b93506111998185602086016108e1565b6111a281610909565b840191505092915050565b5f6111b88383611175565b905092915050565b5f602082019050919050565b5f6111d68261113c565b6111e08185611146565b9350836020820285016111f285611156565b805f5b8581101561122d578484038952815161120e85826111ad565b9450611219836111c0565b925060208a019950506001810190506111f5565b50829750879550505050505092915050565b5f6060820190508181035f8301526112568161111a565b9050818103602083015261126a81856111cc565b90506112796040830184610b55565b9392505050565b5f8151905061128e81610872565b92915050565b5f602082840312156112a9576112a8610861565b5b5f6112b684828501611280565b91505092915050565b5f6040820190506112d25f830185610ee2565b81810360208301526112e48184610919565b90509392505050565b7f4a6f62206d616e616765722061646472657373000000000000000000000000005f82015250565b5f6113216013836108d1565b915061132c826112ed565b602082019050919050565b5f6020820190508181035f83015261134e81611315565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f20615f8201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b5f6113af6026836108d1565b91506113ba82611355565b604082019050919050565b5f6020820190508181035f8301526113dc816113a3565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725f82015250565b5f6114176020836108d1565b9150611422826113e3565b602082019050919050565b5f6020820190508181035f8301526114448161140b565b905091905056fea26469706673582212209b7c3f11d4c5029e8b5cf82227b1d6995ff786ad63ad10d82a1c2107eb14831264736f6c63430008150033", + "devdoc": { + "events": { + "Initialized(uint8)": { + "details": "Triggered when the contract has been initialized or reinitialized." + } + }, + "kind": "dev", + "methods": { + "owner()": { + "details": "Returns the address of the current owner." + }, + "renounceOwnership()": { + "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner." + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 680, + "contract": "contracts/ExampleClient.sol:ExampleClient", + "label": "_owner", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 138, + "contract": "contracts/ExampleClient.sol:ExampleClient", + "label": "_initialized", + "offset": 20, + "slot": "0", + "type": "t_uint8" + }, + { + "astId": 141, + "contract": "contracts/ExampleClient.sol:ExampleClient", + "label": "_initializing", + "offset": 21, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 1745, + "contract": "contracts/ExampleClient.sol:ExampleClient", + "label": "jobManagerAddress", + "offset": 0, + "slot": "1", + "type": "t_address" + }, + { + "astId": 1748, + "contract": "contracts/ExampleClient.sol:ExampleClient", + "label": "jobManagerContract", + "offset": 0, + "slot": "2", + "type": "t_contract(ILilypadJobManager)1989" + }, + { + "astId": 1752, + "contract": "contracts/ExampleClient.sol:ExampleClient", + "label": "jobResults", + "offset": 0, + "slot": "3", + "type": "t_mapping(t_uint256,t_string_storage)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_contract(ILilypadJobManager)1989": { + "encoding": "inplace", + "label": "contract ILilypadJobManager", + "numberOfBytes": "20" + }, + "t_mapping(t_uint256,t_string_storage)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => string)", + "numberOfBytes": "32", + "value": "t_string_storage" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + } + } + } +} \ No newline at end of file diff --git a/hardhat/deployments/orbit/LilypadController.json b/hardhat/deployments/orbit/LilypadController.json new file mode 100644 index 00000000..49f2708f --- /dev/null +++ b/hardhat/deployments/orbit/LilypadController.json @@ -0,0 +1,826 @@ +{ + "address": "0xa85233C63b9Ee964Add6F2cffe00Fd84eb32338f", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + } + ], + "name": "acceptResult", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + }, + { + "internalType": "string", + "name": "resultsId", + "type": "string" + }, + { + "internalType": "string", + "name": "dataId", + "type": "string" + }, + { + "internalType": "uint256", + "name": "instructionCount", + "type": "uint256" + } + ], + "name": "addResult", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + }, + { + "components": [ + { + "internalType": "address", + "name": "solver", + "type": "address" + }, + { + "internalType": "address", + "name": "jobCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "resourceProvider", + "type": "address" + }, + { + "internalType": "address[]", + "name": "mediators", + "type": "address[]" + } + ], + "internalType": "struct SharedStructs.DealMembers", + "name": "members", + "type": "tuple" + }, + { + "components": [ + { + "components": [ + { + "internalType": "uint256", + "name": "timeout", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "collateral", + "type": "uint256" + } + ], + "internalType": "struct SharedStructs.DealTimeout", + "name": "agree", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "timeout", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "collateral", + "type": "uint256" + } + ], + "internalType": "struct SharedStructs.DealTimeout", + "name": "submitResults", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "timeout", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "collateral", + "type": "uint256" + } + ], + "internalType": "struct SharedStructs.DealTimeout", + "name": "judgeResults", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "timeout", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "collateral", + "type": "uint256" + } + ], + "internalType": "struct SharedStructs.DealTimeout", + "name": "mediateResults", + "type": "tuple" + } + ], + "internalType": "struct SharedStructs.DealTimeouts", + "name": "timeouts", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "instructionPrice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "paymentCollateral", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "resultsCollateralMultiple", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "mediationFee", + "type": "uint256" + } + ], + "internalType": "struct SharedStructs.DealPricing", + "name": "pricing", + "type": "tuple" + } + ], + "name": "agree", + "outputs": [ + { + "components": [ + { + "internalType": "enum SharedStructs.AgreementState", + "name": "state", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "resourceProviderAgreedAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "jobCreatorAgreedAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "dealCreatedAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "dealAgreedAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "resultsSubmittedAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "resultsAcceptedAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "resultsCheckedAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "mediationAcceptedAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "mediationRejectedAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timeoutAgreeAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timeoutSubmitResultsAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timeoutJudgeResultsAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timeoutMediateResultsAt", + "type": "uint256" + } + ], + "internalType": "struct SharedStructs.Agreement", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + } + ], + "name": "checkResult", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getJobCreatorAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMediationAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getPaymentsAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getPowAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getStorageAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getUsersAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_storageAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "_usersAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "_paymentsAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "_mediationAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "_jobCreatorAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "_powAddress", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + } + ], + "name": "mediationAcceptResult", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + } + ], + "name": "mediationRejectResult", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_jobCreatorAddress", + "type": "address" + } + ], + "name": "setJobCreatorAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_mediationAddress", + "type": "address" + } + ], + "name": "setMediationAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_paymentsAddress", + "type": "address" + } + ], + "name": "setPaymentsAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_powAddress", + "type": "address" + } + ], + "name": "setPowAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_storageAddress", + "type": "address" + } + ], + "name": "setStorageAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_usersAddress", + "type": "address" + } + ], + "name": "setUsersAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + } + ], + "name": "timeoutAgree", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + } + ], + "name": "timeoutJudgeResult", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + } + ], + "name": "timeoutMediateResult", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + } + ], + "name": "timeoutSubmitResult", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0xc0012beab001e3e4c91010bb6106511df27c9f59fc8de203b73591af77216011", + "receipt": { + "to": null, + "from": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266", + "contractAddress": "0xa85233C63b9Ee964Add6F2cffe00Fd84eb32338f", + "transactionIndex": 1, + "gasUsed": "5118536", + "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000040000000000000020000000000000100000800000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000200000000000000000000000002000000000000000000020000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x963c2be8ce1903e90a94e9c23f108ef2c5fa65188db7c17a846f03750b84b7fa", + "transactionHash": "0xc0012beab001e3e4c91010bb6106511df27c9f59fc8de203b73591af77216011", + "logs": [ + { + "transactionIndex": 1, + "blockNumber": 44, + "transactionHash": "0xc0012beab001e3e4c91010bb6106511df27c9f59fc8de203b73591af77216011", + "address": "0xa85233C63b9Ee964Add6F2cffe00Fd84eb32338f", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x963c2be8ce1903e90a94e9c23f108ef2c5fa65188db7c17a846f03750b84b7fa" + } + ], + "blockNumber": 44, + "cumulativeGasUsed": "5118536", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "06e78eaee1ee101e9b46d15f399432ba", + "metadata": "{\"compiler\":{\"version\":\"0.8.21+commit.d9974bed\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"}],\"name\":\"acceptResult\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"resultsId\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"dataId\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"instructionCount\",\"type\":\"uint256\"}],\"name\":\"addResult\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"solver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"jobCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"resourceProvider\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"mediators\",\"type\":\"address[]\"}],\"internalType\":\"struct SharedStructs.DealMembers\",\"name\":\"members\",\"type\":\"tuple\"},{\"components\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"timeout\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"collateral\",\"type\":\"uint256\"}],\"internalType\":\"struct SharedStructs.DealTimeout\",\"name\":\"agree\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"timeout\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"collateral\",\"type\":\"uint256\"}],\"internalType\":\"struct SharedStructs.DealTimeout\",\"name\":\"submitResults\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"timeout\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"collateral\",\"type\":\"uint256\"}],\"internalType\":\"struct SharedStructs.DealTimeout\",\"name\":\"judgeResults\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"timeout\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"collateral\",\"type\":\"uint256\"}],\"internalType\":\"struct SharedStructs.DealTimeout\",\"name\":\"mediateResults\",\"type\":\"tuple\"}],\"internalType\":\"struct SharedStructs.DealTimeouts\",\"name\":\"timeouts\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"instructionPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"paymentCollateral\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"resultsCollateralMultiple\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"mediationFee\",\"type\":\"uint256\"}],\"internalType\":\"struct SharedStructs.DealPricing\",\"name\":\"pricing\",\"type\":\"tuple\"}],\"name\":\"agree\",\"outputs\":[{\"components\":[{\"internalType\":\"enum SharedStructs.AgreementState\",\"name\":\"state\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"resourceProviderAgreedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"jobCreatorAgreedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"dealCreatedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"dealAgreedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"resultsSubmittedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"resultsAcceptedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"resultsCheckedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"mediationAcceptedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"mediationRejectedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timeoutAgreeAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timeoutSubmitResultsAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timeoutJudgeResultsAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timeoutMediateResultsAt\",\"type\":\"uint256\"}],\"internalType\":\"struct SharedStructs.Agreement\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"}],\"name\":\"checkResult\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getJobCreatorAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getMediationAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPaymentsAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPowAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getStorageAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getUsersAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_storageAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_usersAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_paymentsAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_mediationAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_jobCreatorAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_powAddress\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"}],\"name\":\"mediationAcceptResult\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"}],\"name\":\"mediationRejectResult\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_jobCreatorAddress\",\"type\":\"address\"}],\"name\":\"setJobCreatorAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_mediationAddress\",\"type\":\"address\"}],\"name\":\"setMediationAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_paymentsAddress\",\"type\":\"address\"}],\"name\":\"setPaymentsAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_powAddress\",\"type\":\"address\"}],\"name\":\"setPowAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_storageAddress\",\"type\":\"address\"}],\"name\":\"setStorageAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_usersAddress\",\"type\":\"address\"}],\"name\":\"setUsersAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"}],\"name\":\"timeoutAgree\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"}],\"name\":\"timeoutJudgeResult\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"}],\"name\":\"timeoutMediateResult\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"}],\"name\":\"timeoutSubmitResult\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"}},\"kind\":\"dev\",\"methods\":{\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"addResult(string,string,string,uint256)\":{\"notice\":\"Results\"},\"agree(string,(address,address,address,address[]),((uint256,uint256),(uint256,uint256),(uint256,uint256),(uint256,uint256)),(uint256,uint256,uint256,uint256))\":{\"notice\":\"Agreements\"},\"initialize(address,address,address,address,address,address)\":{\"notice\":\"Init\"},\"mediationAcceptResult(string)\":{\"notice\":\"Mediation\"},\"timeoutAgree(string)\":{\"notice\":\"Timeouts\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/LilypadController.sol\":\"LilypadController\"},\"evmVersion\":\"shanghai\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized != type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x9c80f545915582e63fe206c6ce27cbe85a86fc10b9cd2a0e8c9488fb7c2ee422\",\"license\":\"MIT\"},\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor() {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby disabling any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xba43b97fba0d32eb4254f6a5a297b39a19a247082a02d6e69349e071e2946218\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"contracts/ILilypadController.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\npragma solidity ^0.8.6;\\n\\nimport \\\"./SharedStructs.sol\\\";\\n\\ninterface ILilypadController {\\n\\n function agree(\\n string memory dealId,\\n SharedStructs.DealMembers memory members,\\n SharedStructs.DealTimeouts memory timeouts,\\n SharedStructs.DealPricing memory pricing\\n ) external returns (SharedStructs.Agreement memory);\\n\\n function addResult(\\n string memory dealId,\\n string memory resultsId,\\n string memory dataId,\\n uint256 instructionCount\\n ) external;\\n\\n function acceptResult(\\n string memory dealId\\n ) external;\\n \\n function checkResult(\\n string memory dealId\\n ) external;\\n\\n function mediationAcceptResult(\\n string memory dealId\\n ) external;\\n\\n function mediationRejectResult(\\n string memory dealId\\n ) external;\\n\\n function timeoutAgree(\\n string memory dealId\\n ) external;\\n\\n function timeoutSubmitResult(\\n string memory dealId\\n ) external;\\n\\n function timeoutJudgeResult(\\n string memory dealId\\n ) external;\\n \\n function timeoutMediateResult(\\n string memory dealId\\n ) external;\\n}\\n\",\"keccak256\":\"0xa5d13d97588cedea4f83fdfb0744136f8b34140ddd5e22744fe260684498ff9c\",\"license\":\"Apache-2.0\"},\"contracts/ILilypadMediation.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\npragma solidity ^0.8.6;\\n\\nimport \\\"./SharedStructs.sol\\\";\\n\\n// this is our controller contract\\n// it will be called by the mediation handler once a decision has been reached\\ninterface ILilypadMediationRequester {\\n function mediationAcceptResult(\\n string memory dealId\\n ) external;\\n\\n function mediationRejectResult(\\n string memory dealId\\n ) external;\\n}\\n\\n// this is the contract that will handle mediating a deal\\ninterface ILilypadMediationHandler {\\n function mediationRequest(\\n SharedStructs.Deal memory deal \\n ) external; \\n}\\n\",\"keccak256\":\"0x52cb20c086cfecbe997ba4697c31722f6a93991f7f8ab37a7c8ecbc95993bfd6\",\"license\":\"Apache-2.0\"},\"contracts/ILilypadPayments.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\npragma solidity ^0.8.6;\\n\\ninterface ILilypadPayments {\\n\\n /**\\n * Init\\n */\\n\\n function setTokenAddress(\\n address _tokenAddress\\n ) external;\\n\\n /**\\n * Agreements\\n */\\n function agreeResourceProvider(\\n string memory dealId,\\n address resourceProvider,\\n uint256 timeoutCollateral\\n ) external;\\n\\n function agreeJobCreator(\\n string memory dealId,\\n address jobCreator,\\n uint256 paymentCollateral,\\n uint256 timeoutCollateral\\n ) external;\\n\\n /**\\n * Results\\n */\\n\\n function addResult(\\n string memory dealId,\\n address resourceProvider,\\n uint256 resultsCollateral,\\n uint256 timeoutCollateral\\n ) external;\\n\\n function acceptResult(\\n string memory dealId,\\n address resourceProvider,\\n address jobCreator,\\n uint256 jobCost,\\n uint256 paymentCollateral,\\n uint256 resultsCollateral,\\n uint256 timeoutCollateral\\n ) external;\\n\\n function checkResult(\\n string memory dealId,\\n address jobCreator,\\n uint256 timeoutCollateral,\\n uint256 mediationFee\\n ) external;\\n\\n /**\\n * Mediation\\n */\\n\\n function mediationAcceptResult(\\n string memory dealId,\\n address resourceProvider,\\n address jobCreator,\\n uint256 jobCost,\\n uint256 paymentCollateral,\\n uint256 resultsCollateral,\\n uint256 mediationFee\\n ) external;\\n\\n function mediationRejectResult(\\n string memory dealId,\\n address resourceProvider,\\n address jobCreator,\\n uint256 paymentCollateral,\\n uint256 resultsCollateral,\\n uint256 mediationFee\\n ) external;\\n\\n /**\\n * Timeouts\\n */\\n\\n function timeoutAgreeRefundResourceProvider(\\n string memory dealId,\\n address resourceProvider,\\n uint256 timeoutCollateral\\n ) external;\\n\\n function timeoutAgreeRefundJobCreator(\\n string memory dealId,\\n address jobCreator,\\n uint256 paymentCollateral,\\n uint256 timeoutCollateral\\n ) external;\\n\\n function timeoutSubmitResult(\\n string memory dealId,\\n address resourceProvider,\\n address jobCreator,\\n uint256 paymentCollateral,\\n uint256 timeoutCollateral\\n ) external;\\n\\n function timeoutJudgeResult(\\n string memory dealId,\\n address resourceProvider,\\n address jobCreator,\\n uint256 resultsCollateral,\\n uint256 timeoutCollateral\\n ) external;\\n\\n function timeoutMediateResult(\\n string memory dealId,\\n address resourceProvider,\\n address jobCreator,\\n uint256 paymentCollateral,\\n uint256 resultsCollateral,\\n uint256 mediationFee\\n ) external;\\n \\n}\\n\",\"keccak256\":\"0x5b3ea3fa7c4d031fccf44098eafa82cfd79d8358b2feb0c2057fd907b85df7d0\",\"license\":\"Apache-2.0\"},\"contracts/ILilypadStorage.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\npragma solidity ^0.8.6;\\n\\nimport \\\"./SharedStructs.sol\\\";\\n\\ninterface ILilypadStorage {\\n \\n /**\\n * Deals\\n */\\n\\n function getDeal(\\n string memory dealId\\n ) external returns (SharedStructs.Deal memory);\\n\\n function getDealsForParty(\\n address party\\n ) external returns (uint256[] memory);\\n\\n function ensureDeal(\\n string memory dealId,\\n SharedStructs.DealMembers memory members,\\n SharedStructs.DealTimeouts memory timeouts,\\n SharedStructs.DealPricing memory pricing\\n ) external returns (SharedStructs.Deal memory);\\n\\n /**\\n * Agreements\\n */\\n\\n function getAgreement(\\n string memory dealId\\n ) external returns (SharedStructs.Agreement memory);\\n \\n function agreeResourceProvider(\\n string memory dealId\\n ) external returns (SharedStructs.Agreement memory);\\n\\n function agreeJobCreator(\\n string memory dealId\\n ) external returns (SharedStructs.Agreement memory);\\n \\n /**\\n * Post Results\\n */\\n\\n function getResult(\\n string memory dealId\\n ) external returns (SharedStructs.Result memory);\\n\\n function addResult(\\n string memory dealId,\\n string memory resultsId,\\n string memory dataId,\\n uint256 instructionCount\\n ) external returns (SharedStructs.Result memory);\\n\\n /**\\n * Judge Results\\n */\\n\\n function acceptResult(\\n string memory dealId\\n ) external;\\n\\n function checkResult(\\n string memory dealId\\n ) external;\\n\\n /**\\n * Mediation\\n */\\n \\n function mediationAcceptResult(\\n string memory dealId\\n ) external;\\n\\n function mediationRejectResult(\\n string memory dealId\\n ) external;\\n\\n /**\\n * Timeouts\\n */\\n function timeoutAgree(\\n string memory dealId\\n ) external;\\n\\n function timeoutSubmitResult(\\n string memory dealId\\n ) external;\\n\\n function timeoutJudgeResult(\\n string memory dealId\\n ) external;\\n\\n function timeoutMediateResult(\\n string memory dealId\\n ) external;\\n\\n /**\\n * Costings\\n */\\n\\n function getJobCost(\\n string memory dealId\\n ) external returns (uint256);\\n\\n function getResultsCollateral(\\n string memory dealId\\n ) external returns (uint256);\\n \\n /**\\n * Checkers\\n */\\n\\n function hasDeal(\\n string memory dealId\\n ) external returns (bool);\\n\\n function isState(\\n string memory dealId,\\n SharedStructs.AgreementState state\\n ) external returns (bool);\\n \\n}\\n\",\"keccak256\":\"0x3273e3d6ff280111d52ea6a021e224cc9382487c9da0807acc212ccb6d2eb469\",\"license\":\"Apache-2.0\"},\"contracts/LilypadController.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\npragma solidity ^0.8.6;\\n\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport \\\"./SharedStructs.sol\\\";\\nimport \\\"./ILilypadController.sol\\\";\\nimport \\\"./ILilypadStorage.sol\\\";\\nimport \\\"./ILilypadPayments.sol\\\";\\nimport \\\"./ILilypadMediation.sol\\\";\\n\\ncontract LilypadController is ILilypadController, Ownable, Initializable {\\n\\n /**\\n * Types\\n */\\n \\n address private storageAddress;\\n address private userAddress;\\n address private paymentsAddress;\\n address private mediationAddress;\\n address private jobCreatorAddress;\\n address private powAddress;\\n\\n ILilypadStorage private storageContract;\\n ILilypadPayments private paymentsContract;\\n ILilypadMediationHandler private mediationContract;\\n\\n /**\\n * Init\\n */\\n\\n // https://docs.openzeppelin.com/upgrades-plugins/1.x/writing-upgradeable\\n function initialize(\\n address _storageAddress,\\n address _usersAddress,\\n address _paymentsAddress,\\n address _mediationAddress,\\n address _jobCreatorAddress,\\n address _powAddress\\n ) public initializer {\\n setStorageAddress(_storageAddress);\\n setUsersAddress(_usersAddress);\\n setPaymentsAddress(_paymentsAddress);\\n setMediationAddress(_mediationAddress);\\n setJobCreatorAddress(_jobCreatorAddress);\\n setPowAddress(_powAddress);\\n }\\n\\n function setStorageAddress(address _storageAddress) public onlyOwner {\\n require(_storageAddress != address(0), \\\"Storage address\\\");\\n storageAddress = _storageAddress;\\n storageContract = ILilypadStorage(storageAddress);\\n }\\n\\n function getStorageAddress() public view returns(address) {\\n return storageAddress;\\n }\\n\\n function setUsersAddress(address _usersAddress) public onlyOwner {\\n require(_usersAddress != address(0), \\\"Users address\\\");\\n userAddress = _usersAddress;\\n }\\n\\n function getUsersAddress() public view returns(address) {\\n return userAddress;\\n }\\n\\n function setPaymentsAddress(address _paymentsAddress) public onlyOwner {\\n require(_paymentsAddress != address(0), \\\"Payments address\\\");\\n paymentsAddress = _paymentsAddress;\\n paymentsContract = ILilypadPayments(_paymentsAddress);\\n }\\n\\n function getPaymentsAddress() public view returns(address) {\\n return paymentsAddress;\\n }\\n\\n function setMediationAddress(address _mediationAddress) public onlyOwner {\\n require(_mediationAddress != address(0), \\\"Mediation address\\\");\\n mediationAddress = _mediationAddress;\\n mediationContract = ILilypadMediationHandler(_mediationAddress);\\n }\\n\\n function getMediationAddress() public view returns(address) {\\n return mediationAddress;\\n }\\n\\n function setJobCreatorAddress(address _jobCreatorAddress) public onlyOwner {\\n require(_jobCreatorAddress != address(0), \\\"JobCreator address\\\");\\n jobCreatorAddress = _jobCreatorAddress;\\n }\\n\\n function getJobCreatorAddress() public view returns(address) {\\n return jobCreatorAddress;\\n }\\n\\n function setPowAddress(address _powAddress) public onlyOwner {\\n require(_powAddress != address(0), \\\"Users address\\\");\\n powAddress = _powAddress;\\n }\\n\\n function getPowAddress() public view returns(address) {\\n return powAddress;\\n }\\n\\n\\n /**\\n * Agreements\\n */\\n\\n // * create the deal if not exists\\n // * otherwise compare the values to ensure 2 sided agreement\\n // * check the RP or JC is calling this\\n // * if RP:\\n // * mark the deal as RP agreed\\n // * pay in the timeout collateral\\n // * if JC:\\n // * mark the deal as JC agreed\\n // * pay in the payment collateral and timeout collateral\\n // * if both sides have agreed then mark the deal as agreed\\n // * emit the event\\n function agree(\\n string memory dealId,\\n SharedStructs.DealMembers memory members,\\n SharedStructs.DealTimeouts memory timeouts,\\n SharedStructs.DealPricing memory pricing\\n ) public override returns (SharedStructs.Agreement memory) {\\n SharedStructs.Deal memory deal = storageContract.ensureDeal(\\n dealId,\\n members,\\n timeouts,\\n pricing\\n );\\n bool isResourceProvider = tx.origin == deal.members.resourceProvider;\\n bool isJobCreator = tx.origin == deal.members.jobCreator;\\n require(isResourceProvider || isJobCreator, \\\"Only RP / JC\\\");\\n\\n if(isResourceProvider) {\\n storageContract.agreeResourceProvider(dealId);\\n paymentsContract.agreeResourceProvider(\\n dealId,\\n deal.members.resourceProvider,\\n deal.timeouts.submitResults.collateral\\n );\\n }\\n else if(isJobCreator) {\\n storageContract.agreeJobCreator(dealId);\\n paymentsContract.agreeJobCreator(\\n dealId,\\n deal.members.jobCreator,\\n deal.pricing.paymentCollateral,\\n // the JC paus the judge results collateral\\n deal.timeouts.judgeResults.collateral\\n );\\n }\\n return storageContract.getAgreement(dealId);\\n }\\n\\n /**\\n * Results\\n */\\n\\n // * check the RP is calling this\\n // * mark the deal as results submitted\\n // * calculate the cost of the job\\n // * calculate the job collateral based on the multiple\\n // * work out the difference between the timeout and results collateral\\n // * pay the difference into / out of the contract to the RP\\n // * emit the event\\n function addResult(\\n string memory dealId,\\n string memory resultsId,\\n // this is the CID of the actual data\\n // otherwise onchain clients cannot know the actual data they want to fetch\\n string memory dataId,\\n uint256 instructionCount\\n ) public override {\\n require(storageContract.isState(dealId, SharedStructs.AgreementState.DealAgreed), \\\"DealAgreed\\\");\\n SharedStructs.Deal memory deal = storageContract.getDeal(dealId);\\n require(deal.members.resourceProvider == tx.origin, \\\"Only RP\\\");\\n\\n storageContract.addResult(\\n dealId,\\n resultsId,\\n dataId,\\n instructionCount\\n );\\n\\n // how many multiple of the job cost must the RP put up as collateral\\n // we need to do this after having added the result otherwise\\n // we don't know the instruction count\\n uint256 resultsCollateral = storageContract.getResultsCollateral(dealId);\\n\\n paymentsContract.addResult(\\n dealId,\\n deal.members.resourceProvider,\\n resultsCollateral,\\n // this is the RP adding a results so they get their submit results timeout collateral back\\n deal.timeouts.submitResults.collateral\\n );\\n }\\n\\n // * check the JC is calling this\\n // * check we are in Submitted state\\n // * mark the deal as results accepted\\n // * calculate the cost of the job\\n // * deduct the cost of the job from the JC payment collateral\\n // * pay the RP the cost of the job\\n // * refund the RP the results collateral\\n // * refund the JC the job collateral minus the cost\\n // * refund the JC the timeout collateral\\n function acceptResult(\\n string memory dealId\\n ) public override {\\n require(storageContract.isState(dealId, SharedStructs.AgreementState.ResultsSubmitted), \\\"ResultsSubmitted\\\");\\n SharedStructs.Deal memory deal = storageContract.getDeal(dealId);\\n require(deal.members.jobCreator == tx.origin, \\\"Only JC\\\");\\n \\n uint256 jobCost = storageContract.getJobCost(dealId);\\n uint256 resultsCollateral = storageContract.getResultsCollateral(dealId);\\n\\n storageContract.acceptResult(dealId);\\n paymentsContract.acceptResult(\\n dealId,\\n deal.members.resourceProvider,\\n deal.members.jobCreator,\\n jobCost,\\n deal.pricing.paymentCollateral,\\n resultsCollateral,\\n // this is the JC judging their result so they get their timeout collateral back\\n deal.timeouts.judgeResults.collateral\\n );\\n }\\n\\n // * check the JC is calling this\\n // * check we are in Submitted state\\n // * check the mediator is in the list of RP trusted mediators\\n // * mark the deal as results checked\\n // * charge the JC the mediation fee\\n // * refund the JC the timeout collateral\\n // * emit the Mediation event so the mediator kicks in\\n function checkResult(\\n string memory dealId\\n ) public override {\\n require(storageContract.isState(dealId, SharedStructs.AgreementState.ResultsSubmitted), \\\"ResultsSubmitted\\\");\\n SharedStructs.Deal memory deal = storageContract.getDeal(dealId);\\n require(deal.members.jobCreator == tx.origin, \\\"Only JC\\\");\\n\\n // this function will require that the mediator is in the RP's list of trusted mediators\\n storageContract.checkResult(dealId);\\n paymentsContract.checkResult(\\n dealId,\\n deal.members.jobCreator,\\n // this is the JC judging their result so they get their timeout collateral back\\n deal.timeouts.judgeResults.collateral,\\n deal.pricing.mediationFee\\n );\\n\\n // trigger the mediation process by calling the contract\\n mediationContract.mediationRequest(deal);\\n }\\n\\n /**\\n * Mediation\\n */\\n\\n // the mediator calls this to say that the resource provider did the correct job\\n // * check the state is ResultsChecked\\n // * check the mediator is calling this\\n // * mark the deal as mediation accepted\\n // * refund the JC what is left from the payment collateral (if any)\\n // * pay the RP the cost of the job\\n // * refund the RP the results collateral\\n // * pay the mediator for mediating\\n function mediationAcceptResult(\\n string memory dealId\\n ) public override {\\n require(mediationAddress == _msgSender(), \\\"Only mediation\\\");\\n require(_canMediateResult(dealId), \\\"Cannot mediate\\\");\\n \\n SharedStructs.Deal memory deal = storageContract.getDeal(dealId);\\n uint256 jobCost = storageContract.getJobCost(dealId);\\n uint256 resultsCollateral = storageContract.getResultsCollateral(dealId);\\n\\n storageContract.mediationAcceptResult(dealId);\\n paymentsContract.mediationAcceptResult(\\n dealId,\\n deal.members.resourceProvider,\\n deal.members.jobCreator,\\n jobCost,\\n deal.pricing.paymentCollateral,\\n resultsCollateral,\\n deal.pricing.mediationFee\\n );\\n }\\n\\n // the mediator calls this to say that the resource provider did the bad job\\n // * check the state is ResultsChecked\\n // * check the mediator is calling this\\n // * mark the deal as mediation rejected\\n // * refund the JC their payment collateral\\n // * slash the RP's results collateral\\n // * pay the mediator for mediating\\n function mediationRejectResult(\\n string memory dealId\\n ) public override {\\n // only the current mediation contract can call this\\n require(mediationAddress == _msgSender(), \\\"Only mediation\\\");\\n require(_canMediateResult(dealId), \\\"Cannot mediate\\\");\\n\\n SharedStructs.Deal memory deal = storageContract.getDeal(dealId);\\n uint256 resultsCollateral = storageContract.getResultsCollateral(dealId);\\n\\n storageContract.mediationRejectResult(dealId);\\n paymentsContract.mediationRejectResult(\\n dealId,\\n deal.members.resourceProvider,\\n deal.members.jobCreator,\\n deal.pricing.paymentCollateral,\\n resultsCollateral,\\n deal.pricing.mediationFee\\n );\\n }\\n\\n function _canMediateResult(\\n string memory dealId \\n ) private returns (bool) {\\n require(storageContract.isState(dealId, SharedStructs.AgreementState.ResultsChecked), \\\"ResultsChecked\\\");\\n return true;\\n }\\n\\n /**\\n * Timeouts\\n */\\n\\n function timeoutAgree(\\n string memory dealId\\n ) public override {\\n SharedStructs.Deal memory deal = storageContract.getDeal(dealId);\\n SharedStructs.Agreement memory agreement = storageContract.getAgreement(dealId);\\n require(deal.members.jobCreator == tx.origin || deal.members.resourceProvider == tx.origin, \\\"Only JC or RP\\\");\\n require(agreement.state == SharedStructs.AgreementState.DealNegotiating, \\\"Not correct state\\\");\\n require(block.timestamp > agreement.dealCreatedAt + deal.timeouts.agree.timeout, \\\"Not timed out\\\");\\n storageContract.timeoutAgree(dealId);\\n if (agreement.resourceProviderAgreedAt > 0) {\\n // this is an RP refund\\n paymentsContract.timeoutAgreeRefundResourceProvider(\\n dealId,\\n deal.members.resourceProvider,\\n deal.timeouts.submitResults.collateral\\n );\\n } else if (agreement.jobCreatorAgreedAt > 0) {\\n // this is an JC refund\\n paymentsContract.timeoutAgreeRefundJobCreator(\\n dealId,\\n deal.members.jobCreator,\\n deal.pricing.paymentCollateral,\\n deal.timeouts.submitResults.collateral\\n );\\n }\\n }\\n\\n // the job creator calls this after the timeout has passed and there are no results submitted\\n // * check the JC is calling this\\n // * mark the deal as timedout\\n // * pay back the JC's job collateral\\n // * slash the RP's results collateral\\n // * emit the event\\n function timeoutSubmitResult(\\n string memory dealId\\n ) public override {\\n SharedStructs.Deal memory deal = storageContract.getDeal(dealId);\\n SharedStructs.Agreement memory agreement = storageContract.getAgreement(dealId);\\n require(deal.members.jobCreator == tx.origin, \\\"Only JC\\\");\\n require(agreement.state == SharedStructs.AgreementState.DealAgreed, \\\"Not correct state\\\");\\n require(block.timestamp > agreement.dealAgreedAt + deal.timeouts.submitResults.timeout, \\\"Not timed out\\\");\\n storageContract.timeoutSubmitResult(dealId);\\n paymentsContract.timeoutSubmitResult(\\n dealId,\\n deal.members.resourceProvider,\\n deal.members.jobCreator,\\n deal.pricing.paymentCollateral,\\n deal.timeouts.submitResults.collateral\\n );\\n }\\n\\n // the resource provider calls this after the timeout has passed after submitting results\\n // and the job creator has not yet submitted their judgement on those results\\n // * check the RP is calling this\\n // * mark the deal as timedout\\n // * pay back the RP's results collateral\\n // * pay the RP the cost of the job\\n // * slash the JC's timeout collateral\\n // * slash the JC's job collateral\\n // * emit the event\\n function timeoutJudgeResult(\\n string memory dealId\\n ) public override {\\n SharedStructs.Deal memory deal = storageContract.getDeal(dealId);\\n SharedStructs.Agreement memory agreement = storageContract.getAgreement(dealId);\\n require(deal.members.resourceProvider == tx.origin, \\\"Only RP\\\");\\n require(agreement.state == SharedStructs.AgreementState.ResultsSubmitted, \\\"Not correct state\\\");\\n require(block.timestamp > agreement.resultsSubmittedAt + deal.timeouts.judgeResults.timeout, \\\"Not timed out\\\");\\n uint256 resultsCollateral = storageContract.getResultsCollateral(dealId);\\n storageContract.timeoutJudgeResult(dealId); \\n paymentsContract.timeoutJudgeResult(\\n dealId,\\n deal.members.resourceProvider,\\n deal.members.jobCreator,\\n resultsCollateral,\\n deal.timeouts.judgeResults.collateral\\n );\\n }\\n\\n // either the JC or RP call this after the timeout has passed after results being checked\\n // this refunds both the payment and results collateral to both the JC and RP\\n // * check the RP or JC is calling this\\n // * mark the deal as timedout\\n // * pay back the RP's results collateral\\n // * pay back the JC's paymnet collateral\\n // * emit the event\\n function timeoutMediateResult(\\n string memory dealId\\n ) public override {\\n SharedStructs.Deal memory deal = storageContract.getDeal(dealId);\\n SharedStructs.Agreement memory agreement = storageContract.getAgreement(dealId);\\n require(deal.members.resourceProvider == tx.origin || deal.members.jobCreator == tx.origin, \\\"Only RP or JC\\\");\\n require(agreement.state == SharedStructs.AgreementState.ResultsChecked, \\\"Not correct state\\\");\\n require(block.timestamp > agreement.resultsSubmittedAt + deal.timeouts.judgeResults.timeout, \\\"Not timed out\\\");\\n uint256 resultsCollateral = storageContract.getResultsCollateral(dealId);\\n storageContract.timeoutMediateResult(dealId);\\n paymentsContract.timeoutMediateResult(\\n dealId,\\n deal.members.resourceProvider,\\n deal.members.jobCreator,\\n deal.pricing.paymentCollateral,\\n resultsCollateral,\\n deal.pricing.mediationFee\\n );\\n }\\n}\\n\",\"keccak256\":\"0x1ed323cfd54d65000c966dd9551fbec2bf0830013eb44a17bd9c854cbc3b0d0c\",\"license\":\"Apache-2.0\"},\"contracts/SharedStructs.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\npragma solidity ^0.8.6;\\n\\nlibrary SharedStructs {\\n\\n enum ServiceType {\\n Solver,\\n Mediator,\\n ResourceProvider,\\n JobCreator\\n }\\n\\n enum AgreementState {\\n\\n // the two parties have not yet both agreed to the deal\\n DealNegotiating,\\n\\n // both parties have agreed\\n DealAgreed,\\n\\n // results have been submitted by the RP\\n ResultsSubmitted,\\n\\n // the JC has accepted the results\\n ResultsAccepted,\\n\\n // the JC has checked the results\\n ResultsChecked,\\n\\n // a mediator has accepted the results\\n MediationAccepted,\\n\\n // a mediator has rejected the results\\n MediationRejected,\\n\\n // this means the counter-party did not agree to the deal in time\\n TimeoutAgree,\\n\\n // this means the RP did not submit results in time\\n TimeoutSubmitResults,\\n\\n // this means the JC did not accept or reject results in time\\n TimeoutJudgeResults,\\n\\n // this means the mediator did not accept or submit judgement in time\\n TimeoutMediateResults\\n\\n }\\n\\n // we map addresses onto infomation about the user\\n struct User {\\n address userAddress;\\n // the CID of information for this user\\n string metadataCID;\\n string url;\\n ServiceType[] roles;\\n }\\n\\n // the various addresses involved in runnig a deal\\n struct DealMembers {\\n // the address of the solver service that the RP and JC have agreed to use\\n address solver;\\n // the addresses of the RP and JC that have agreed to this deal\\n address jobCreator;\\n address resourceProvider;\\n // the list of mediators that the RP and JC have agreed to use\\n address[] mediators;\\n }\\n\\n // a timeout represents the agreed amount of time and the penalty\\n // that is applied if the timeout is exceeded \\n struct DealTimeout {\\n uint256 timeout;\\n uint256 collateral;\\n }\\n \\n // the various forms of timeout a deal can have\\n struct DealTimeouts { \\n DealTimeout agree;\\n DealTimeout submitResults;\\n DealTimeout judgeResults;\\n DealTimeout mediateResults;\\n }\\n\\n // configure the cost of a deal\\n struct DealPricing {\\n // agreed price per instruction\\n uint256 instructionPrice;\\n\\n // the collateral that the JC has put up to pay for the job\\n // the final cost of the job will be deducted from this\\n uint256 paymentCollateral;\\n\\n // how much collateral the RP will post to attest it's results are correct\\n // this is a multiple of the cost of the job which is known at results\\n // submission time\\n uint256 resultsCollateralMultiple;\\n\\n // how much is the JC willing to pay the mediator to resolve disputes\\n uint256 mediationFee;\\n }\\n\\n // a Deal forms the information that is agreed between both parties\\n // both parties must have called \\\"agree_deal\\\" with the exact\\n // same parameters before the deal is considered valid\\n // a Deal is immutable - nothing about it can be updated\\n struct Deal {\\n // the CID of the Deal document on IPFS (and directory service)\\n // this contains the job spec, the job offer and the resource offer\\n string dealId;\\n\\n // who is participating in this deal\\n DealMembers members;\\n \\n // the timeout settings for a deal\\n DealTimeouts timeouts;\\n\\n // the pricing settings for a deal\\n DealPricing pricing; \\n }\\n\\n // what the RP submits back once having run the job\\n // this is also immutable\\n struct Result {\\n // the id of the deal that this result is for\\n string dealId;\\n\\n // the CID of the results on IPFS (and directory service)\\n // NOTE - this is not the CID of actual results data rather\\n // of the JSON object reporting that data\\n string resultsId;\\n\\n // this is the actual lower level data CID\\n string dataId;\\n\\n // how many instructions were executed by the RP\\n uint256 instructionCount;\\n }\\n\\n // an agreement keeps track of the state of a deal and it's fields can be mutated\\n struct Agreement {\\n // the current state of the agreement\\n AgreementState state;\\n\\n uint256 resourceProviderAgreedAt;\\n uint256 jobCreatorAgreedAt;\\n uint256 dealCreatedAt;\\n uint256 dealAgreedAt;\\n\\n uint256 resultsSubmittedAt;\\n uint256 resultsAcceptedAt;\\n uint256 resultsCheckedAt;\\n\\n uint256 mediationAcceptedAt;\\n uint256 mediationRejectedAt;\\n\\n uint256 timeoutAgreeAt;\\n uint256 timeoutSubmitResultsAt;\\n uint256 timeoutJudgeResultsAt;\\n uint256 timeoutMediateResultsAt;\\n }\\n\\n struct JobOffer {\\n uint256 id;\\n \\n // this is the contract that will be triggered\\n // once there are some results\\n address calling_contract;\\n\\n // this is the address that is paying for the job\\n // they must have called approve on the token contract\\n // and granted the solver address the number of tokens\\n // required\\n address payee;\\n\\n // the job spec\\n string module;\\n string[] inputs;\\n }\\n}\\n\",\"keccak256\":\"0x17ae1fe0274d61f5460caee95e214371a378a3e49730e5bdc4833506de99fcb6\",\"license\":\"Apache-2.0\"}},\"version\":1}", + "bytecode": "0x608060405234801562000010575f80fd5b5062000031620000256200003760201b60201c565b6200003e60201b60201c565b620000ff565b5f33905090565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6158f5806200010d5f395ff3fe608060405234801561000f575f80fd5b506004361061018c575f3560e01c806380ffdfe0116100dc578063cc2a9a5b11610095578063e7b957d11161006f578063e7b957d1146103f4578063e850be3714610410578063f2fde38b1461042c578063f583b125146104485761018c565b8063cc2a9a5b1461039c578063d48b1084146103b8578063d882a252146103d65761018c565b806380ffdfe0146102f0578063824518aa1461030c5780638da5cb5b1461032857806393dbed3e14610346578063b4031e5414610364578063bbfff47d146103805761018c565b806346834d1e1161014957806359b910d61161012357806359b910d614610292578063640e570f146102ae578063715018a6146102ca578063795f9abf146102d45761018c565b806346834d1e1461023e5780634ef168a61461025a578063511a9f68146102765761018c565b80630aca35ce14610190578063155329ea146101ae578063297f9e55146101cc578063393a4d34146101e85780633955548e1461020657806343391cca14610222575b5f80fd5b610198610478565b6040516101a591906138fe565b60405180910390f35b6101b66104a0565b6040516101c391906138fe565b60405180910390f35b6101e660048036038101906101e19190613a64565b6104c8565b005b6101f0610938565b6040516101fd91906138fe565b60405180910390f35b610220600480360381019061021b9190613ade565b610960565b005b61023c60048036038101906102379190613bc0565b610d3c565b005b61025860048036038101906102539190613a64565b610e35565b005b610274600480360381019061026f9190613bc0565b6111e2565b005b610290600480360381019061028b9190613a64565b61129b565b005b6102ac60048036038101906102a79190613bc0565b611654565b005b6102c860048036038101906102c39190613bc0565b61176e565b005b6102d2611867565b005b6102ee60048036038101906102e99190613a64565b61187a565b005b61030a60048036038101906103059190613a64565b611d23565b005b61032660048036038101906103219190613a64565b61207b565b005b610330612473565b60405161033d91906138fe565b60405180910390f35b61034e61249a565b60405161035b91906138fe565b60405180910390f35b61037e60048036038101906103799190613bc0565b6124c2565b005b61039a60048036038101906103959190613bc0565b61257b565b005b6103b660048036038101906103b19190613beb565b612634565b005b6103c06127a5565b6040516103cd91906138fe565b60405180910390f35b6103de6127cd565b6040516103eb91906138fe565b60405180910390f35b61040e60048036038101906104099190613a64565b6127f5565b005b61042a60048036038101906104259190613a64565b612c88565b005b61044660048036038101906104419190613bc0565b6130d7565b005b610462600480360381019061045d9190613f09565b613159565b60405161046f9190614147565b60405180910390f35b5f60055f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b5f60045f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b050e74b8260026040518363ffffffff1660e01b81526004016105259291906141ea565b6020604051808303815f875af1158015610541573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610565919061424d565b6105a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161059b906142c2565b60405180910390fd5b5f60075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e7079180836040518263ffffffff1660e01b81526004016105ff91906142e0565b5f604051808303815f875af115801561061a573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f8201168201806040525081019061064291906146a3565b90503273ffffffffffffffffffffffffffffffffffffffff1681602001516020015173ffffffffffffffffffffffffffffffffffffffff16146106ba576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106b190614734565b60405180910390fd5b5f60075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166373db5c6a846040518263ffffffff1660e01b815260040161071591906142e0565b6020604051808303815f875af1158015610731573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107559190614752565b90505f60075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638224ce5f856040518263ffffffff1660e01b81526004016107b291906142e0565b6020604051808303815f875af11580156107ce573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107f29190614752565b905060075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663297f9e55856040518263ffffffff1660e01b815260040161084e91906142e0565b5f604051808303815f87803b158015610865575f80fd5b505af1158015610877573d5f803e3d5ffd5b5050505060085f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b13567148585602001516040015186602001516020015186886060015160200151878a6040015160400151602001516040518863ffffffff1660e01b8152600401610905979695949392919061478c565b5f604051808303815f87803b15801561091c575f80fd5b505af115801561092e573d5f803e3d5ffd5b5050505050505050565b5f60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b050e74b8560016040518363ffffffff1660e01b81526004016109bd9291906141ea565b6020604051808303815f875af11580156109d9573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109fd919061424d565b610a3c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a339061484a565b60405180910390fd5b5f60075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e7079180866040518263ffffffff1660e01b8152600401610a9791906142e0565b5f604051808303815f875af1158015610ab2573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f82011682018060405250810190610ada91906146a3565b90503273ffffffffffffffffffffffffffffffffffffffff1681602001516040015173ffffffffffffffffffffffffffffffffffffffff1614610b52576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b49906148b2565b60405180910390fd5b60075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633955548e868686866040518563ffffffff1660e01b8152600401610bb294939291906148d0565b5f604051808303815f875af1158015610bcd573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f82011682018060405250810190610bf591906149f1565b505f60075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638224ce5f876040518263ffffffff1660e01b8152600401610c5191906142e0565b6020604051808303815f875af1158015610c6d573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610c919190614752565b905060085f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166309cab5108784602001516040015184866040015160200151602001516040518563ffffffff1660e01b8152600401610d079493929190614a38565b5f604051808303815f87803b158015610d1e575f80fd5b505af1158015610d30573d5f803e3d5ffd5b50505050505050505050565b610d446135fe565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610db2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610da990614acc565b60405180910390fd5b8060045f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508060095f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b050e74b8260026040518363ffffffff1660e01b8152600401610e929291906141ea565b6020604051808303815f875af1158015610eae573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610ed2919061424d565b610f11576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f08906142c2565b60405180910390fd5b5f60075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e7079180836040518263ffffffff1660e01b8152600401610f6c91906142e0565b5f604051808303815f875af1158015610f87573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f82011682018060405250810190610faf91906146a3565b90503273ffffffffffffffffffffffffffffffffffffffff1681602001516020015173ffffffffffffffffffffffffffffffffffffffff1614611027576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161101e90614734565b60405180910390fd5b60075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166346834d1e836040518263ffffffff1660e01b815260040161108191906142e0565b5f604051808303815f87803b158015611098575f80fd5b505af11580156110aa573d5f803e3d5ffd5b5050505060085f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663aea3825183836020015160200151846040015160400151602001518560600151606001516040518563ffffffff1660e01b815260040161112a9493929190614a38565b5f604051808303815f87803b158015611141575f80fd5b505af1158015611153573d5f803e3d5ffd5b5050505060095f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370bea207826040518263ffffffff1660e01b81526004016111b19190614d86565b5f604051808303815f87803b1580156111c8575f80fd5b505af11580156111da573d5f803e3d5ffd5b505050505050565b6111ea6135fe565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611258576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161124f90614df0565b60405180910390fd5b8060065f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b5f60075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e7079180836040518263ffffffff1660e01b81526004016112f691906142e0565b5f604051808303815f875af1158015611311573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f8201168201806040525081019061133991906146a3565b90505f60075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663cdd82d1d846040518263ffffffff1660e01b815260040161139691906142e0565b6101c0604051808303815f875af11580156113b3573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906113d79190614f7c565b90503273ffffffffffffffffffffffffffffffffffffffff1682602001516020015173ffffffffffffffffffffffffffffffffffffffff161461144f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161144690614734565b60405180910390fd5b6001600a81111561146357611462613fa7565b5b815f0151600a81111561147957611478613fa7565b5b146114b9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114b090614ff2565b60405180910390fd5b8160400151602001515f015181608001516114d4919061503d565b4211611515576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161150c906150ba565b60405180910390fd5b60075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663511a9f68846040518263ffffffff1660e01b815260040161156f91906142e0565b5f604051808303815f87803b158015611586575f80fd5b505af1158015611598573d5f803e3d5ffd5b5050505060085f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633d31a11584846020015160400151856020015160200151866060015160200151876040015160200151602001516040518663ffffffff1660e01b81526004016116229594939291906150d8565b5f604051808303815f87803b158015611639575f80fd5b505af115801561164b573d5f803e3d5ffd5b50505050505050565b61165c6135fe565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036116ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116c19061517a565b60405180910390fd5b8060015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660075f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6117766135fe565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036117e4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117db906151e2565b60405180910390fd5b8060035f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508060085f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b61186f6135fe565b6118785f61367c565b565b5f60075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e7079180836040518263ffffffff1660e01b81526004016118d591906142e0565b5f604051808303815f875af11580156118f0573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f8201168201806040525081019061191891906146a3565b90505f60075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663cdd82d1d846040518263ffffffff1660e01b815260040161197591906142e0565b6101c0604051808303815f875af1158015611992573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906119b69190614f7c565b90503273ffffffffffffffffffffffffffffffffffffffff1682602001516020015173ffffffffffffffffffffffffffffffffffffffff161480611a2d57503273ffffffffffffffffffffffffffffffffffffffff1682602001516040015173ffffffffffffffffffffffffffffffffffffffff16145b611a6c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a639061524a565b60405180910390fd5b5f600a811115611a7f57611a7e613fa7565b5b815f0151600a811115611a9557611a94613fa7565b5b14611ad5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611acc90614ff2565b60405180910390fd5b81604001515f01515f01518160600151611aef919061503d565b4211611b30576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b27906150ba565b60405180910390fd5b60075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663795f9abf846040518263ffffffff1660e01b8152600401611b8a91906142e0565b5f604051808303815f87803b158015611ba1575f80fd5b505af1158015611bb3573d5f803e3d5ffd5b505050505f81602001511115611c675760085f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630ef0d89e84846020015160400151856040015160200151602001516040518463ffffffff1660e01b8152600401611c3593929190615268565b5f604051808303815f87803b158015611c4c575f80fd5b505af1158015611c5e573d5f803e3d5ffd5b50505050611d1e565b5f81604001511115611d1d5760085f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663afe1dff784846020015160200151856060015160200151866040015160200151602001516040518563ffffffff1660e01b8152600401611cef9493929190614a38565b5f604051808303815f87803b158015611d06575f80fd5b505af1158015611d18573d5f803e3d5ffd5b505050505b5b505050565b611d2b61373d565b73ffffffffffffffffffffffffffffffffffffffff1660045f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611db9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611db0906152ee565b60405180910390fd5b611dc281613744565b611e01576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611df890615356565b60405180910390fd5b5f60075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e7079180836040518263ffffffff1660e01b8152600401611e5c91906142e0565b5f604051808303815f875af1158015611e77573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f82011682018060405250810190611e9f91906146a3565b90505f60075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638224ce5f846040518263ffffffff1660e01b8152600401611efc91906142e0565b6020604051808303815f875af1158015611f18573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611f3c9190614752565b905060075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166380ffdfe0846040518263ffffffff1660e01b8152600401611f9891906142e0565b5f604051808303815f87803b158015611faf575f80fd5b505af1158015611fc1573d5f803e3d5ffd5b5050505060085f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d2485cce84846020015160400151856020015160200151866060015160200151868860600151606001516040518763ffffffff1660e01b815260040161204996959493929190615374565b5f604051808303815f87803b158015612060575f80fd5b505af1158015612072573d5f803e3d5ffd5b50505050505050565b61208361373d565b73ffffffffffffffffffffffffffffffffffffffff1660045f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612111576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612108906152ee565b60405180910390fd5b61211a81613744565b612159576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161215090615356565b60405180910390fd5b5f60075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e7079180836040518263ffffffff1660e01b81526004016121b491906142e0565b5f604051808303815f875af11580156121cf573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f820116820180604052508101906121f791906146a3565b90505f60075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166373db5c6a846040518263ffffffff1660e01b815260040161225491906142e0565b6020604051808303815f875af1158015612270573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906122949190614752565b90505f60075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638224ce5f856040518263ffffffff1660e01b81526004016122f191906142e0565b6020604051808303815f875af115801561230d573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906123319190614752565b905060075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663824518aa856040518263ffffffff1660e01b815260040161238d91906142e0565b5f604051808303815f87803b1580156123a4575f80fd5b505af11580156123b6573d5f803e3d5ffd5b5050505060085f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632a1f90728585602001516040015186602001516020015186886060015160200151878a60600151606001516040518863ffffffff1660e01b8152600401612440979695949392919061478c565b5f604051808303815f87803b158015612457575f80fd5b505af1158015612469573d5f803e3d5ffd5b5050505050505050565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b5f60025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6124ca6135fe565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603612538576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161252f90615424565b60405180910390fd5b8060055f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6125836135fe565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036125f1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125e890614df0565b60405180910390fd5b8060025f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b5f8060159054906101000a900460ff16159050808015612665575060015f60149054906101000a900460ff1660ff16105b8061269357506126743061382a565b158015612692575060015f60149054906101000a900460ff1660ff16145b5b6126d2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016126c9906154b2565b60405180910390fd5b60015f60146101000a81548160ff021916908360ff160217905550801561270e5760015f60156101000a81548160ff0219169083151502179055505b61271787611654565b6127208661257b565b6127298561176e565b61273284610d3c565b61273b836124c2565b612744826111e2565b801561279c575f8060156101000a81548160ff0219169083151502179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024986001604051612793919061551e565b60405180910390a15b50505050505050565b5f60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b5f60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b5f60075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e7079180836040518263ffffffff1660e01b815260040161285091906142e0565b5f604051808303815f875af115801561286b573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f8201168201806040525081019061289391906146a3565b90505f60075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663cdd82d1d846040518263ffffffff1660e01b81526004016128f091906142e0565b6101c0604051808303815f875af115801561290d573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906129319190614f7c565b90503273ffffffffffffffffffffffffffffffffffffffff1682602001516040015173ffffffffffffffffffffffffffffffffffffffff1614806129a857503273ffffffffffffffffffffffffffffffffffffffff1682602001516020015173ffffffffffffffffffffffffffffffffffffffff16145b6129e7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016129de90615581565b60405180910390fd5b6004600a8111156129fb576129fa613fa7565b5b815f0151600a811115612a1157612a10613fa7565b5b14612a51576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a4890614ff2565b60405180910390fd5b8160400151604001515f01518160a00151612a6c919061503d565b4211612aad576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612aa4906150ba565b60405180910390fd5b5f60075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638224ce5f856040518263ffffffff1660e01b8152600401612b0891906142e0565b6020604051808303815f875af1158015612b24573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612b489190614752565b905060075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e7b957d1856040518263ffffffff1660e01b8152600401612ba491906142e0565b5f604051808303815f87803b158015612bbb575f80fd5b505af1158015612bcd573d5f803e3d5ffd5b5050505060085f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663823f3de185856020015160400151866020015160200151876060015160200151868960600151606001516040518763ffffffff1660e01b8152600401612c5596959493929190615374565b5f604051808303815f87803b158015612c6c575f80fd5b505af1158015612c7e573d5f803e3d5ffd5b5050505050505050565b5f60075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e7079180836040518263ffffffff1660e01b8152600401612ce391906142e0565b5f604051808303815f875af1158015612cfe573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f82011682018060405250810190612d2691906146a3565b90505f60075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663cdd82d1d846040518263ffffffff1660e01b8152600401612d8391906142e0565b6101c0604051808303815f875af1158015612da0573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612dc49190614f7c565b90503273ffffffffffffffffffffffffffffffffffffffff1682602001516040015173ffffffffffffffffffffffffffffffffffffffff1614612e3c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612e33906148b2565b60405180910390fd5b6002600a811115612e5057612e4f613fa7565b5b815f0151600a811115612e6657612e65613fa7565b5b14612ea6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612e9d90614ff2565b60405180910390fd5b8160400151604001515f01518160a00151612ec1919061503d565b4211612f02576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612ef9906150ba565b60405180910390fd5b5f60075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638224ce5f856040518263ffffffff1660e01b8152600401612f5d91906142e0565b6020604051808303815f875af1158015612f79573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612f9d9190614752565b905060075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e850be37856040518263ffffffff1660e01b8152600401612ff991906142e0565b5f604051808303815f87803b158015613010575f80fd5b505af1158015613022573d5f803e3d5ffd5b5050505060085f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637a6726b58585602001516040015186602001516020015185886040015160400151602001516040518663ffffffff1660e01b81526004016130a49594939291906150d8565b5f604051808303815f87803b1580156130bb575f80fd5b505af11580156130cd573d5f803e3d5ffd5b5050505050505050565b6130df6135fe565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361314d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016131449061560f565b60405180910390fd5b6131568161367c565b50565b61316161384c565b5f60075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a6370b0e878787876040518563ffffffff1660e01b81526004016131c29493929190615734565b5f604051808303815f875af11580156131dd573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f8201168201806040525081019061320591906146a3565b90505f81602001516040015173ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff161490505f82602001516020015173ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614905081806132845750805b6132c3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016132ba906157d1565b60405180910390fd5b81156134095760075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ec95b967896040518263ffffffff1660e01b815260040161332391906142e0565b6101c0604051808303815f875af1158015613340573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906133649190614f7c565b5060085f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16639e3868dc89856020015160400151866040015160200151602001516040518463ffffffff1660e01b81526004016133d793929190615268565b5f604051808303815f87803b1580156133ee575f80fd5b505af1158015613400573d5f803e3d5ffd5b50505050613556565b80156135555760075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633c4135da896040518263ffffffff1660e01b815260040161346991906142e0565b6101c0604051808303815f875af1158015613486573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906134aa9190614f7c565b5060085f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b918803589856020015160200151866060015160200151876040015160400151602001516040518563ffffffff1660e01b81526004016135279493929190614a38565b5f604051808303815f87803b15801561353e575f80fd5b505af1158015613550573d5f803e3d5ffd5b505050505b5b60075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663cdd82d1d896040518263ffffffff1660e01b81526004016135b091906142e0565b6101c0604051808303815f875af11580156135cd573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906135f19190614f7c565b9350505050949350505050565b61360661373d565b73ffffffffffffffffffffffffffffffffffffffff16613624612473565b73ffffffffffffffffffffffffffffffffffffffff161461367a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161367190615839565b60405180910390fd5b565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f33905090565b5f60075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b050e74b8360046040518363ffffffff1660e01b81526004016137a29291906141ea565b6020604051808303815f875af11580156137be573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906137e2919061424d565b613821576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613818906158a1565b60405180910390fd5b60019050919050565b5f808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b604051806101c001604052805f600a81111561386b5761386a613fa7565b5b81526020015f81526020015f81526020015f81526020015f81526020015f81526020015f81526020015f81526020015f81526020015f81526020015f81526020015f81526020015f81526020015f81525090565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6138e8826138bf565b9050919050565b6138f8816138de565b82525050565b5f6020820190506139115f8301846138ef565b92915050565b5f604051905090565b5f80fd5b5f80fd5b5f80fd5b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b61397682613930565b810181811067ffffffffffffffff8211171561399557613994613940565b5b80604052505050565b5f6139a7613917565b90506139b3828261396d565b919050565b5f67ffffffffffffffff8211156139d2576139d1613940565b5b6139db82613930565b9050602081019050919050565b828183375f83830152505050565b5f613a08613a03846139b8565b61399e565b905082815260208101848484011115613a2457613a2361392c565b5b613a2f8482856139e8565b509392505050565b5f82601f830112613a4b57613a4a613928565b5b8135613a5b8482602086016139f6565b91505092915050565b5f60208284031215613a7957613a78613920565b5b5f82013567ffffffffffffffff811115613a9657613a95613924565b5b613aa284828501613a37565b91505092915050565b5f819050919050565b613abd81613aab565b8114613ac7575f80fd5b50565b5f81359050613ad881613ab4565b92915050565b5f805f8060808587031215613af657613af5613920565b5b5f85013567ffffffffffffffff811115613b1357613b12613924565b5b613b1f87828801613a37565b945050602085013567ffffffffffffffff811115613b4057613b3f613924565b5b613b4c87828801613a37565b935050604085013567ffffffffffffffff811115613b6d57613b6c613924565b5b613b7987828801613a37565b9250506060613b8a87828801613aca565b91505092959194509250565b613b9f816138de565b8114613ba9575f80fd5b50565b5f81359050613bba81613b96565b92915050565b5f60208284031215613bd557613bd4613920565b5b5f613be284828501613bac565b91505092915050565b5f805f805f8060c08789031215613c0557613c04613920565b5b5f613c1289828a01613bac565b9650506020613c2389828a01613bac565b9550506040613c3489828a01613bac565b9450506060613c4589828a01613bac565b9350506080613c5689828a01613bac565b92505060a0613c6789828a01613bac565b9150509295509295509295565b5f80fd5b5f80fd5b5f67ffffffffffffffff821115613c9657613c95613940565b5b602082029050602081019050919050565b5f80fd5b5f613cbd613cb884613c7c565b61399e565b90508083825260208201905060208402830185811115613ce057613cdf613ca7565b5b835b81811015613d095780613cf58882613bac565b845260208401935050602081019050613ce2565b5050509392505050565b5f82601f830112613d2757613d26613928565b5b8135613d37848260208601613cab565b91505092915050565b5f60808284031215613d5557613d54613c74565b5b613d5f608061399e565b90505f613d6e84828501613bac565b5f830152506020613d8184828501613bac565b6020830152506040613d9584828501613bac565b604083015250606082013567ffffffffffffffff811115613db957613db8613c78565b5b613dc584828501613d13565b60608301525092915050565b5f60408284031215613de657613de5613c74565b5b613df0604061399e565b90505f613dff84828501613aca565b5f830152506020613e1284828501613aca565b60208301525092915050565b5f6101008284031215613e3457613e33613c74565b5b613e3e608061399e565b90505f613e4d84828501613dd1565b5f830152506040613e6084828501613dd1565b6020830152506080613e7484828501613dd1565b60408301525060c0613e8884828501613dd1565b60608301525092915050565b5f60808284031215613ea957613ea8613c74565b5b613eb3608061399e565b90505f613ec284828501613aca565b5f830152506020613ed584828501613aca565b6020830152506040613ee984828501613aca565b6040830152506060613efd84828501613aca565b60608301525092915050565b5f805f806101c08587031215613f2257613f21613920565b5b5f85013567ffffffffffffffff811115613f3f57613f3e613924565b5b613f4b87828801613a37565b945050602085013567ffffffffffffffff811115613f6c57613f6b613924565b5b613f7887828801613d40565b9350506040613f8987828801613e1e565b925050610140613f9b87828801613e94565b91505092959194509250565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b600b8110613fe557613fe4613fa7565b5b50565b5f819050613ff582613fd4565b919050565b5f61400482613fe8565b9050919050565b61401481613ffa565b82525050565b61402381613aab565b82525050565b6101c082015f82015161403e5f85018261400b565b506020820151614051602085018261401a565b506040820151614064604085018261401a565b506060820151614077606085018261401a565b50608082015161408a608085018261401a565b5060a082015161409d60a085018261401a565b5060c08201516140b060c085018261401a565b5060e08201516140c360e085018261401a565b506101008201516140d861010085018261401a565b506101208201516140ed61012085018261401a565b5061014082015161410261014085018261401a565b5061016082015161411761016085018261401a565b5061018082015161412c61018085018261401a565b506101a08201516141416101a085018261401a565b50505050565b5f6101c08201905061415b5f830184614029565b92915050565b5f81519050919050565b5f82825260208201905092915050565b5f5b8381101561419857808201518184015260208101905061417d565b5f8484015250505050565b5f6141ad82614161565b6141b7818561416b565b93506141c781856020860161417b565b6141d081613930565b840191505092915050565b6141e481613ffa565b82525050565b5f6040820190508181035f83015261420281856141a3565b905061421160208301846141db565b9392505050565b5f8115159050919050565b61422c81614218565b8114614236575f80fd5b50565b5f8151905061424781614223565b92915050565b5f6020828403121561426257614261613920565b5b5f61426f84828501614239565b91505092915050565b7f526573756c74735375626d6974746564000000000000000000000000000000005f82015250565b5f6142ac60108361416b565b91506142b782614278565b602082019050919050565b5f6020820190508181035f8301526142d9816142a0565b9050919050565b5f6020820190508181035f8301526142f881846141a3565b905092915050565b5f61431261430d846139b8565b61399e565b90508281526020810184848401111561432e5761432d61392c565b5b61433984828561417b565b509392505050565b5f82601f83011261435557614354613928565b5b8151614365848260208601614300565b91505092915050565b5f8151905061437c81613b96565b92915050565b5f61439461438f84613c7c565b61399e565b905080838252602082019050602084028301858111156143b7576143b6613ca7565b5b835b818110156143e057806143cc888261436e565b8452602084019350506020810190506143b9565b5050509392505050565b5f82601f8301126143fe576143fd613928565b5b815161440e848260208601614382565b91505092915050565b5f6080828403121561442c5761442b613c74565b5b614436608061399e565b90505f6144458482850161436e565b5f8301525060206144588482850161436e565b602083015250604061446c8482850161436e565b604083015250606082015167ffffffffffffffff8111156144905761448f613c78565b5b61449c848285016143ea565b60608301525092915050565b5f815190506144b681613ab4565b92915050565b5f604082840312156144d1576144d0613c74565b5b6144db604061399e565b90505f6144ea848285016144a8565b5f8301525060206144fd848285016144a8565b60208301525092915050565b5f610100828403121561451f5761451e613c74565b5b614529608061399e565b90505f614538848285016144bc565b5f83015250604061454b848285016144bc565b602083015250608061455f848285016144bc565b60408301525060c0614573848285016144bc565b60608301525092915050565b5f6080828403121561459457614593613c74565b5b61459e608061399e565b90505f6145ad848285016144a8565b5f8301525060206145c0848285016144a8565b60208301525060406145d4848285016144a8565b60408301525060606145e8848285016144a8565b60608301525092915050565b5f6101c0828403121561460a57614609613c74565b5b614614608061399e565b90505f82015167ffffffffffffffff81111561463357614632613c78565b5b61463f84828501614341565b5f83015250602082015167ffffffffffffffff81111561466257614661613c78565b5b61466e84828501614417565b602083015250604061468284828501614509565b6040830152506101406146978482850161457f565b60608301525092915050565b5f602082840312156146b8576146b7613920565b5b5f82015167ffffffffffffffff8111156146d5576146d4613924565b5b6146e1848285016145f4565b91505092915050565b7f4f6e6c79204a43000000000000000000000000000000000000000000000000005f82015250565b5f61471e60078361416b565b9150614729826146ea565b602082019050919050565b5f6020820190508181035f83015261474b81614712565b9050919050565b5f6020828403121561476757614766613920565b5b5f614774848285016144a8565b91505092915050565b61478681613aab565b82525050565b5f60e0820190508181035f8301526147a4818a6141a3565b90506147b360208301896138ef565b6147c060408301886138ef565b6147cd606083018761477d565b6147da608083018661477d565b6147e760a083018561477d565b6147f460c083018461477d565b98975050505050505050565b7f4465616c416772656564000000000000000000000000000000000000000000005f82015250565b5f614834600a8361416b565b915061483f82614800565b602082019050919050565b5f6020820190508181035f83015261486181614828565b9050919050565b7f4f6e6c79205250000000000000000000000000000000000000000000000000005f82015250565b5f61489c60078361416b565b91506148a782614868565b602082019050919050565b5f6020820190508181035f8301526148c981614890565b9050919050565b5f6080820190508181035f8301526148e881876141a3565b905081810360208301526148fc81866141a3565b9050818103604083015261491081856141a3565b905061491f606083018461477d565b95945050505050565b5f6080828403121561493d5761493c613c74565b5b614947608061399e565b90505f82015167ffffffffffffffff81111561496657614965613c78565b5b61497284828501614341565b5f83015250602082015167ffffffffffffffff81111561499557614994613c78565b5b6149a184828501614341565b602083015250604082015167ffffffffffffffff8111156149c5576149c4613c78565b5b6149d184828501614341565b60408301525060606149e5848285016144a8565b60608301525092915050565b5f60208284031215614a0657614a05613920565b5b5f82015167ffffffffffffffff811115614a2357614a22613924565b5b614a2f84828501614928565b91505092915050565b5f6080820190508181035f830152614a5081876141a3565b9050614a5f60208301866138ef565b614a6c604083018561477d565b614a79606083018461477d565b95945050505050565b7f4d6564696174696f6e20616464726573730000000000000000000000000000005f82015250565b5f614ab660118361416b565b9150614ac182614a82565b602082019050919050565b5f6020820190508181035f830152614ae381614aaa565b9050919050565b5f82825260208201905092915050565b5f614b0482614161565b614b0e8185614aea565b9350614b1e81856020860161417b565b614b2781613930565b840191505092915050565b614b3b816138de565b82525050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b5f614b758383614b32565b60208301905092915050565b5f602082019050919050565b5f614b9782614b41565b614ba18185614b4b565b9350614bac83614b5b565b805f5b83811015614bdc578151614bc38882614b6a565b9750614bce83614b81565b925050600181019050614baf565b5085935050505092915050565b5f608083015f830151614bfe5f860182614b32565b506020830151614c116020860182614b32565b506040830151614c246040860182614b32565b5060608301518482036060860152614c3c8282614b8d565b9150508091505092915050565b604082015f820151614c5d5f85018261401a565b506020820151614c70602085018261401a565b50505050565b61010082015f820151614c8b5f850182614c49565b506020820151614c9e6040850182614c49565b506040820151614cb16080850182614c49565b506060820151614cc460c0850182614c49565b50505050565b608082015f820151614cde5f85018261401a565b506020820151614cf1602085018261401a565b506040820151614d04604085018261401a565b506060820151614d17606085018261401a565b50505050565b5f6101c083015f8301518482035f860152614d388282614afa565b91505060208301518482036020860152614d528282614be9565b9150506040830151614d676040860182614c76565b506060830151614d7b610140860182614cca565b508091505092915050565b5f6020820190508181035f830152614d9e8184614d1d565b905092915050565b7f55736572732061646472657373000000000000000000000000000000000000005f82015250565b5f614dda600d8361416b565b9150614de582614da6565b602082019050919050565b5f6020820190508181035f830152614e0781614dce565b9050919050565b600b8110614e1a575f80fd5b50565b5f81519050614e2b81614e0e565b92915050565b5f6101c08284031215614e4757614e46613c74565b5b614e526101c061399e565b90505f614e6184828501614e1d565b5f830152506020614e74848285016144a8565b6020830152506040614e88848285016144a8565b6040830152506060614e9c848285016144a8565b6060830152506080614eb0848285016144a8565b60808301525060a0614ec4848285016144a8565b60a08301525060c0614ed8848285016144a8565b60c08301525060e0614eec848285016144a8565b60e083015250610100614f01848285016144a8565b61010083015250610120614f17848285016144a8565b61012083015250610140614f2d848285016144a8565b61014083015250610160614f43848285016144a8565b61016083015250610180614f59848285016144a8565b610180830152506101a0614f6f848285016144a8565b6101a08301525092915050565b5f6101c08284031215614f9257614f91613920565b5b5f614f9f84828501614e31565b91505092915050565b7f4e6f7420636f72726563742073746174650000000000000000000000000000005f82015250565b5f614fdc60118361416b565b9150614fe782614fa8565b602082019050919050565b5f6020820190508181035f83015261500981614fd0565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f61504782613aab565b915061505283613aab565b925082820190508082111561506a57615069615010565b5b92915050565b7f4e6f742074696d6564206f7574000000000000000000000000000000000000005f82015250565b5f6150a4600d8361416b565b91506150af82615070565b602082019050919050565b5f6020820190508181035f8301526150d181615098565b9050919050565b5f60a0820190508181035f8301526150f081886141a3565b90506150ff60208301876138ef565b61510c60408301866138ef565b615119606083018561477d565b615126608083018461477d565b9695505050505050565b7f53746f72616765206164647265737300000000000000000000000000000000005f82015250565b5f615164600f8361416b565b915061516f82615130565b602082019050919050565b5f6020820190508181035f83015261519181615158565b9050919050565b7f5061796d656e74732061646472657373000000000000000000000000000000005f82015250565b5f6151cc60108361416b565b91506151d782615198565b602082019050919050565b5f6020820190508181035f8301526151f9816151c0565b9050919050565b7f4f6e6c79204a43206f72205250000000000000000000000000000000000000005f82015250565b5f615234600d8361416b565b915061523f82615200565b602082019050919050565b5f6020820190508181035f83015261526181615228565b9050919050565b5f6060820190508181035f83015261528081866141a3565b905061528f60208301856138ef565b61529c604083018461477d565b949350505050565b7f4f6e6c79206d6564696174696f6e0000000000000000000000000000000000005f82015250565b5f6152d8600e8361416b565b91506152e3826152a4565b602082019050919050565b5f6020820190508181035f830152615305816152cc565b9050919050565b7f43616e6e6f74206d6564696174650000000000000000000000000000000000005f82015250565b5f615340600e8361416b565b915061534b8261530c565b602082019050919050565b5f6020820190508181035f83015261536d81615334565b9050919050565b5f60c0820190508181035f83015261538c81896141a3565b905061539b60208301886138ef565b6153a860408301876138ef565b6153b5606083018661477d565b6153c2608083018561477d565b6153cf60a083018461477d565b979650505050505050565b7f4a6f6243726561746f72206164647265737300000000000000000000000000005f82015250565b5f61540e60128361416b565b9150615419826153da565b602082019050919050565b5f6020820190508181035f83015261543b81615402565b9050919050565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c7265615f8201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b5f61549c602e8361416b565b91506154a782615442565b604082019050919050565b5f6020820190508181035f8301526154c981615490565b9050919050565b5f819050919050565b5f60ff82169050919050565b5f819050919050565b5f6155086155036154fe846154d0565b6154e5565b6154d9565b9050919050565b615518816154ee565b82525050565b5f6020820190506155315f83018461550f565b92915050565b7f4f6e6c79205250206f72204a43000000000000000000000000000000000000005f82015250565b5f61556b600d8361416b565b915061557682615537565b602082019050919050565b5f6020820190508181035f8301526155988161555f565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f20615f8201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b5f6155f960268361416b565b91506156048261559f565b604082019050919050565b5f6020820190508181035f830152615626816155ed565b9050919050565b5f608083015f8301516156425f860182614b32565b5060208301516156556020860182614b32565b5060408301516156686040860182614b32565b50606083015184820360608601526156808282614b8d565b9150508091505092915050565b61010082015f8201516156a25f850182614c49565b5060208201516156b56040850182614c49565b5060408201516156c86080850182614c49565b5060608201516156db60c0850182614c49565b50505050565b608082015f8201516156f55f85018261401a565b506020820151615708602085018261401a565b50604082015161571b604085018261401a565b50606082015161572e606085018261401a565b50505050565b5f6101c0820190508181035f83015261574d81876141a3565b90508181036020830152615761818661562d565b9050615770604083018561568d565b61577e6101408301846156e1565b95945050505050565b7f4f6e6c79205250202f204a4300000000000000000000000000000000000000005f82015250565b5f6157bb600c8361416b565b91506157c682615787565b602082019050919050565b5f6020820190508181035f8301526157e8816157af565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725f82015250565b5f61582360208361416b565b915061582e826157ef565b602082019050919050565b5f6020820190508181035f83015261585081615817565b9050919050565b7f526573756c7473436865636b65640000000000000000000000000000000000005f82015250565b5f61588b600e8361416b565b915061589682615857565b602082019050919050565b5f6020820190508181035f8301526158b88161587f565b905091905056fea264697066735822122033e3812b7fb876adb3486c096fd2e7a47d29fedf12bcc5a37c82b1d46f3ebd8164736f6c63430008150033", + "deployedBytecode": "0x608060405234801561000f575f80fd5b506004361061018c575f3560e01c806380ffdfe0116100dc578063cc2a9a5b11610095578063e7b957d11161006f578063e7b957d1146103f4578063e850be3714610410578063f2fde38b1461042c578063f583b125146104485761018c565b8063cc2a9a5b1461039c578063d48b1084146103b8578063d882a252146103d65761018c565b806380ffdfe0146102f0578063824518aa1461030c5780638da5cb5b1461032857806393dbed3e14610346578063b4031e5414610364578063bbfff47d146103805761018c565b806346834d1e1161014957806359b910d61161012357806359b910d614610292578063640e570f146102ae578063715018a6146102ca578063795f9abf146102d45761018c565b806346834d1e1461023e5780634ef168a61461025a578063511a9f68146102765761018c565b80630aca35ce14610190578063155329ea146101ae578063297f9e55146101cc578063393a4d34146101e85780633955548e1461020657806343391cca14610222575b5f80fd5b610198610478565b6040516101a591906138fe565b60405180910390f35b6101b66104a0565b6040516101c391906138fe565b60405180910390f35b6101e660048036038101906101e19190613a64565b6104c8565b005b6101f0610938565b6040516101fd91906138fe565b60405180910390f35b610220600480360381019061021b9190613ade565b610960565b005b61023c60048036038101906102379190613bc0565b610d3c565b005b61025860048036038101906102539190613a64565b610e35565b005b610274600480360381019061026f9190613bc0565b6111e2565b005b610290600480360381019061028b9190613a64565b61129b565b005b6102ac60048036038101906102a79190613bc0565b611654565b005b6102c860048036038101906102c39190613bc0565b61176e565b005b6102d2611867565b005b6102ee60048036038101906102e99190613a64565b61187a565b005b61030a60048036038101906103059190613a64565b611d23565b005b61032660048036038101906103219190613a64565b61207b565b005b610330612473565b60405161033d91906138fe565b60405180910390f35b61034e61249a565b60405161035b91906138fe565b60405180910390f35b61037e60048036038101906103799190613bc0565b6124c2565b005b61039a60048036038101906103959190613bc0565b61257b565b005b6103b660048036038101906103b19190613beb565b612634565b005b6103c06127a5565b6040516103cd91906138fe565b60405180910390f35b6103de6127cd565b6040516103eb91906138fe565b60405180910390f35b61040e60048036038101906104099190613a64565b6127f5565b005b61042a60048036038101906104259190613a64565b612c88565b005b61044660048036038101906104419190613bc0565b6130d7565b005b610462600480360381019061045d9190613f09565b613159565b60405161046f9190614147565b60405180910390f35b5f60055f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b5f60045f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b050e74b8260026040518363ffffffff1660e01b81526004016105259291906141ea565b6020604051808303815f875af1158015610541573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610565919061424d565b6105a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161059b906142c2565b60405180910390fd5b5f60075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e7079180836040518263ffffffff1660e01b81526004016105ff91906142e0565b5f604051808303815f875af115801561061a573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f8201168201806040525081019061064291906146a3565b90503273ffffffffffffffffffffffffffffffffffffffff1681602001516020015173ffffffffffffffffffffffffffffffffffffffff16146106ba576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106b190614734565b60405180910390fd5b5f60075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166373db5c6a846040518263ffffffff1660e01b815260040161071591906142e0565b6020604051808303815f875af1158015610731573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107559190614752565b90505f60075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638224ce5f856040518263ffffffff1660e01b81526004016107b291906142e0565b6020604051808303815f875af11580156107ce573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107f29190614752565b905060075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663297f9e55856040518263ffffffff1660e01b815260040161084e91906142e0565b5f604051808303815f87803b158015610865575f80fd5b505af1158015610877573d5f803e3d5ffd5b5050505060085f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b13567148585602001516040015186602001516020015186886060015160200151878a6040015160400151602001516040518863ffffffff1660e01b8152600401610905979695949392919061478c565b5f604051808303815f87803b15801561091c575f80fd5b505af115801561092e573d5f803e3d5ffd5b5050505050505050565b5f60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b050e74b8560016040518363ffffffff1660e01b81526004016109bd9291906141ea565b6020604051808303815f875af11580156109d9573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109fd919061424d565b610a3c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a339061484a565b60405180910390fd5b5f60075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e7079180866040518263ffffffff1660e01b8152600401610a9791906142e0565b5f604051808303815f875af1158015610ab2573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f82011682018060405250810190610ada91906146a3565b90503273ffffffffffffffffffffffffffffffffffffffff1681602001516040015173ffffffffffffffffffffffffffffffffffffffff1614610b52576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b49906148b2565b60405180910390fd5b60075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633955548e868686866040518563ffffffff1660e01b8152600401610bb294939291906148d0565b5f604051808303815f875af1158015610bcd573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f82011682018060405250810190610bf591906149f1565b505f60075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638224ce5f876040518263ffffffff1660e01b8152600401610c5191906142e0565b6020604051808303815f875af1158015610c6d573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610c919190614752565b905060085f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166309cab5108784602001516040015184866040015160200151602001516040518563ffffffff1660e01b8152600401610d079493929190614a38565b5f604051808303815f87803b158015610d1e575f80fd5b505af1158015610d30573d5f803e3d5ffd5b50505050505050505050565b610d446135fe565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610db2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610da990614acc565b60405180910390fd5b8060045f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508060095f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b050e74b8260026040518363ffffffff1660e01b8152600401610e929291906141ea565b6020604051808303815f875af1158015610eae573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610ed2919061424d565b610f11576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f08906142c2565b60405180910390fd5b5f60075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e7079180836040518263ffffffff1660e01b8152600401610f6c91906142e0565b5f604051808303815f875af1158015610f87573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f82011682018060405250810190610faf91906146a3565b90503273ffffffffffffffffffffffffffffffffffffffff1681602001516020015173ffffffffffffffffffffffffffffffffffffffff1614611027576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161101e90614734565b60405180910390fd5b60075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166346834d1e836040518263ffffffff1660e01b815260040161108191906142e0565b5f604051808303815f87803b158015611098575f80fd5b505af11580156110aa573d5f803e3d5ffd5b5050505060085f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663aea3825183836020015160200151846040015160400151602001518560600151606001516040518563ffffffff1660e01b815260040161112a9493929190614a38565b5f604051808303815f87803b158015611141575f80fd5b505af1158015611153573d5f803e3d5ffd5b5050505060095f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370bea207826040518263ffffffff1660e01b81526004016111b19190614d86565b5f604051808303815f87803b1580156111c8575f80fd5b505af11580156111da573d5f803e3d5ffd5b505050505050565b6111ea6135fe565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611258576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161124f90614df0565b60405180910390fd5b8060065f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b5f60075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e7079180836040518263ffffffff1660e01b81526004016112f691906142e0565b5f604051808303815f875af1158015611311573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f8201168201806040525081019061133991906146a3565b90505f60075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663cdd82d1d846040518263ffffffff1660e01b815260040161139691906142e0565b6101c0604051808303815f875af11580156113b3573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906113d79190614f7c565b90503273ffffffffffffffffffffffffffffffffffffffff1682602001516020015173ffffffffffffffffffffffffffffffffffffffff161461144f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161144690614734565b60405180910390fd5b6001600a81111561146357611462613fa7565b5b815f0151600a81111561147957611478613fa7565b5b146114b9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114b090614ff2565b60405180910390fd5b8160400151602001515f015181608001516114d4919061503d565b4211611515576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161150c906150ba565b60405180910390fd5b60075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663511a9f68846040518263ffffffff1660e01b815260040161156f91906142e0565b5f604051808303815f87803b158015611586575f80fd5b505af1158015611598573d5f803e3d5ffd5b5050505060085f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633d31a11584846020015160400151856020015160200151866060015160200151876040015160200151602001516040518663ffffffff1660e01b81526004016116229594939291906150d8565b5f604051808303815f87803b158015611639575f80fd5b505af115801561164b573d5f803e3d5ffd5b50505050505050565b61165c6135fe565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036116ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116c19061517a565b60405180910390fd5b8060015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660075f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6117766135fe565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036117e4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117db906151e2565b60405180910390fd5b8060035f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508060085f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b61186f6135fe565b6118785f61367c565b565b5f60075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e7079180836040518263ffffffff1660e01b81526004016118d591906142e0565b5f604051808303815f875af11580156118f0573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f8201168201806040525081019061191891906146a3565b90505f60075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663cdd82d1d846040518263ffffffff1660e01b815260040161197591906142e0565b6101c0604051808303815f875af1158015611992573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906119b69190614f7c565b90503273ffffffffffffffffffffffffffffffffffffffff1682602001516020015173ffffffffffffffffffffffffffffffffffffffff161480611a2d57503273ffffffffffffffffffffffffffffffffffffffff1682602001516040015173ffffffffffffffffffffffffffffffffffffffff16145b611a6c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a639061524a565b60405180910390fd5b5f600a811115611a7f57611a7e613fa7565b5b815f0151600a811115611a9557611a94613fa7565b5b14611ad5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611acc90614ff2565b60405180910390fd5b81604001515f01515f01518160600151611aef919061503d565b4211611b30576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b27906150ba565b60405180910390fd5b60075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663795f9abf846040518263ffffffff1660e01b8152600401611b8a91906142e0565b5f604051808303815f87803b158015611ba1575f80fd5b505af1158015611bb3573d5f803e3d5ffd5b505050505f81602001511115611c675760085f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630ef0d89e84846020015160400151856040015160200151602001516040518463ffffffff1660e01b8152600401611c3593929190615268565b5f604051808303815f87803b158015611c4c575f80fd5b505af1158015611c5e573d5f803e3d5ffd5b50505050611d1e565b5f81604001511115611d1d5760085f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663afe1dff784846020015160200151856060015160200151866040015160200151602001516040518563ffffffff1660e01b8152600401611cef9493929190614a38565b5f604051808303815f87803b158015611d06575f80fd5b505af1158015611d18573d5f803e3d5ffd5b505050505b5b505050565b611d2b61373d565b73ffffffffffffffffffffffffffffffffffffffff1660045f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611db9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611db0906152ee565b60405180910390fd5b611dc281613744565b611e01576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611df890615356565b60405180910390fd5b5f60075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e7079180836040518263ffffffff1660e01b8152600401611e5c91906142e0565b5f604051808303815f875af1158015611e77573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f82011682018060405250810190611e9f91906146a3565b90505f60075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638224ce5f846040518263ffffffff1660e01b8152600401611efc91906142e0565b6020604051808303815f875af1158015611f18573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611f3c9190614752565b905060075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166380ffdfe0846040518263ffffffff1660e01b8152600401611f9891906142e0565b5f604051808303815f87803b158015611faf575f80fd5b505af1158015611fc1573d5f803e3d5ffd5b5050505060085f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d2485cce84846020015160400151856020015160200151866060015160200151868860600151606001516040518763ffffffff1660e01b815260040161204996959493929190615374565b5f604051808303815f87803b158015612060575f80fd5b505af1158015612072573d5f803e3d5ffd5b50505050505050565b61208361373d565b73ffffffffffffffffffffffffffffffffffffffff1660045f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612111576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612108906152ee565b60405180910390fd5b61211a81613744565b612159576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161215090615356565b60405180910390fd5b5f60075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e7079180836040518263ffffffff1660e01b81526004016121b491906142e0565b5f604051808303815f875af11580156121cf573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f820116820180604052508101906121f791906146a3565b90505f60075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166373db5c6a846040518263ffffffff1660e01b815260040161225491906142e0565b6020604051808303815f875af1158015612270573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906122949190614752565b90505f60075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638224ce5f856040518263ffffffff1660e01b81526004016122f191906142e0565b6020604051808303815f875af115801561230d573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906123319190614752565b905060075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663824518aa856040518263ffffffff1660e01b815260040161238d91906142e0565b5f604051808303815f87803b1580156123a4575f80fd5b505af11580156123b6573d5f803e3d5ffd5b5050505060085f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632a1f90728585602001516040015186602001516020015186886060015160200151878a60600151606001516040518863ffffffff1660e01b8152600401612440979695949392919061478c565b5f604051808303815f87803b158015612457575f80fd5b505af1158015612469573d5f803e3d5ffd5b5050505050505050565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b5f60025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6124ca6135fe565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603612538576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161252f90615424565b60405180910390fd5b8060055f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6125836135fe565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036125f1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125e890614df0565b60405180910390fd5b8060025f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b5f8060159054906101000a900460ff16159050808015612665575060015f60149054906101000a900460ff1660ff16105b8061269357506126743061382a565b158015612692575060015f60149054906101000a900460ff1660ff16145b5b6126d2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016126c9906154b2565b60405180910390fd5b60015f60146101000a81548160ff021916908360ff160217905550801561270e5760015f60156101000a81548160ff0219169083151502179055505b61271787611654565b6127208661257b565b6127298561176e565b61273284610d3c565b61273b836124c2565b612744826111e2565b801561279c575f8060156101000a81548160ff0219169083151502179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024986001604051612793919061551e565b60405180910390a15b50505050505050565b5f60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b5f60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b5f60075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e7079180836040518263ffffffff1660e01b815260040161285091906142e0565b5f604051808303815f875af115801561286b573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f8201168201806040525081019061289391906146a3565b90505f60075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663cdd82d1d846040518263ffffffff1660e01b81526004016128f091906142e0565b6101c0604051808303815f875af115801561290d573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906129319190614f7c565b90503273ffffffffffffffffffffffffffffffffffffffff1682602001516040015173ffffffffffffffffffffffffffffffffffffffff1614806129a857503273ffffffffffffffffffffffffffffffffffffffff1682602001516020015173ffffffffffffffffffffffffffffffffffffffff16145b6129e7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016129de90615581565b60405180910390fd5b6004600a8111156129fb576129fa613fa7565b5b815f0151600a811115612a1157612a10613fa7565b5b14612a51576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a4890614ff2565b60405180910390fd5b8160400151604001515f01518160a00151612a6c919061503d565b4211612aad576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612aa4906150ba565b60405180910390fd5b5f60075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638224ce5f856040518263ffffffff1660e01b8152600401612b0891906142e0565b6020604051808303815f875af1158015612b24573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612b489190614752565b905060075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e7b957d1856040518263ffffffff1660e01b8152600401612ba491906142e0565b5f604051808303815f87803b158015612bbb575f80fd5b505af1158015612bcd573d5f803e3d5ffd5b5050505060085f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663823f3de185856020015160400151866020015160200151876060015160200151868960600151606001516040518763ffffffff1660e01b8152600401612c5596959493929190615374565b5f604051808303815f87803b158015612c6c575f80fd5b505af1158015612c7e573d5f803e3d5ffd5b5050505050505050565b5f60075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e7079180836040518263ffffffff1660e01b8152600401612ce391906142e0565b5f604051808303815f875af1158015612cfe573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f82011682018060405250810190612d2691906146a3565b90505f60075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663cdd82d1d846040518263ffffffff1660e01b8152600401612d8391906142e0565b6101c0604051808303815f875af1158015612da0573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612dc49190614f7c565b90503273ffffffffffffffffffffffffffffffffffffffff1682602001516040015173ffffffffffffffffffffffffffffffffffffffff1614612e3c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612e33906148b2565b60405180910390fd5b6002600a811115612e5057612e4f613fa7565b5b815f0151600a811115612e6657612e65613fa7565b5b14612ea6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612e9d90614ff2565b60405180910390fd5b8160400151604001515f01518160a00151612ec1919061503d565b4211612f02576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612ef9906150ba565b60405180910390fd5b5f60075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638224ce5f856040518263ffffffff1660e01b8152600401612f5d91906142e0565b6020604051808303815f875af1158015612f79573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612f9d9190614752565b905060075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e850be37856040518263ffffffff1660e01b8152600401612ff991906142e0565b5f604051808303815f87803b158015613010575f80fd5b505af1158015613022573d5f803e3d5ffd5b5050505060085f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637a6726b58585602001516040015186602001516020015185886040015160400151602001516040518663ffffffff1660e01b81526004016130a49594939291906150d8565b5f604051808303815f87803b1580156130bb575f80fd5b505af11580156130cd573d5f803e3d5ffd5b5050505050505050565b6130df6135fe565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361314d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016131449061560f565b60405180910390fd5b6131568161367c565b50565b61316161384c565b5f60075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a6370b0e878787876040518563ffffffff1660e01b81526004016131c29493929190615734565b5f604051808303815f875af11580156131dd573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f8201168201806040525081019061320591906146a3565b90505f81602001516040015173ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff161490505f82602001516020015173ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614905081806132845750805b6132c3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016132ba906157d1565b60405180910390fd5b81156134095760075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ec95b967896040518263ffffffff1660e01b815260040161332391906142e0565b6101c0604051808303815f875af1158015613340573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906133649190614f7c565b5060085f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16639e3868dc89856020015160400151866040015160200151602001516040518463ffffffff1660e01b81526004016133d793929190615268565b5f604051808303815f87803b1580156133ee575f80fd5b505af1158015613400573d5f803e3d5ffd5b50505050613556565b80156135555760075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633c4135da896040518263ffffffff1660e01b815260040161346991906142e0565b6101c0604051808303815f875af1158015613486573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906134aa9190614f7c565b5060085f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b918803589856020015160200151866060015160200151876040015160400151602001516040518563ffffffff1660e01b81526004016135279493929190614a38565b5f604051808303815f87803b15801561353e575f80fd5b505af1158015613550573d5f803e3d5ffd5b505050505b5b60075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663cdd82d1d896040518263ffffffff1660e01b81526004016135b091906142e0565b6101c0604051808303815f875af11580156135cd573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906135f19190614f7c565b9350505050949350505050565b61360661373d565b73ffffffffffffffffffffffffffffffffffffffff16613624612473565b73ffffffffffffffffffffffffffffffffffffffff161461367a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161367190615839565b60405180910390fd5b565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f33905090565b5f60075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b050e74b8360046040518363ffffffff1660e01b81526004016137a29291906141ea565b6020604051808303815f875af11580156137be573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906137e2919061424d565b613821576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613818906158a1565b60405180910390fd5b60019050919050565b5f808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b604051806101c001604052805f600a81111561386b5761386a613fa7565b5b81526020015f81526020015f81526020015f81526020015f81526020015f81526020015f81526020015f81526020015f81526020015f81526020015f81526020015f81526020015f81526020015f81525090565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6138e8826138bf565b9050919050565b6138f8816138de565b82525050565b5f6020820190506139115f8301846138ef565b92915050565b5f604051905090565b5f80fd5b5f80fd5b5f80fd5b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b61397682613930565b810181811067ffffffffffffffff8211171561399557613994613940565b5b80604052505050565b5f6139a7613917565b90506139b3828261396d565b919050565b5f67ffffffffffffffff8211156139d2576139d1613940565b5b6139db82613930565b9050602081019050919050565b828183375f83830152505050565b5f613a08613a03846139b8565b61399e565b905082815260208101848484011115613a2457613a2361392c565b5b613a2f8482856139e8565b509392505050565b5f82601f830112613a4b57613a4a613928565b5b8135613a5b8482602086016139f6565b91505092915050565b5f60208284031215613a7957613a78613920565b5b5f82013567ffffffffffffffff811115613a9657613a95613924565b5b613aa284828501613a37565b91505092915050565b5f819050919050565b613abd81613aab565b8114613ac7575f80fd5b50565b5f81359050613ad881613ab4565b92915050565b5f805f8060808587031215613af657613af5613920565b5b5f85013567ffffffffffffffff811115613b1357613b12613924565b5b613b1f87828801613a37565b945050602085013567ffffffffffffffff811115613b4057613b3f613924565b5b613b4c87828801613a37565b935050604085013567ffffffffffffffff811115613b6d57613b6c613924565b5b613b7987828801613a37565b9250506060613b8a87828801613aca565b91505092959194509250565b613b9f816138de565b8114613ba9575f80fd5b50565b5f81359050613bba81613b96565b92915050565b5f60208284031215613bd557613bd4613920565b5b5f613be284828501613bac565b91505092915050565b5f805f805f8060c08789031215613c0557613c04613920565b5b5f613c1289828a01613bac565b9650506020613c2389828a01613bac565b9550506040613c3489828a01613bac565b9450506060613c4589828a01613bac565b9350506080613c5689828a01613bac565b92505060a0613c6789828a01613bac565b9150509295509295509295565b5f80fd5b5f80fd5b5f67ffffffffffffffff821115613c9657613c95613940565b5b602082029050602081019050919050565b5f80fd5b5f613cbd613cb884613c7c565b61399e565b90508083825260208201905060208402830185811115613ce057613cdf613ca7565b5b835b81811015613d095780613cf58882613bac565b845260208401935050602081019050613ce2565b5050509392505050565b5f82601f830112613d2757613d26613928565b5b8135613d37848260208601613cab565b91505092915050565b5f60808284031215613d5557613d54613c74565b5b613d5f608061399e565b90505f613d6e84828501613bac565b5f830152506020613d8184828501613bac565b6020830152506040613d9584828501613bac565b604083015250606082013567ffffffffffffffff811115613db957613db8613c78565b5b613dc584828501613d13565b60608301525092915050565b5f60408284031215613de657613de5613c74565b5b613df0604061399e565b90505f613dff84828501613aca565b5f830152506020613e1284828501613aca565b60208301525092915050565b5f6101008284031215613e3457613e33613c74565b5b613e3e608061399e565b90505f613e4d84828501613dd1565b5f830152506040613e6084828501613dd1565b6020830152506080613e7484828501613dd1565b60408301525060c0613e8884828501613dd1565b60608301525092915050565b5f60808284031215613ea957613ea8613c74565b5b613eb3608061399e565b90505f613ec284828501613aca565b5f830152506020613ed584828501613aca565b6020830152506040613ee984828501613aca565b6040830152506060613efd84828501613aca565b60608301525092915050565b5f805f806101c08587031215613f2257613f21613920565b5b5f85013567ffffffffffffffff811115613f3f57613f3e613924565b5b613f4b87828801613a37565b945050602085013567ffffffffffffffff811115613f6c57613f6b613924565b5b613f7887828801613d40565b9350506040613f8987828801613e1e565b925050610140613f9b87828801613e94565b91505092959194509250565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b600b8110613fe557613fe4613fa7565b5b50565b5f819050613ff582613fd4565b919050565b5f61400482613fe8565b9050919050565b61401481613ffa565b82525050565b61402381613aab565b82525050565b6101c082015f82015161403e5f85018261400b565b506020820151614051602085018261401a565b506040820151614064604085018261401a565b506060820151614077606085018261401a565b50608082015161408a608085018261401a565b5060a082015161409d60a085018261401a565b5060c08201516140b060c085018261401a565b5060e08201516140c360e085018261401a565b506101008201516140d861010085018261401a565b506101208201516140ed61012085018261401a565b5061014082015161410261014085018261401a565b5061016082015161411761016085018261401a565b5061018082015161412c61018085018261401a565b506101a08201516141416101a085018261401a565b50505050565b5f6101c08201905061415b5f830184614029565b92915050565b5f81519050919050565b5f82825260208201905092915050565b5f5b8381101561419857808201518184015260208101905061417d565b5f8484015250505050565b5f6141ad82614161565b6141b7818561416b565b93506141c781856020860161417b565b6141d081613930565b840191505092915050565b6141e481613ffa565b82525050565b5f6040820190508181035f83015261420281856141a3565b905061421160208301846141db565b9392505050565b5f8115159050919050565b61422c81614218565b8114614236575f80fd5b50565b5f8151905061424781614223565b92915050565b5f6020828403121561426257614261613920565b5b5f61426f84828501614239565b91505092915050565b7f526573756c74735375626d6974746564000000000000000000000000000000005f82015250565b5f6142ac60108361416b565b91506142b782614278565b602082019050919050565b5f6020820190508181035f8301526142d9816142a0565b9050919050565b5f6020820190508181035f8301526142f881846141a3565b905092915050565b5f61431261430d846139b8565b61399e565b90508281526020810184848401111561432e5761432d61392c565b5b61433984828561417b565b509392505050565b5f82601f83011261435557614354613928565b5b8151614365848260208601614300565b91505092915050565b5f8151905061437c81613b96565b92915050565b5f61439461438f84613c7c565b61399e565b905080838252602082019050602084028301858111156143b7576143b6613ca7565b5b835b818110156143e057806143cc888261436e565b8452602084019350506020810190506143b9565b5050509392505050565b5f82601f8301126143fe576143fd613928565b5b815161440e848260208601614382565b91505092915050565b5f6080828403121561442c5761442b613c74565b5b614436608061399e565b90505f6144458482850161436e565b5f8301525060206144588482850161436e565b602083015250604061446c8482850161436e565b604083015250606082015167ffffffffffffffff8111156144905761448f613c78565b5b61449c848285016143ea565b60608301525092915050565b5f815190506144b681613ab4565b92915050565b5f604082840312156144d1576144d0613c74565b5b6144db604061399e565b90505f6144ea848285016144a8565b5f8301525060206144fd848285016144a8565b60208301525092915050565b5f610100828403121561451f5761451e613c74565b5b614529608061399e565b90505f614538848285016144bc565b5f83015250604061454b848285016144bc565b602083015250608061455f848285016144bc565b60408301525060c0614573848285016144bc565b60608301525092915050565b5f6080828403121561459457614593613c74565b5b61459e608061399e565b90505f6145ad848285016144a8565b5f8301525060206145c0848285016144a8565b60208301525060406145d4848285016144a8565b60408301525060606145e8848285016144a8565b60608301525092915050565b5f6101c0828403121561460a57614609613c74565b5b614614608061399e565b90505f82015167ffffffffffffffff81111561463357614632613c78565b5b61463f84828501614341565b5f83015250602082015167ffffffffffffffff81111561466257614661613c78565b5b61466e84828501614417565b602083015250604061468284828501614509565b6040830152506101406146978482850161457f565b60608301525092915050565b5f602082840312156146b8576146b7613920565b5b5f82015167ffffffffffffffff8111156146d5576146d4613924565b5b6146e1848285016145f4565b91505092915050565b7f4f6e6c79204a43000000000000000000000000000000000000000000000000005f82015250565b5f61471e60078361416b565b9150614729826146ea565b602082019050919050565b5f6020820190508181035f83015261474b81614712565b9050919050565b5f6020828403121561476757614766613920565b5b5f614774848285016144a8565b91505092915050565b61478681613aab565b82525050565b5f60e0820190508181035f8301526147a4818a6141a3565b90506147b360208301896138ef565b6147c060408301886138ef565b6147cd606083018761477d565b6147da608083018661477d565b6147e760a083018561477d565b6147f460c083018461477d565b98975050505050505050565b7f4465616c416772656564000000000000000000000000000000000000000000005f82015250565b5f614834600a8361416b565b915061483f82614800565b602082019050919050565b5f6020820190508181035f83015261486181614828565b9050919050565b7f4f6e6c79205250000000000000000000000000000000000000000000000000005f82015250565b5f61489c60078361416b565b91506148a782614868565b602082019050919050565b5f6020820190508181035f8301526148c981614890565b9050919050565b5f6080820190508181035f8301526148e881876141a3565b905081810360208301526148fc81866141a3565b9050818103604083015261491081856141a3565b905061491f606083018461477d565b95945050505050565b5f6080828403121561493d5761493c613c74565b5b614947608061399e565b90505f82015167ffffffffffffffff81111561496657614965613c78565b5b61497284828501614341565b5f83015250602082015167ffffffffffffffff81111561499557614994613c78565b5b6149a184828501614341565b602083015250604082015167ffffffffffffffff8111156149c5576149c4613c78565b5b6149d184828501614341565b60408301525060606149e5848285016144a8565b60608301525092915050565b5f60208284031215614a0657614a05613920565b5b5f82015167ffffffffffffffff811115614a2357614a22613924565b5b614a2f84828501614928565b91505092915050565b5f6080820190508181035f830152614a5081876141a3565b9050614a5f60208301866138ef565b614a6c604083018561477d565b614a79606083018461477d565b95945050505050565b7f4d6564696174696f6e20616464726573730000000000000000000000000000005f82015250565b5f614ab660118361416b565b9150614ac182614a82565b602082019050919050565b5f6020820190508181035f830152614ae381614aaa565b9050919050565b5f82825260208201905092915050565b5f614b0482614161565b614b0e8185614aea565b9350614b1e81856020860161417b565b614b2781613930565b840191505092915050565b614b3b816138de565b82525050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b5f614b758383614b32565b60208301905092915050565b5f602082019050919050565b5f614b9782614b41565b614ba18185614b4b565b9350614bac83614b5b565b805f5b83811015614bdc578151614bc38882614b6a565b9750614bce83614b81565b925050600181019050614baf565b5085935050505092915050565b5f608083015f830151614bfe5f860182614b32565b506020830151614c116020860182614b32565b506040830151614c246040860182614b32565b5060608301518482036060860152614c3c8282614b8d565b9150508091505092915050565b604082015f820151614c5d5f85018261401a565b506020820151614c70602085018261401a565b50505050565b61010082015f820151614c8b5f850182614c49565b506020820151614c9e6040850182614c49565b506040820151614cb16080850182614c49565b506060820151614cc460c0850182614c49565b50505050565b608082015f820151614cde5f85018261401a565b506020820151614cf1602085018261401a565b506040820151614d04604085018261401a565b506060820151614d17606085018261401a565b50505050565b5f6101c083015f8301518482035f860152614d388282614afa565b91505060208301518482036020860152614d528282614be9565b9150506040830151614d676040860182614c76565b506060830151614d7b610140860182614cca565b508091505092915050565b5f6020820190508181035f830152614d9e8184614d1d565b905092915050565b7f55736572732061646472657373000000000000000000000000000000000000005f82015250565b5f614dda600d8361416b565b9150614de582614da6565b602082019050919050565b5f6020820190508181035f830152614e0781614dce565b9050919050565b600b8110614e1a575f80fd5b50565b5f81519050614e2b81614e0e565b92915050565b5f6101c08284031215614e4757614e46613c74565b5b614e526101c061399e565b90505f614e6184828501614e1d565b5f830152506020614e74848285016144a8565b6020830152506040614e88848285016144a8565b6040830152506060614e9c848285016144a8565b6060830152506080614eb0848285016144a8565b60808301525060a0614ec4848285016144a8565b60a08301525060c0614ed8848285016144a8565b60c08301525060e0614eec848285016144a8565b60e083015250610100614f01848285016144a8565b61010083015250610120614f17848285016144a8565b61012083015250610140614f2d848285016144a8565b61014083015250610160614f43848285016144a8565b61016083015250610180614f59848285016144a8565b610180830152506101a0614f6f848285016144a8565b6101a08301525092915050565b5f6101c08284031215614f9257614f91613920565b5b5f614f9f84828501614e31565b91505092915050565b7f4e6f7420636f72726563742073746174650000000000000000000000000000005f82015250565b5f614fdc60118361416b565b9150614fe782614fa8565b602082019050919050565b5f6020820190508181035f83015261500981614fd0565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f61504782613aab565b915061505283613aab565b925082820190508082111561506a57615069615010565b5b92915050565b7f4e6f742074696d6564206f7574000000000000000000000000000000000000005f82015250565b5f6150a4600d8361416b565b91506150af82615070565b602082019050919050565b5f6020820190508181035f8301526150d181615098565b9050919050565b5f60a0820190508181035f8301526150f081886141a3565b90506150ff60208301876138ef565b61510c60408301866138ef565b615119606083018561477d565b615126608083018461477d565b9695505050505050565b7f53746f72616765206164647265737300000000000000000000000000000000005f82015250565b5f615164600f8361416b565b915061516f82615130565b602082019050919050565b5f6020820190508181035f83015261519181615158565b9050919050565b7f5061796d656e74732061646472657373000000000000000000000000000000005f82015250565b5f6151cc60108361416b565b91506151d782615198565b602082019050919050565b5f6020820190508181035f8301526151f9816151c0565b9050919050565b7f4f6e6c79204a43206f72205250000000000000000000000000000000000000005f82015250565b5f615234600d8361416b565b915061523f82615200565b602082019050919050565b5f6020820190508181035f83015261526181615228565b9050919050565b5f6060820190508181035f83015261528081866141a3565b905061528f60208301856138ef565b61529c604083018461477d565b949350505050565b7f4f6e6c79206d6564696174696f6e0000000000000000000000000000000000005f82015250565b5f6152d8600e8361416b565b91506152e3826152a4565b602082019050919050565b5f6020820190508181035f830152615305816152cc565b9050919050565b7f43616e6e6f74206d6564696174650000000000000000000000000000000000005f82015250565b5f615340600e8361416b565b915061534b8261530c565b602082019050919050565b5f6020820190508181035f83015261536d81615334565b9050919050565b5f60c0820190508181035f83015261538c81896141a3565b905061539b60208301886138ef565b6153a860408301876138ef565b6153b5606083018661477d565b6153c2608083018561477d565b6153cf60a083018461477d565b979650505050505050565b7f4a6f6243726561746f72206164647265737300000000000000000000000000005f82015250565b5f61540e60128361416b565b9150615419826153da565b602082019050919050565b5f6020820190508181035f83015261543b81615402565b9050919050565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c7265615f8201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b5f61549c602e8361416b565b91506154a782615442565b604082019050919050565b5f6020820190508181035f8301526154c981615490565b9050919050565b5f819050919050565b5f60ff82169050919050565b5f819050919050565b5f6155086155036154fe846154d0565b6154e5565b6154d9565b9050919050565b615518816154ee565b82525050565b5f6020820190506155315f83018461550f565b92915050565b7f4f6e6c79205250206f72204a43000000000000000000000000000000000000005f82015250565b5f61556b600d8361416b565b915061557682615537565b602082019050919050565b5f6020820190508181035f8301526155988161555f565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f20615f8201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b5f6155f960268361416b565b91506156048261559f565b604082019050919050565b5f6020820190508181035f830152615626816155ed565b9050919050565b5f608083015f8301516156425f860182614b32565b5060208301516156556020860182614b32565b5060408301516156686040860182614b32565b50606083015184820360608601526156808282614b8d565b9150508091505092915050565b61010082015f8201516156a25f850182614c49565b5060208201516156b56040850182614c49565b5060408201516156c86080850182614c49565b5060608201516156db60c0850182614c49565b50505050565b608082015f8201516156f55f85018261401a565b506020820151615708602085018261401a565b50604082015161571b604085018261401a565b50606082015161572e606085018261401a565b50505050565b5f6101c0820190508181035f83015261574d81876141a3565b90508181036020830152615761818661562d565b9050615770604083018561568d565b61577e6101408301846156e1565b95945050505050565b7f4f6e6c79205250202f204a4300000000000000000000000000000000000000005f82015250565b5f6157bb600c8361416b565b91506157c682615787565b602082019050919050565b5f6020820190508181035f8301526157e8816157af565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725f82015250565b5f61582360208361416b565b915061582e826157ef565b602082019050919050565b5f6020820190508181035f83015261585081615817565b9050919050565b7f526573756c7473436865636b65640000000000000000000000000000000000005f82015250565b5f61588b600e8361416b565b915061589682615857565b602082019050919050565b5f6020820190508181035f8301526158b88161587f565b905091905056fea264697066735822122033e3812b7fb876adb3486c096fd2e7a47d29fedf12bcc5a37c82b1d46f3ebd8164736f6c63430008150033", + "devdoc": { + "events": { + "Initialized(uint8)": { + "details": "Triggered when the contract has been initialized or reinitialized." + } + }, + "kind": "dev", + "methods": { + "owner()": { + "details": "Returns the address of the current owner." + }, + "renounceOwnership()": { + "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner." + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "addResult(string,string,string,uint256)": { + "notice": "Results" + }, + "agree(string,(address,address,address,address[]),((uint256,uint256),(uint256,uint256),(uint256,uint256),(uint256,uint256)),(uint256,uint256,uint256,uint256))": { + "notice": "Agreements" + }, + "initialize(address,address,address,address,address,address)": { + "notice": "Init" + }, + "mediationAcceptResult(string)": { + "notice": "Mediation" + }, + "timeoutAgree(string)": { + "notice": "Timeouts" + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 680, + "contract": "contracts/LilypadController.sol:LilypadController", + "label": "_owner", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 138, + "contract": "contracts/LilypadController.sol:LilypadController", + "label": "_initialized", + "offset": 20, + "slot": "0", + "type": "t_uint8" + }, + { + "astId": 141, + "contract": "contracts/LilypadController.sol:LilypadController", + "label": "_initializing", + "offset": 21, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 2452, + "contract": "contracts/LilypadController.sol:LilypadController", + "label": "storageAddress", + "offset": 0, + "slot": "1", + "type": "t_address" + }, + { + "astId": 2454, + "contract": "contracts/LilypadController.sol:LilypadController", + "label": "userAddress", + "offset": 0, + "slot": "2", + "type": "t_address" + }, + { + "astId": 2456, + "contract": "contracts/LilypadController.sol:LilypadController", + "label": "paymentsAddress", + "offset": 0, + "slot": "3", + "type": "t_address" + }, + { + "astId": 2458, + "contract": "contracts/LilypadController.sol:LilypadController", + "label": "mediationAddress", + "offset": 0, + "slot": "4", + "type": "t_address" + }, + { + "astId": 2460, + "contract": "contracts/LilypadController.sol:LilypadController", + "label": "jobCreatorAddress", + "offset": 0, + "slot": "5", + "type": "t_address" + }, + { + "astId": 2462, + "contract": "contracts/LilypadController.sol:LilypadController", + "label": "powAddress", + "offset": 0, + "slot": "6", + "type": "t_address" + }, + { + "astId": 2465, + "contract": "contracts/LilypadController.sol:LilypadController", + "label": "storageContract", + "offset": 0, + "slot": "7", + "type": "t_contract(ILilypadStorage)2337" + }, + { + "astId": 2468, + "contract": "contracts/LilypadController.sol:LilypadController", + "label": "paymentsContract", + "offset": 0, + "slot": "8", + "type": "t_contract(ILilypadPayments)2175" + }, + { + "astId": 2471, + "contract": "contracts/LilypadController.sol:LilypadController", + "label": "mediationContract", + "offset": 0, + "slot": "9", + "type": "t_contract(ILilypadMediationHandler)2010" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_contract(ILilypadMediationHandler)2010": { + "encoding": "inplace", + "label": "contract ILilypadMediationHandler", + "numberOfBytes": "20" + }, + "t_contract(ILilypadPayments)2175": { + "encoding": "inplace", + "label": "contract ILilypadPayments", + "numberOfBytes": "20" + }, + "t_contract(ILilypadStorage)2337": { + "encoding": "inplace", + "label": "contract ILilypadStorage", + "numberOfBytes": "20" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + } + } + } +} \ No newline at end of file diff --git a/hardhat/deployments/orbit/LilypadMediationRandom.json b/hardhat/deployments/orbit/LilypadMediationRandom.json new file mode 100644 index 00000000..bc47dc65 --- /dev/null +++ b/hardhat/deployments/orbit/LilypadMediationRandom.json @@ -0,0 +1,470 @@ +{ + "address": "0x0B306BF915C4d645ff596e518fAf3F9669b97016", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "dealId", + "type": "string" + }, + { + "indexed": false, + "internalType": "address", + "name": "mediator", + "type": "address" + } + ], + "name": "MediationRequested", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "inputs": [], + "name": "disableChangeControllerAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getControllerAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + } + ], + "name": "getMediator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + } + ], + "name": "mediationAcceptResult", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + } + ], + "name": "mediationRejectResult", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + }, + { + "components": [ + { + "internalType": "address", + "name": "solver", + "type": "address" + }, + { + "internalType": "address", + "name": "jobCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "resourceProvider", + "type": "address" + }, + { + "internalType": "address[]", + "name": "mediators", + "type": "address[]" + } + ], + "internalType": "struct SharedStructs.DealMembers", + "name": "members", + "type": "tuple" + }, + { + "components": [ + { + "components": [ + { + "internalType": "uint256", + "name": "timeout", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "collateral", + "type": "uint256" + } + ], + "internalType": "struct SharedStructs.DealTimeout", + "name": "agree", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "timeout", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "collateral", + "type": "uint256" + } + ], + "internalType": "struct SharedStructs.DealTimeout", + "name": "submitResults", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "timeout", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "collateral", + "type": "uint256" + } + ], + "internalType": "struct SharedStructs.DealTimeout", + "name": "judgeResults", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "timeout", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "collateral", + "type": "uint256" + } + ], + "internalType": "struct SharedStructs.DealTimeout", + "name": "mediateResults", + "type": "tuple" + } + ], + "internalType": "struct SharedStructs.DealTimeouts", + "name": "timeouts", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "instructionPrice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "paymentCollateral", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "resultsCollateralMultiple", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "mediationFee", + "type": "uint256" + } + ], + "internalType": "struct SharedStructs.DealPricing", + "name": "pricing", + "type": "tuple" + } + ], + "internalType": "struct SharedStructs.Deal", + "name": "deal", + "type": "tuple" + } + ], + "name": "mediationRequest", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_controllerAddress", + "type": "address" + } + ], + "name": "setControllerAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x8d486ecfecd901d3496ab25645825cc53ba935db61a975f03d93fb0117c13aa3", + "receipt": { + "to": null, + "from": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266", + "contractAddress": "0x0B306BF915C4d645ff596e518fAf3F9669b97016", + "transactionIndex": 1, + "gasUsed": "1560533", + "logsBloom": "0x00000000000000001000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000020000000000000100000800000000000000000000000000000000400000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000002000000000000000000020000000000000000000000000000000010000000000000000000000000000000000", + "blockHash": "0xefeaf4f0a89d68c19c75ab450372520c6254914aa13c62ec25589893cde3fd64", + "transactionHash": "0x8d486ecfecd901d3496ab25645825cc53ba935db61a975f03d93fb0117c13aa3", + "logs": [ + { + "transactionIndex": 1, + "blockNumber": 35, + "transactionHash": "0x8d486ecfecd901d3496ab25645825cc53ba935db61a975f03d93fb0117c13aa3", + "address": "0x0B306BF915C4d645ff596e518fAf3F9669b97016", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0xefeaf4f0a89d68c19c75ab450372520c6254914aa13c62ec25589893cde3fd64" + } + ], + "blockNumber": 35, + "cumulativeGasUsed": "1560533", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "06e78eaee1ee101e9b46d15f399432ba", + "metadata": "{\"compiler\":{\"version\":\"0.8.21+commit.d9974bed\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"mediator\",\"type\":\"address\"}],\"name\":\"MediationRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"disableChangeControllerAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getControllerAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"}],\"name\":\"getMediator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"}],\"name\":\"mediationAcceptResult\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"}],\"name\":\"mediationRejectResult\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"solver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"jobCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"resourceProvider\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"mediators\",\"type\":\"address[]\"}],\"internalType\":\"struct SharedStructs.DealMembers\",\"name\":\"members\",\"type\":\"tuple\"},{\"components\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"timeout\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"collateral\",\"type\":\"uint256\"}],\"internalType\":\"struct SharedStructs.DealTimeout\",\"name\":\"agree\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"timeout\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"collateral\",\"type\":\"uint256\"}],\"internalType\":\"struct SharedStructs.DealTimeout\",\"name\":\"submitResults\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"timeout\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"collateral\",\"type\":\"uint256\"}],\"internalType\":\"struct SharedStructs.DealTimeout\",\"name\":\"judgeResults\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"timeout\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"collateral\",\"type\":\"uint256\"}],\"internalType\":\"struct SharedStructs.DealTimeout\",\"name\":\"mediateResults\",\"type\":\"tuple\"}],\"internalType\":\"struct SharedStructs.DealTimeouts\",\"name\":\"timeouts\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"instructionPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"paymentCollateral\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"resultsCollateralMultiple\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"mediationFee\",\"type\":\"uint256\"}],\"internalType\":\"struct SharedStructs.DealPricing\",\"name\":\"pricing\",\"type\":\"tuple\"}],\"internalType\":\"struct SharedStructs.Deal\",\"name\":\"deal\",\"type\":\"tuple\"}],\"name\":\"mediationRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_controllerAddress\",\"type\":\"address\"}],\"name\":\"setControllerAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"}},\"kind\":\"dev\",\"methods\":{\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"initialize()\":{\"notice\":\"Init\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/LilypadMediationRandom.sol\":\"LilypadMediationRandom\"},\"evmVersion\":\"shanghai\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized != type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x9c80f545915582e63fe206c6ce27cbe85a86fc10b9cd2a0e8c9488fb7c2ee422\",\"license\":\"MIT\"},\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor() {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby disabling any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xba43b97fba0d32eb4254f6a5a297b39a19a247082a02d6e69349e071e2946218\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"contracts/ControllerOwnable.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\npragma solidity ^0.8.6;\\n\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\n\\n// as well as being ownable (i.e. our admin wallet)\\n// this contract has a modifier called onlyController\\n// it works the same way as Ownable but only the Owner\\n// can change the controller address so it gives us a way of\\n// re-pointing contracts if needed\\ncontract ControllerOwnable is Ownable {\\n\\n // the address of the controller that is allowed to call functions\\n address private controllerAddress;\\n\\n // used to \\\"freeze\\\" the controller address - even the admin cannot\\n // change it from this point onwards\\n bool private canChangeControllerAddress = true;\\n\\n modifier onlyController() {\\n _checkControllerAccess();\\n _;\\n }\\n\\n function _checkControllerAccess() internal view virtual returns (bool) {\\n require(controllerAddress != address(0), \\\"ControllerOwnable: Controller address must be defined\\\");\\n require(_msgSender() == controllerAddress, \\\"ControllerOwnable: Only the controller can call this method\\\");\\n return true;\\n }\\n\\n function setControllerAddress(address _controllerAddress) public onlyOwner {\\n require(_controllerAddress != address(0), \\\"ControllerOwnable: Controller address must be defined\\\");\\n require(canChangeControllerAddress, \\\"ControllerOwnable: canChangeControllerAddress is disabled\\\");\\n controllerAddress = _controllerAddress;\\n }\\n\\n function getControllerAddress() public view returns (address) {\\n return controllerAddress;\\n }\\n\\n function disableChangeControllerAddress() public onlyOwner {\\n canChangeControllerAddress = false;\\n }\\n}\\n\",\"keccak256\":\"0xecfd8b0beb12340f51cefee5e121932fa7aee0a41fb7d0233966419d153ef429\",\"license\":\"Apache-2.0\"},\"contracts/ILilypadMediation.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\npragma solidity ^0.8.6;\\n\\nimport \\\"./SharedStructs.sol\\\";\\n\\n// this is our controller contract\\n// it will be called by the mediation handler once a decision has been reached\\ninterface ILilypadMediationRequester {\\n function mediationAcceptResult(\\n string memory dealId\\n ) external;\\n\\n function mediationRejectResult(\\n string memory dealId\\n ) external;\\n}\\n\\n// this is the contract that will handle mediating a deal\\ninterface ILilypadMediationHandler {\\n function mediationRequest(\\n SharedStructs.Deal memory deal \\n ) external; \\n}\\n\",\"keccak256\":\"0x52cb20c086cfecbe997ba4697c31722f6a93991f7f8ab37a7c8ecbc95993bfd6\",\"license\":\"Apache-2.0\"},\"contracts/LilypadMediationRandom.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\npragma solidity ^0.8.6;\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport \\\"./ControllerOwnable.sol\\\";\\nimport \\\"./SharedStructs.sol\\\";\\nimport \\\"./ILilypadMediation.sol\\\";\\n\\ncontract LilypadMediationRandom is ControllerOwnable, Initializable {\\n\\n // keep track of which mediators were choosen for which deals\\n mapping(string => address) private mediators;\\n\\n event MediationRequested(\\n string dealId,\\n address mediator\\n );\\n\\n /**\\n * Init\\n */\\n\\n // https://docs.openzeppelin.com/upgrades-plugins/1.x/writing-upgradeable\\n function initialize() public initializer {\\n \\n }\\n\\n // this is called by the controller contract\\n function mediationRequest(\\n SharedStructs.Deal memory deal\\n ) public onlyController {\\n uint randomIndex = uint(keccak256(abi.encodePacked(block.timestamp, deal.dealId))) % deal.members.mediators.length;\\n address mediator = deal.members.mediators[randomIndex];\\n require(mediator != address(0), \\\"mediator cannot be 0x0\\\");\\n mediators[deal.dealId] = mediator;\\n emit MediationRequested(deal.dealId, mediator);\\n }\\n\\n function getMediator(\\n string memory dealId\\n ) public view returns(address) {\\n return mediators[dealId];\\n }\\n\\n // call the controller contract as a ILilypadMediationRequester\\n function mediationAcceptResult(\\n string memory dealId\\n ) public {\\n // check the tx.origin is the same mediator that was picked\\n require(mediators[dealId] != address(0), \\\"mediator cannot be 0x0\\\");\\n require(mediators[dealId] == tx.origin, \\\"tx.origin must be the mediator\\\");\\n // call the controller contract\\n ILilypadMediationRequester(getControllerAddress()).mediationAcceptResult(dealId);\\n }\\n\\n // call the controller contract as a ILilypadMediationRequester\\n function mediationRejectResult(\\n string memory dealId\\n ) public {\\n // check the tx.origin is the same mediator that was picked\\n require(mediators[dealId] != address(0), \\\"mediator cannot be 0x0\\\");\\n require(mediators[dealId] == tx.origin, \\\"tx.origin must be the mediator\\\");\\n // call the controller contract\\n ILilypadMediationRequester(getControllerAddress()).mediationRejectResult(dealId);\\n }\\n}\\n\",\"keccak256\":\"0x233756564fbb3cb3dde9f75b37d5713ee0081adddbaf9067551050bb80f727cb\",\"license\":\"Apache-2.0\"},\"contracts/SharedStructs.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\npragma solidity ^0.8.6;\\n\\nlibrary SharedStructs {\\n\\n enum ServiceType {\\n Solver,\\n Mediator,\\n ResourceProvider,\\n JobCreator\\n }\\n\\n enum AgreementState {\\n\\n // the two parties have not yet both agreed to the deal\\n DealNegotiating,\\n\\n // both parties have agreed\\n DealAgreed,\\n\\n // results have been submitted by the RP\\n ResultsSubmitted,\\n\\n // the JC has accepted the results\\n ResultsAccepted,\\n\\n // the JC has checked the results\\n ResultsChecked,\\n\\n // a mediator has accepted the results\\n MediationAccepted,\\n\\n // a mediator has rejected the results\\n MediationRejected,\\n\\n // this means the counter-party did not agree to the deal in time\\n TimeoutAgree,\\n\\n // this means the RP did not submit results in time\\n TimeoutSubmitResults,\\n\\n // this means the JC did not accept or reject results in time\\n TimeoutJudgeResults,\\n\\n // this means the mediator did not accept or submit judgement in time\\n TimeoutMediateResults\\n\\n }\\n\\n // we map addresses onto infomation about the user\\n struct User {\\n address userAddress;\\n // the CID of information for this user\\n string metadataCID;\\n string url;\\n ServiceType[] roles;\\n }\\n\\n // the various addresses involved in runnig a deal\\n struct DealMembers {\\n // the address of the solver service that the RP and JC have agreed to use\\n address solver;\\n // the addresses of the RP and JC that have agreed to this deal\\n address jobCreator;\\n address resourceProvider;\\n // the list of mediators that the RP and JC have agreed to use\\n address[] mediators;\\n }\\n\\n // a timeout represents the agreed amount of time and the penalty\\n // that is applied if the timeout is exceeded \\n struct DealTimeout {\\n uint256 timeout;\\n uint256 collateral;\\n }\\n \\n // the various forms of timeout a deal can have\\n struct DealTimeouts { \\n DealTimeout agree;\\n DealTimeout submitResults;\\n DealTimeout judgeResults;\\n DealTimeout mediateResults;\\n }\\n\\n // configure the cost of a deal\\n struct DealPricing {\\n // agreed price per instruction\\n uint256 instructionPrice;\\n\\n // the collateral that the JC has put up to pay for the job\\n // the final cost of the job will be deducted from this\\n uint256 paymentCollateral;\\n\\n // how much collateral the RP will post to attest it's results are correct\\n // this is a multiple of the cost of the job which is known at results\\n // submission time\\n uint256 resultsCollateralMultiple;\\n\\n // how much is the JC willing to pay the mediator to resolve disputes\\n uint256 mediationFee;\\n }\\n\\n // a Deal forms the information that is agreed between both parties\\n // both parties must have called \\\"agree_deal\\\" with the exact\\n // same parameters before the deal is considered valid\\n // a Deal is immutable - nothing about it can be updated\\n struct Deal {\\n // the CID of the Deal document on IPFS (and directory service)\\n // this contains the job spec, the job offer and the resource offer\\n string dealId;\\n\\n // who is participating in this deal\\n DealMembers members;\\n \\n // the timeout settings for a deal\\n DealTimeouts timeouts;\\n\\n // the pricing settings for a deal\\n DealPricing pricing; \\n }\\n\\n // what the RP submits back once having run the job\\n // this is also immutable\\n struct Result {\\n // the id of the deal that this result is for\\n string dealId;\\n\\n // the CID of the results on IPFS (and directory service)\\n // NOTE - this is not the CID of actual results data rather\\n // of the JSON object reporting that data\\n string resultsId;\\n\\n // this is the actual lower level data CID\\n string dataId;\\n\\n // how many instructions were executed by the RP\\n uint256 instructionCount;\\n }\\n\\n // an agreement keeps track of the state of a deal and it's fields can be mutated\\n struct Agreement {\\n // the current state of the agreement\\n AgreementState state;\\n\\n uint256 resourceProviderAgreedAt;\\n uint256 jobCreatorAgreedAt;\\n uint256 dealCreatedAt;\\n uint256 dealAgreedAt;\\n\\n uint256 resultsSubmittedAt;\\n uint256 resultsAcceptedAt;\\n uint256 resultsCheckedAt;\\n\\n uint256 mediationAcceptedAt;\\n uint256 mediationRejectedAt;\\n\\n uint256 timeoutAgreeAt;\\n uint256 timeoutSubmitResultsAt;\\n uint256 timeoutJudgeResultsAt;\\n uint256 timeoutMediateResultsAt;\\n }\\n\\n struct JobOffer {\\n uint256 id;\\n \\n // this is the contract that will be triggered\\n // once there are some results\\n address calling_contract;\\n\\n // this is the address that is paying for the job\\n // they must have called approve on the token contract\\n // and granted the solver address the number of tokens\\n // required\\n address payee;\\n\\n // the job spec\\n string module;\\n string[] inputs;\\n }\\n}\\n\",\"keccak256\":\"0x17ae1fe0274d61f5460caee95e214371a378a3e49730e5bdc4833506de99fcb6\",\"license\":\"Apache-2.0\"}},\"version\":1}", + "bytecode": "0x608060405260018060146101000a81548160ff021916908315150217905550348015610029575f80fd5b5061004661003b61004b60201b60201c565b61005260201b60201c565b610113565b5f33905090565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b611974806101205f395ff3fe608060405234801561000f575f80fd5b50600436106100a7575f3560e01c80638da5cb5b1161006f5780638da5cb5b14610113578063a2bffa0014610131578063a470295814610161578063c57380a21461016b578063f2fde38b14610189578063f3d3d448146101a5576100a7565b806370bea207146100ab578063715018a6146100c757806380ffdfe0146100d15780638129fc1c146100ed578063824518aa146100f7575b5f80fd5b6100c560048036038101906100c0919061120f565b6101c1565b005b6100cf610343565b005b6100eb60048036038101906100e69190611256565b610356565b005b6100f561051c565b005b610111600480360381019061010c9190611256565b610653565b005b61011b610819565b60405161012891906112ac565b60405180910390f35b61014b60048036038101906101469190611256565b610840565b60405161015891906112ac565b60405180910390f35b610169610886565b005b6101736108aa565b60405161018091906112ac565b60405180910390f35b6101a3600480360381019061019e91906112c5565b6108d2565b005b6101bf60048036038101906101ba91906112c5565b610954565b005b6101c9610a5c565b505f8160200151606001515142835f01516040516020016101eb92919061137c565b604051602081830303815290604052805190602001205f1c61020d91906113d0565b90505f826020015160600151828151811061022b5761022a611400565b5b602002602001015190505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036102a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161029a90611487565b60405180910390fd5b806002845f01516040516102b791906114a5565b90815260200160405180910390205f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507ffd3770121045f9427361660d6eaa8b07a2e45eca6964f5c4f041a28f21084086835f0151826040516103369291906114f3565b60405180910390a1505050565b61034b610b89565b6103545f610c07565b565b5f73ffffffffffffffffffffffffffffffffffffffff1660028260405161037d91906114a5565b90815260200160405180910390205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603610401576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103f890611487565b60405180910390fd5b3273ffffffffffffffffffffffffffffffffffffffff1660028260405161042891906114a5565b90815260200160405180910390205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146104ac576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104a39061156b565b60405180910390fd5b6104b46108aa565b73ffffffffffffffffffffffffffffffffffffffff166380ffdfe0826040518263ffffffff1660e01b81526004016104ec9190611589565b5f604051808303815f87803b158015610503575f80fd5b505af1158015610515573d5f803e3d5ffd5b5050505050565b5f600160169054906101000a900460ff1615905080801561054e575060018060159054906101000a900460ff1660ff16105b8061057c575061055d30610cc8565b15801561057b575060018060159054906101000a900460ff1660ff16145b5b6105bb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105b290611619565b60405180910390fd5b60018060156101000a81548160ff021916908360ff16021790555080156105f75760018060166101000a81548160ff0219169083151502179055505b8015610650575f600160166101000a81548160ff0219169083151502179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249860016040516106479190611685565b60405180910390a15b50565b5f73ffffffffffffffffffffffffffffffffffffffff1660028260405161067a91906114a5565b90815260200160405180910390205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16036106fe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106f590611487565b60405180910390fd5b3273ffffffffffffffffffffffffffffffffffffffff1660028260405161072591906114a5565b90815260200160405180910390205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146107a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107a09061156b565b60405180910390fd5b6107b16108aa565b73ffffffffffffffffffffffffffffffffffffffff1663824518aa826040518263ffffffff1660e01b81526004016107e99190611589565b5f604051808303815f87803b158015610800575f80fd5b505af1158015610812573d5f803e3d5ffd5b5050505050565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b5f60028260405161085191906114a5565b90815260200160405180910390205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b61088e610b89565b5f600160146101000a81548160ff021916908315150217905550565b5f60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6108da610b89565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610948576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093f9061170e565b60405180910390fd5b61095181610c07565b50565b61095c610b89565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036109ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109c19061179c565b60405180910390fd5b600160149054906101000a900460ff16610a19576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a109061182a565b60405180910390fd5b8060015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b5f8073ffffffffffffffffffffffffffffffffffffffff1660015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603610aec576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ae39061179c565b60405180910390fd5b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610b2c610cea565b73ffffffffffffffffffffffffffffffffffffffff1614610b82576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b79906118b8565b60405180910390fd5b6001905090565b610b91610cea565b73ffffffffffffffffffffffffffffffffffffffff16610baf610819565b73ffffffffffffffffffffffffffffffffffffffff1614610c05576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bfc90611920565b60405180910390fd5b565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b5f33905090565b5f604051905090565b5f80fd5b5f80fd5b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b610d4c82610d06565b810181811067ffffffffffffffff82111715610d6b57610d6a610d16565b5b80604052505050565b5f610d7d610cf1565b9050610d898282610d43565b919050565b5f80fd5b5f80fd5b5f80fd5b5f67ffffffffffffffff821115610db457610db3610d16565b5b610dbd82610d06565b9050602081019050919050565b828183375f83830152505050565b5f610dea610de584610d9a565b610d74565b905082815260208101848484011115610e0657610e05610d96565b5b610e11848285610dca565b509392505050565b5f82601f830112610e2d57610e2c610d92565b5b8135610e3d848260208601610dd8565b91505092915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f610e6f82610e46565b9050919050565b610e7f81610e65565b8114610e89575f80fd5b50565b5f81359050610e9a81610e76565b92915050565b5f67ffffffffffffffff821115610eba57610eb9610d16565b5b602082029050602081019050919050565b5f80fd5b5f610ee1610edc84610ea0565b610d74565b90508083825260208201905060208402830185811115610f0457610f03610ecb565b5b835b81811015610f2d5780610f198882610e8c565b845260208401935050602081019050610f06565b5050509392505050565b5f82601f830112610f4b57610f4a610d92565b5b8135610f5b848260208601610ecf565b91505092915050565b5f60808284031215610f7957610f78610d02565b5b610f836080610d74565b90505f610f9284828501610e8c565b5f830152506020610fa584828501610e8c565b6020830152506040610fb984828501610e8c565b604083015250606082013567ffffffffffffffff811115610fdd57610fdc610d8e565b5b610fe984828501610f37565b60608301525092915050565b5f819050919050565b61100781610ff5565b8114611011575f80fd5b50565b5f8135905061102281610ffe565b92915050565b5f6040828403121561103d5761103c610d02565b5b6110476040610d74565b90505f61105684828501611014565b5f83015250602061106984828501611014565b60208301525092915050565b5f610100828403121561108b5761108a610d02565b5b6110956080610d74565b90505f6110a484828501611028565b5f8301525060406110b784828501611028565b60208301525060806110cb84828501611028565b60408301525060c06110df84828501611028565b60608301525092915050565b5f60808284031215611100576110ff610d02565b5b61110a6080610d74565b90505f61111984828501611014565b5f83015250602061112c84828501611014565b602083015250604061114084828501611014565b604083015250606061115484828501611014565b60608301525092915050565b5f6101c0828403121561117657611175610d02565b5b6111806080610d74565b90505f82013567ffffffffffffffff81111561119f5761119e610d8e565b5b6111ab84828501610e19565b5f83015250602082013567ffffffffffffffff8111156111ce576111cd610d8e565b5b6111da84828501610f64565b60208301525060406111ee84828501611075565b604083015250610140611203848285016110eb565b60608301525092915050565b5f6020828403121561122457611223610cfa565b5b5f82013567ffffffffffffffff81111561124157611240610cfe565b5b61124d84828501611160565b91505092915050565b5f6020828403121561126b5761126a610cfa565b5b5f82013567ffffffffffffffff81111561128857611287610cfe565b5b61129484828501610e19565b91505092915050565b6112a681610e65565b82525050565b5f6020820190506112bf5f83018461129d565b92915050565b5f602082840312156112da576112d9610cfa565b5b5f6112e784828501610e8c565b91505092915050565b5f819050919050565b61130a61130582610ff5565b6112f0565b82525050565b5f81519050919050565b5f81905092915050565b5f5b83811015611341578082015181840152602081019050611326565b5f8484015250505050565b5f61135682611310565b611360818561131a565b9350611370818560208601611324565b80840191505092915050565b5f61138782856112f9565b602082019150611397828461134c565b91508190509392505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f6113da82610ff5565b91506113e583610ff5565b9250826113f5576113f46113a3565b5b828206905092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f82825260208201905092915050565b7f6d65646961746f722063616e6e6f7420626520307830000000000000000000005f82015250565b5f61147160168361142d565b915061147c8261143d565b602082019050919050565b5f6020820190508181035f83015261149e81611465565b9050919050565b5f6114b0828461134c565b915081905092915050565b5f6114c582611310565b6114cf818561142d565b93506114df818560208601611324565b6114e881610d06565b840191505092915050565b5f6040820190508181035f83015261150b81856114bb565b905061151a602083018461129d565b9392505050565b7f74782e6f726967696e206d75737420626520746865206d65646961746f7200005f82015250565b5f611555601e8361142d565b915061156082611521565b602082019050919050565b5f6020820190508181035f83015261158281611549565b9050919050565b5f6020820190508181035f8301526115a181846114bb565b905092915050565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c7265615f8201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b5f611603602e8361142d565b915061160e826115a9565b604082019050919050565b5f6020820190508181035f830152611630816115f7565b9050919050565b5f819050919050565b5f60ff82169050919050565b5f819050919050565b5f61166f61166a61166584611637565b61164c565b611640565b9050919050565b61167f81611655565b82525050565b5f6020820190506116985f830184611676565b92915050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f20615f8201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b5f6116f860268361142d565b91506117038261169e565b604082019050919050565b5f6020820190508181035f830152611725816116ec565b9050919050565b7f436f6e74726f6c6c65724f776e61626c653a20436f6e74726f6c6c65722061645f8201527f6472657373206d75737420626520646566696e65640000000000000000000000602082015250565b5f61178660358361142d565b91506117918261172c565b604082019050919050565b5f6020820190508181035f8301526117b38161177a565b9050919050565b7f436f6e74726f6c6c65724f776e61626c653a2063616e4368616e6765436f6e745f8201527f726f6c6c6572416464726573732069732064697361626c656400000000000000602082015250565b5f61181460398361142d565b915061181f826117ba565b604082019050919050565b5f6020820190508181035f83015261184181611808565b9050919050565b7f436f6e74726f6c6c65724f776e61626c653a204f6e6c792074686520636f6e745f8201527f726f6c6c65722063616e2063616c6c2074686973206d6574686f640000000000602082015250565b5f6118a2603b8361142d565b91506118ad82611848565b604082019050919050565b5f6020820190508181035f8301526118cf81611896565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725f82015250565b5f61190a60208361142d565b9150611915826118d6565b602082019050919050565b5f6020820190508181035f830152611937816118fe565b905091905056fea2646970667358221220fa8593919ffbf8da52a497cc8b4d26db590a34f779c802c83a45d7fc17566a9364736f6c63430008150033", + "deployedBytecode": "0x608060405234801561000f575f80fd5b50600436106100a7575f3560e01c80638da5cb5b1161006f5780638da5cb5b14610113578063a2bffa0014610131578063a470295814610161578063c57380a21461016b578063f2fde38b14610189578063f3d3d448146101a5576100a7565b806370bea207146100ab578063715018a6146100c757806380ffdfe0146100d15780638129fc1c146100ed578063824518aa146100f7575b5f80fd5b6100c560048036038101906100c0919061120f565b6101c1565b005b6100cf610343565b005b6100eb60048036038101906100e69190611256565b610356565b005b6100f561051c565b005b610111600480360381019061010c9190611256565b610653565b005b61011b610819565b60405161012891906112ac565b60405180910390f35b61014b60048036038101906101469190611256565b610840565b60405161015891906112ac565b60405180910390f35b610169610886565b005b6101736108aa565b60405161018091906112ac565b60405180910390f35b6101a3600480360381019061019e91906112c5565b6108d2565b005b6101bf60048036038101906101ba91906112c5565b610954565b005b6101c9610a5c565b505f8160200151606001515142835f01516040516020016101eb92919061137c565b604051602081830303815290604052805190602001205f1c61020d91906113d0565b90505f826020015160600151828151811061022b5761022a611400565b5b602002602001015190505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036102a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161029a90611487565b60405180910390fd5b806002845f01516040516102b791906114a5565b90815260200160405180910390205f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507ffd3770121045f9427361660d6eaa8b07a2e45eca6964f5c4f041a28f21084086835f0151826040516103369291906114f3565b60405180910390a1505050565b61034b610b89565b6103545f610c07565b565b5f73ffffffffffffffffffffffffffffffffffffffff1660028260405161037d91906114a5565b90815260200160405180910390205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603610401576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103f890611487565b60405180910390fd5b3273ffffffffffffffffffffffffffffffffffffffff1660028260405161042891906114a5565b90815260200160405180910390205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146104ac576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104a39061156b565b60405180910390fd5b6104b46108aa565b73ffffffffffffffffffffffffffffffffffffffff166380ffdfe0826040518263ffffffff1660e01b81526004016104ec9190611589565b5f604051808303815f87803b158015610503575f80fd5b505af1158015610515573d5f803e3d5ffd5b5050505050565b5f600160169054906101000a900460ff1615905080801561054e575060018060159054906101000a900460ff1660ff16105b8061057c575061055d30610cc8565b15801561057b575060018060159054906101000a900460ff1660ff16145b5b6105bb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105b290611619565b60405180910390fd5b60018060156101000a81548160ff021916908360ff16021790555080156105f75760018060166101000a81548160ff0219169083151502179055505b8015610650575f600160166101000a81548160ff0219169083151502179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249860016040516106479190611685565b60405180910390a15b50565b5f73ffffffffffffffffffffffffffffffffffffffff1660028260405161067a91906114a5565b90815260200160405180910390205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16036106fe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106f590611487565b60405180910390fd5b3273ffffffffffffffffffffffffffffffffffffffff1660028260405161072591906114a5565b90815260200160405180910390205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146107a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107a09061156b565b60405180910390fd5b6107b16108aa565b73ffffffffffffffffffffffffffffffffffffffff1663824518aa826040518263ffffffff1660e01b81526004016107e99190611589565b5f604051808303815f87803b158015610800575f80fd5b505af1158015610812573d5f803e3d5ffd5b5050505050565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b5f60028260405161085191906114a5565b90815260200160405180910390205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b61088e610b89565b5f600160146101000a81548160ff021916908315150217905550565b5f60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6108da610b89565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610948576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093f9061170e565b60405180910390fd5b61095181610c07565b50565b61095c610b89565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036109ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109c19061179c565b60405180910390fd5b600160149054906101000a900460ff16610a19576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a109061182a565b60405180910390fd5b8060015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b5f8073ffffffffffffffffffffffffffffffffffffffff1660015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603610aec576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ae39061179c565b60405180910390fd5b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610b2c610cea565b73ffffffffffffffffffffffffffffffffffffffff1614610b82576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b79906118b8565b60405180910390fd5b6001905090565b610b91610cea565b73ffffffffffffffffffffffffffffffffffffffff16610baf610819565b73ffffffffffffffffffffffffffffffffffffffff1614610c05576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bfc90611920565b60405180910390fd5b565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b5f33905090565b5f604051905090565b5f80fd5b5f80fd5b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b610d4c82610d06565b810181811067ffffffffffffffff82111715610d6b57610d6a610d16565b5b80604052505050565b5f610d7d610cf1565b9050610d898282610d43565b919050565b5f80fd5b5f80fd5b5f80fd5b5f67ffffffffffffffff821115610db457610db3610d16565b5b610dbd82610d06565b9050602081019050919050565b828183375f83830152505050565b5f610dea610de584610d9a565b610d74565b905082815260208101848484011115610e0657610e05610d96565b5b610e11848285610dca565b509392505050565b5f82601f830112610e2d57610e2c610d92565b5b8135610e3d848260208601610dd8565b91505092915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f610e6f82610e46565b9050919050565b610e7f81610e65565b8114610e89575f80fd5b50565b5f81359050610e9a81610e76565b92915050565b5f67ffffffffffffffff821115610eba57610eb9610d16565b5b602082029050602081019050919050565b5f80fd5b5f610ee1610edc84610ea0565b610d74565b90508083825260208201905060208402830185811115610f0457610f03610ecb565b5b835b81811015610f2d5780610f198882610e8c565b845260208401935050602081019050610f06565b5050509392505050565b5f82601f830112610f4b57610f4a610d92565b5b8135610f5b848260208601610ecf565b91505092915050565b5f60808284031215610f7957610f78610d02565b5b610f836080610d74565b90505f610f9284828501610e8c565b5f830152506020610fa584828501610e8c565b6020830152506040610fb984828501610e8c565b604083015250606082013567ffffffffffffffff811115610fdd57610fdc610d8e565b5b610fe984828501610f37565b60608301525092915050565b5f819050919050565b61100781610ff5565b8114611011575f80fd5b50565b5f8135905061102281610ffe565b92915050565b5f6040828403121561103d5761103c610d02565b5b6110476040610d74565b90505f61105684828501611014565b5f83015250602061106984828501611014565b60208301525092915050565b5f610100828403121561108b5761108a610d02565b5b6110956080610d74565b90505f6110a484828501611028565b5f8301525060406110b784828501611028565b60208301525060806110cb84828501611028565b60408301525060c06110df84828501611028565b60608301525092915050565b5f60808284031215611100576110ff610d02565b5b61110a6080610d74565b90505f61111984828501611014565b5f83015250602061112c84828501611014565b602083015250604061114084828501611014565b604083015250606061115484828501611014565b60608301525092915050565b5f6101c0828403121561117657611175610d02565b5b6111806080610d74565b90505f82013567ffffffffffffffff81111561119f5761119e610d8e565b5b6111ab84828501610e19565b5f83015250602082013567ffffffffffffffff8111156111ce576111cd610d8e565b5b6111da84828501610f64565b60208301525060406111ee84828501611075565b604083015250610140611203848285016110eb565b60608301525092915050565b5f6020828403121561122457611223610cfa565b5b5f82013567ffffffffffffffff81111561124157611240610cfe565b5b61124d84828501611160565b91505092915050565b5f6020828403121561126b5761126a610cfa565b5b5f82013567ffffffffffffffff81111561128857611287610cfe565b5b61129484828501610e19565b91505092915050565b6112a681610e65565b82525050565b5f6020820190506112bf5f83018461129d565b92915050565b5f602082840312156112da576112d9610cfa565b5b5f6112e784828501610e8c565b91505092915050565b5f819050919050565b61130a61130582610ff5565b6112f0565b82525050565b5f81519050919050565b5f81905092915050565b5f5b83811015611341578082015181840152602081019050611326565b5f8484015250505050565b5f61135682611310565b611360818561131a565b9350611370818560208601611324565b80840191505092915050565b5f61138782856112f9565b602082019150611397828461134c565b91508190509392505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f6113da82610ff5565b91506113e583610ff5565b9250826113f5576113f46113a3565b5b828206905092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f82825260208201905092915050565b7f6d65646961746f722063616e6e6f7420626520307830000000000000000000005f82015250565b5f61147160168361142d565b915061147c8261143d565b602082019050919050565b5f6020820190508181035f83015261149e81611465565b9050919050565b5f6114b0828461134c565b915081905092915050565b5f6114c582611310565b6114cf818561142d565b93506114df818560208601611324565b6114e881610d06565b840191505092915050565b5f6040820190508181035f83015261150b81856114bb565b905061151a602083018461129d565b9392505050565b7f74782e6f726967696e206d75737420626520746865206d65646961746f7200005f82015250565b5f611555601e8361142d565b915061156082611521565b602082019050919050565b5f6020820190508181035f83015261158281611549565b9050919050565b5f6020820190508181035f8301526115a181846114bb565b905092915050565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c7265615f8201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b5f611603602e8361142d565b915061160e826115a9565b604082019050919050565b5f6020820190508181035f830152611630816115f7565b9050919050565b5f819050919050565b5f60ff82169050919050565b5f819050919050565b5f61166f61166a61166584611637565b61164c565b611640565b9050919050565b61167f81611655565b82525050565b5f6020820190506116985f830184611676565b92915050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f20615f8201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b5f6116f860268361142d565b91506117038261169e565b604082019050919050565b5f6020820190508181035f830152611725816116ec565b9050919050565b7f436f6e74726f6c6c65724f776e61626c653a20436f6e74726f6c6c65722061645f8201527f6472657373206d75737420626520646566696e65640000000000000000000000602082015250565b5f61178660358361142d565b91506117918261172c565b604082019050919050565b5f6020820190508181035f8301526117b38161177a565b9050919050565b7f436f6e74726f6c6c65724f776e61626c653a2063616e4368616e6765436f6e745f8201527f726f6c6c6572416464726573732069732064697361626c656400000000000000602082015250565b5f61181460398361142d565b915061181f826117ba565b604082019050919050565b5f6020820190508181035f83015261184181611808565b9050919050565b7f436f6e74726f6c6c65724f776e61626c653a204f6e6c792074686520636f6e745f8201527f726f6c6c65722063616e2063616c6c2074686973206d6574686f640000000000602082015250565b5f6118a2603b8361142d565b91506118ad82611848565b604082019050919050565b5f6020820190508181035f8301526118cf81611896565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725f82015250565b5f61190a60208361142d565b9150611915826118d6565b602082019050919050565b5f6020820190508181035f830152611937816118fe565b905091905056fea2646970667358221220fa8593919ffbf8da52a497cc8b4d26db590a34f779c802c83a45d7fc17566a9364736f6c63430008150033", + "devdoc": { + "events": { + "Initialized(uint8)": { + "details": "Triggered when the contract has been initialized or reinitialized." + } + }, + "kind": "dev", + "methods": { + "owner()": { + "details": "Returns the address of the current owner." + }, + "renounceOwnership()": { + "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner." + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "initialize()": { + "notice": "Init" + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 680, + "contract": "contracts/LilypadMediationRandom.sol:LilypadMediationRandom", + "label": "_owner", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 1649, + "contract": "contracts/LilypadMediationRandom.sol:LilypadMediationRandom", + "label": "controllerAddress", + "offset": 0, + "slot": "1", + "type": "t_address" + }, + { + "astId": 1652, + "contract": "contracts/LilypadMediationRandom.sol:LilypadMediationRandom", + "label": "canChangeControllerAddress", + "offset": 20, + "slot": "1", + "type": "t_bool" + }, + { + "astId": 138, + "contract": "contracts/LilypadMediationRandom.sol:LilypadMediationRandom", + "label": "_initialized", + "offset": 21, + "slot": "1", + "type": "t_uint8" + }, + { + "astId": 141, + "contract": "contracts/LilypadMediationRandom.sol:LilypadMediationRandom", + "label": "_initializing", + "offset": 22, + "slot": "1", + "type": "t_bool" + }, + { + "astId": 3608, + "contract": "contracts/LilypadMediationRandom.sol:LilypadMediationRandom", + "label": "mediators", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_string_memory_ptr,t_address)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_mapping(t_string_memory_ptr,t_address)": { + "encoding": "mapping", + "key": "t_string_memory_ptr", + "label": "mapping(string => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_string_memory_ptr": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + } + } + } +} \ No newline at end of file diff --git a/hardhat/deployments/orbit/LilypadOnChainJobCreator.json b/hardhat/deployments/orbit/LilypadOnChainJobCreator.json new file mode 100644 index 00000000..3cef80ea --- /dev/null +++ b/hardhat/deployments/orbit/LilypadOnChainJobCreator.json @@ -0,0 +1,525 @@ +{ + "address": "0x9A9f2CCfdE556A7E9Ff0848998Aa4a0CFD8863AE", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "calling_contract", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "payee", + "type": "address" + }, + { + "indexed": false, + "internalType": "string", + "name": "module", + "type": "string" + }, + { + "indexed": false, + "internalType": "string[]", + "name": "inputs", + "type": "string[]" + } + ], + "name": "JobAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "inputs": [], + "name": "disableChangeControllerAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getControllerAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getRequiredDeposit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getTokenAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_tokenAddress", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "nextJobID", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "requiredDeposit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "module", + "type": "string" + }, + { + "internalType": "string[]", + "name": "inputs", + "type": "string[]" + }, + { + "internalType": "address", + "name": "payee", + "type": "address" + } + ], + "name": "runJob", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_controllerAddress", + "type": "address" + } + ], + "name": "setControllerAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "cost", + "type": "uint256" + } + ], + "name": "setRequiredDeposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_tokenAddress", + "type": "address" + } + ], + "name": "setTokenAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "string", + "name": "dealId", + "type": "string" + }, + { + "internalType": "string", + "name": "dataId", + "type": "string" + } + ], + "name": "submitResults", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0xaea365d5d716f1aab5fb2929e1133bf266ec777bafb418f0a408bde6df207dbe", + "receipt": { + "to": null, + "from": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266", + "contractAddress": "0x9A9f2CCfdE556A7E9Ff0848998Aa4a0CFD8863AE", + "transactionIndex": 1, + "gasUsed": "1825348", + "logsBloom": "0x00000000000001000000000000000000000000000000000000800000000000000000000020000800000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000020000000000000100000800000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000002000000000000000000020000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x8b5662c4438a2a0bb6154ccfee80de38cfdfc64bb482bf82e0ba51ff68f57a2e", + "transactionHash": "0xaea365d5d716f1aab5fb2929e1133bf266ec777bafb418f0a408bde6df207dbe", + "logs": [ + { + "transactionIndex": 1, + "blockNumber": 37, + "transactionHash": "0xaea365d5d716f1aab5fb2929e1133bf266ec777bafb418f0a408bde6df207dbe", + "address": "0x9A9f2CCfdE556A7E9Ff0848998Aa4a0CFD8863AE", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x8b5662c4438a2a0bb6154ccfee80de38cfdfc64bb482bf82e0ba51ff68f57a2e" + } + ], + "blockNumber": 37, + "cumulativeGasUsed": "1825348", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "06e78eaee1ee101e9b46d15f399432ba", + "metadata": "{\"compiler\":{\"version\":\"0.8.21+commit.d9974bed\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"calling_contract\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"payee\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"module\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string[]\",\"name\":\"inputs\",\"type\":\"string[]\"}],\"name\":\"JobAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"disableChangeControllerAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getControllerAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRequiredDeposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTokenAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_tokenAddress\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nextJobID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"requiredDeposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"module\",\"type\":\"string\"},{\"internalType\":\"string[]\",\"name\":\"inputs\",\"type\":\"string[]\"},{\"internalType\":\"address\",\"name\":\"payee\",\"type\":\"address\"}],\"name\":\"runJob\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_controllerAddress\",\"type\":\"address\"}],\"name\":\"setControllerAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"cost\",\"type\":\"uint256\"}],\"name\":\"setRequiredDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_tokenAddress\",\"type\":\"address\"}],\"name\":\"setTokenAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"dataId\",\"type\":\"string\"}],\"name\":\"submitResults\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"}},\"kind\":\"dev\",\"methods\":{\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"initialize(address)\":{\"notice\":\"Init\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/LilypadOnChainJobCreator.sol\":\"LilypadOnChainJobCreator\"},\"evmVersion\":\"shanghai\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized != type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x9c80f545915582e63fe206c6ce27cbe85a86fc10b9cd2a0e8c9488fb7c2ee422\",\"license\":\"MIT\"},\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor() {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby disabling any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xba43b97fba0d32eb4254f6a5a297b39a19a247082a02d6e69349e071e2946218\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"contracts/ControllerOwnable.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\npragma solidity ^0.8.6;\\n\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\n\\n// as well as being ownable (i.e. our admin wallet)\\n// this contract has a modifier called onlyController\\n// it works the same way as Ownable but only the Owner\\n// can change the controller address so it gives us a way of\\n// re-pointing contracts if needed\\ncontract ControllerOwnable is Ownable {\\n\\n // the address of the controller that is allowed to call functions\\n address private controllerAddress;\\n\\n // used to \\\"freeze\\\" the controller address - even the admin cannot\\n // change it from this point onwards\\n bool private canChangeControllerAddress = true;\\n\\n modifier onlyController() {\\n _checkControllerAccess();\\n _;\\n }\\n\\n function _checkControllerAccess() internal view virtual returns (bool) {\\n require(controllerAddress != address(0), \\\"ControllerOwnable: Controller address must be defined\\\");\\n require(_msgSender() == controllerAddress, \\\"ControllerOwnable: Only the controller can call this method\\\");\\n return true;\\n }\\n\\n function setControllerAddress(address _controllerAddress) public onlyOwner {\\n require(_controllerAddress != address(0), \\\"ControllerOwnable: Controller address must be defined\\\");\\n require(canChangeControllerAddress, \\\"ControllerOwnable: canChangeControllerAddress is disabled\\\");\\n controllerAddress = _controllerAddress;\\n }\\n\\n function getControllerAddress() public view returns (address) {\\n return controllerAddress;\\n }\\n\\n function disableChangeControllerAddress() public onlyOwner {\\n canChangeControllerAddress = false;\\n }\\n}\\n\",\"keccak256\":\"0xecfd8b0beb12340f51cefee5e121932fa7aee0a41fb7d0233966419d153ef429\",\"license\":\"Apache-2.0\"},\"contracts/ILilypadJobClient.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\npragma solidity ^0.8.6;\\n\\n// a smart contract that is running a job\\n// it will call the IOnChainJobManager with it's job\\n// which will end up with the resultsAdded function being called by the manager\\ninterface ILilypadJobClient {\\n function submitResults(\\n uint256 id,\\n string memory dealId,\\n string memory dataId\\n ) external;\\n}\\n\",\"keccak256\":\"0xbdb36ace8c31e47b30abaa2ce713cec8f488f9dfaac50c7372a5f5196cc3dfcc\",\"license\":\"Apache-2.0\"},\"contracts/ILilypadJobManager.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\npragma solidity ^0.8.6;\\n\\nimport \\\"./ILilypadJobClient.sol\\\";\\n\\n// the smart contract that is responsible for handling the life\\n// cycle of a job - it will pay the registered solver to manage the job\\n// this is the simple implementation - later we can implement the whole protocol\\n// where the calling smart contract can decide if it wants to agree to a resource offer\\n// and accept results\\ninterface ILilypadJobManager is ILilypadJobClient {\\n function runJob(\\n string memory module,\\n string[] memory inputs,\\n address payee\\n ) external returns (uint256);\\n}\\n\",\"keccak256\":\"0xde04dd8ee1fc403b1ec73c2e4dec5881542525823b9bf80199606b44e00691f7\",\"license\":\"Apache-2.0\"},\"contracts/ILilypadToken.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\npragma solidity ^0.8.6;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\ninterface ILilypadToken is IERC20 {\\n function escrowBalanceOf(\\n address _address\\n ) external returns (uint256);\\n\\n function payEscrow(\\n uint256 amount\\n ) external returns (bool);\\n\\n function refundEscrow(\\n address toAddress,\\n uint256 amount\\n ) external returns (bool);\\n\\n function payJob(\\n address fromAddress,\\n address toAddress,\\n uint256 amount\\n ) external returns (bool);\\n\\n function slashEscrow(\\n address slashedAddress,\\n uint256 amount\\n ) external returns (bool);\\n}\\n\",\"keccak256\":\"0xefae0a5923d57a0e20166dd5542a566a8752d0a015287302dbbeddd0386ee9ad\",\"license\":\"Apache-2.0\"},\"contracts/LilypadOnChainJobCreator.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\npragma solidity ^0.8.6;\\n\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport \\\"./SharedStructs.sol\\\";\\nimport \\\"./ILilypadJobManager.sol\\\";\\nimport \\\"./ILilypadJobClient.sol\\\";\\nimport \\\"./ControllerOwnable.sol\\\";\\nimport \\\"./ILilypadToken.sol\\\";\\n\\ncontract LilypadOnChainJobCreator is ILilypadJobManager, ControllerOwnable, Initializable {\\n\\n // the token contract\\n // we check to see what allowance has been granted to be spent on behalf\\n // of the customer of a job\\n address private tokenAddress;\\n ILilypadToken private tokenContract;\\n\\n // the minimum amount that must be \\\"approved\\\" on the smart contract for the solver to spend\\n // for it to consider running a job for a client\\n // the solver will update this as the market pricing changes\\n uint256 public requiredDeposit;\\n\\n // auto increment job id\\n uint256 public nextJobID;\\n\\n // map of job id onto offer\\n mapping(uint256 => SharedStructs.JobOffer) private jobOffers;\\n\\n event JobAdded(\\n uint256 id,\\n address calling_contract,\\n address payee,\\n string module,\\n string[] inputs\\n );\\n\\n /**\\n * Init\\n */\\n\\n // https://docs.openzeppelin.com/upgrades-plugins/1.x/writing-upgradeable\\n function initialize(\\n address _tokenAddress\\n ) public initializer {\\n setTokenAddress(_tokenAddress);\\n nextJobID = 0;\\n }\\n\\n function setTokenAddress(address _tokenAddress) public onlyOwner {\\n require(_tokenAddress != address(0), \\\"Token address\\\");\\n tokenAddress = _tokenAddress;\\n tokenContract = ILilypadToken(tokenAddress);\\n }\\n\\n function getTokenAddress() public view returns (address) {\\n return tokenAddress;\\n }\\n\\n function setRequiredDeposit(uint256 cost) public onlyController {\\n require(cost > 0, \\\"Min deposit\\\");\\n requiredDeposit = cost;\\n }\\n\\n function getRequiredDeposit() public view returns (uint256) {\\n return requiredDeposit;\\n }\\n\\n // called by on-chain clients to make an offer for a job\\n // this will return a ticketID which is a unique onchain identifier for the job\\n function runJob(\\n // what is the module name we are making an offer for\\n string memory module,\\n // an array of key=value pairs that will be the inputs to the job\\n string[] memory inputs,\\n // the address of the client who is paying for the job\\n // they must have called the increaseAllowance function\\n // giving the controller (i.e. solver) permission to spend their tokens\\n address payee\\n ) public override returns (uint256) {\\n // this makes sure that the person paying for the job has\\n // already called \\\"approve\\\" on the token contract so the solver can\\n // work on it's behalf\\n require(tokenContract.allowance(payee, getControllerAddress()) >= requiredDeposit, \\\"Token allowance not enough\\\");\\n\\n nextJobID = nextJobID + 1;\\n jobOffers[nextJobID] = SharedStructs.JobOffer(\\n nextJobID,\\n msg.sender,\\n payee,\\n module,\\n inputs\\n );\\n emit JobAdded(\\n nextJobID,\\n msg.sender,\\n payee,\\n module,\\n inputs\\n );\\n\\n return nextJobID;\\n }\\n\\n // this is called by the solver once we've got results out of the controller\\n // it will call the \\\"resultsAdded\\\" function on the original client contract\\n function submitResults(\\n uint256 id,\\n string memory dealId,\\n string memory dataId\\n ) public onlyController override {\\n SharedStructs.JobOffer storage offer = jobOffers[id];\\n require(offer.id != 0, \\\"Job not found\\\");\\n ILilypadJobClient(offer.calling_contract).submitResults(\\n id,\\n dealId,\\n dataId\\n );\\n }\\n}\\n\",\"keccak256\":\"0x0e5c4d34020f525e81aff101c53db74fdc8d1632938842c8b4974f2d2bfe0de5\",\"license\":\"Apache-2.0\"},\"contracts/SharedStructs.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\npragma solidity ^0.8.6;\\n\\nlibrary SharedStructs {\\n\\n enum ServiceType {\\n Solver,\\n Mediator,\\n ResourceProvider,\\n JobCreator\\n }\\n\\n enum AgreementState {\\n\\n // the two parties have not yet both agreed to the deal\\n DealNegotiating,\\n\\n // both parties have agreed\\n DealAgreed,\\n\\n // results have been submitted by the RP\\n ResultsSubmitted,\\n\\n // the JC has accepted the results\\n ResultsAccepted,\\n\\n // the JC has checked the results\\n ResultsChecked,\\n\\n // a mediator has accepted the results\\n MediationAccepted,\\n\\n // a mediator has rejected the results\\n MediationRejected,\\n\\n // this means the counter-party did not agree to the deal in time\\n TimeoutAgree,\\n\\n // this means the RP did not submit results in time\\n TimeoutSubmitResults,\\n\\n // this means the JC did not accept or reject results in time\\n TimeoutJudgeResults,\\n\\n // this means the mediator did not accept or submit judgement in time\\n TimeoutMediateResults\\n\\n }\\n\\n // we map addresses onto infomation about the user\\n struct User {\\n address userAddress;\\n // the CID of information for this user\\n string metadataCID;\\n string url;\\n ServiceType[] roles;\\n }\\n\\n // the various addresses involved in runnig a deal\\n struct DealMembers {\\n // the address of the solver service that the RP and JC have agreed to use\\n address solver;\\n // the addresses of the RP and JC that have agreed to this deal\\n address jobCreator;\\n address resourceProvider;\\n // the list of mediators that the RP and JC have agreed to use\\n address[] mediators;\\n }\\n\\n // a timeout represents the agreed amount of time and the penalty\\n // that is applied if the timeout is exceeded \\n struct DealTimeout {\\n uint256 timeout;\\n uint256 collateral;\\n }\\n \\n // the various forms of timeout a deal can have\\n struct DealTimeouts { \\n DealTimeout agree;\\n DealTimeout submitResults;\\n DealTimeout judgeResults;\\n DealTimeout mediateResults;\\n }\\n\\n // configure the cost of a deal\\n struct DealPricing {\\n // agreed price per instruction\\n uint256 instructionPrice;\\n\\n // the collateral that the JC has put up to pay for the job\\n // the final cost of the job will be deducted from this\\n uint256 paymentCollateral;\\n\\n // how much collateral the RP will post to attest it's results are correct\\n // this is a multiple of the cost of the job which is known at results\\n // submission time\\n uint256 resultsCollateralMultiple;\\n\\n // how much is the JC willing to pay the mediator to resolve disputes\\n uint256 mediationFee;\\n }\\n\\n // a Deal forms the information that is agreed between both parties\\n // both parties must have called \\\"agree_deal\\\" with the exact\\n // same parameters before the deal is considered valid\\n // a Deal is immutable - nothing about it can be updated\\n struct Deal {\\n // the CID of the Deal document on IPFS (and directory service)\\n // this contains the job spec, the job offer and the resource offer\\n string dealId;\\n\\n // who is participating in this deal\\n DealMembers members;\\n \\n // the timeout settings for a deal\\n DealTimeouts timeouts;\\n\\n // the pricing settings for a deal\\n DealPricing pricing; \\n }\\n\\n // what the RP submits back once having run the job\\n // this is also immutable\\n struct Result {\\n // the id of the deal that this result is for\\n string dealId;\\n\\n // the CID of the results on IPFS (and directory service)\\n // NOTE - this is not the CID of actual results data rather\\n // of the JSON object reporting that data\\n string resultsId;\\n\\n // this is the actual lower level data CID\\n string dataId;\\n\\n // how many instructions were executed by the RP\\n uint256 instructionCount;\\n }\\n\\n // an agreement keeps track of the state of a deal and it's fields can be mutated\\n struct Agreement {\\n // the current state of the agreement\\n AgreementState state;\\n\\n uint256 resourceProviderAgreedAt;\\n uint256 jobCreatorAgreedAt;\\n uint256 dealCreatedAt;\\n uint256 dealAgreedAt;\\n\\n uint256 resultsSubmittedAt;\\n uint256 resultsAcceptedAt;\\n uint256 resultsCheckedAt;\\n\\n uint256 mediationAcceptedAt;\\n uint256 mediationRejectedAt;\\n\\n uint256 timeoutAgreeAt;\\n uint256 timeoutSubmitResultsAt;\\n uint256 timeoutJudgeResultsAt;\\n uint256 timeoutMediateResultsAt;\\n }\\n\\n struct JobOffer {\\n uint256 id;\\n \\n // this is the contract that will be triggered\\n // once there are some results\\n address calling_contract;\\n\\n // this is the address that is paying for the job\\n // they must have called approve on the token contract\\n // and granted the solver address the number of tokens\\n // required\\n address payee;\\n\\n // the job spec\\n string module;\\n string[] inputs;\\n }\\n}\\n\",\"keccak256\":\"0x17ae1fe0274d61f5460caee95e214371a378a3e49730e5bdc4833506de99fcb6\",\"license\":\"Apache-2.0\"}},\"version\":1}", + "bytecode": "0x608060405260018060146101000a81548160ff021916908315150217905550348015610029575f80fd5b5061004661003b61004b60201b60201c565b61005260201b60201c565b610113565b5f33905090565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b611df4806101205f395ff3fe608060405234801561000f575f80fd5b50600436106100f3575f3560e01c8063a470295811610095578063d2a715c011610064578063d2a715c014610223578063f2fde38b14610241578063f3d3d4481461025d578063fb7cfdd714610279576100f3565b8063a4702958146101af578063c4d66de8146101b9578063c57380a2146101d5578063c75555fa146101f3576100f3565b806358e56db4116100d157806358e56db41461014d5780636c0f1f581461016b578063715018a6146101875780638da5cb5b14610191576100f3565b806310fe9ae8146100f757806326a4e8d2146101155780634c526c7614610131575b5f80fd5b6100ff610297565b60405161010c9190610eb1565b60405180910390f35b61012f600480360381019061012a9190610f05565b6102bf565b005b61014b60048036038101906101469190610f63565b6103d9565b005b61015561042e565b6040516101629190610f9d565b60405180910390f35b610185600480360381019061018091906110f2565b610437565b005b61018f61052c565b005b61019961053f565b6040516101a69190610eb1565b60405180910390f35b6101b7610566565b005b6101d360048036038101906101ce9190610f05565b61058a565b005b6101dd6106d2565b6040516101ea9190610eb1565b60405180910390f35b61020d6004803603810190610208919061125c565b6106fa565b60405161021a9190610f9d565b60405180910390f35b61022b610975565b6040516102389190610f9d565b60405180910390f35b61025b60048036038101906102569190610f05565b61097b565b005b61027760048036038101906102729190610f05565b6109fd565b005b610281610b05565b60405161028e9190610f9d565b60405180910390f35b5f60025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6102c7610b0b565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610335576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161032c9061133e565b60405180910390fd5b8060025f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660035f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6103e1610b89565b505f8111610424576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161041b906113a6565b60405180910390fd5b8060048190555050565b5f600454905090565b61043f610b89565b505f60065f8581526020019081526020015f2090505f815f015403610499576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104909061140e565b60405180910390fd5b806001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636c0f1f588585856040518463ffffffff1660e01b81526004016104f993929190611496565b5f604051808303815f87803b158015610510575f80fd5b505af1158015610522573d5f803e3d5ffd5b5050505050505050565b610534610b0b565b61053d5f610cb6565b565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b61056e610b0b565b5f600160146101000a81548160ff021916908315150217905550565b5f600160169054906101000a900460ff161590508080156105bc575060018060159054906101000a900460ff1660ff16105b806105ea57506105cb30610d77565b1580156105e9575060018060159054906101000a900460ff1660ff16145b5b610629576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062090611549565b60405180910390fd5b60018060156101000a81548160ff021916908360ff16021790555080156106655760018060166101000a81548160ff0219169083151502179055505b61066e826102bf565b5f60058190555080156106ce575f600160166101000a81548160ff0219169083151502179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249860016040516106c591906115b5565b60405180910390a15b5050565b5f60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b5f60045460035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e846107446106d2565b6040518363ffffffff1660e01b81526004016107619291906115ce565b602060405180830381865afa15801561077c573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107a09190611609565b10156107e1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107d89061167e565b60405180910390fd5b60016005546107f091906116c9565b6005819055506040518060a0016040528060055481526020013373ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1681526020018581526020018481525060065f60055481526020019081526020015f205f820151815f01556020820151816001015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506040820151816002015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550606082015181600301908161090791906118ed565b506080820151816004019080519060200190610924929190610da0565b509050507faa171d38d08c39622dbd189ddd0a5c0cf3ea10eeda0c7d4c2c75d13fcc4fe14a60055433848787604051610961959493929190611abf565b60405180910390a160055490509392505050565b60055481565b610983610b0b565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036109f1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109e890611b8e565b60405180910390fd5b6109fa81610cb6565b50565b610a05610b0b565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610a73576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a6a90611c1c565b60405180910390fd5b600160149054906101000a900460ff16610ac2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ab990611caa565b60405180910390fd5b8060015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60045481565b610b13610d99565b73ffffffffffffffffffffffffffffffffffffffff16610b3161053f565b73ffffffffffffffffffffffffffffffffffffffff1614610b87576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b7e90611d12565b60405180910390fd5b565b5f8073ffffffffffffffffffffffffffffffffffffffff1660015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603610c19576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c1090611c1c565b60405180910390fd5b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610c59610d99565b73ffffffffffffffffffffffffffffffffffffffff1614610caf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ca690611da0565b60405180910390fd5b6001905090565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b5f33905090565b828054828255905f5260205f20908101928215610de6579160200282015b82811115610de5578251829081610dd591906118ed565b5091602001919060010190610dbe565b5b509050610df39190610df7565b5090565b5b80821115610e16575f8181610e0d9190610e1a565b50600101610df8565b5090565b508054610e2690611729565b5f825580601f10610e375750610e54565b601f0160209004905f5260205f2090810190610e539190610e57565b5b50565b5b80821115610e6e575f815f905550600101610e58565b5090565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f610e9b82610e72565b9050919050565b610eab81610e91565b82525050565b5f602082019050610ec45f830184610ea2565b92915050565b5f604051905090565b5f80fd5b5f80fd5b610ee481610e91565b8114610eee575f80fd5b50565b5f81359050610eff81610edb565b92915050565b5f60208284031215610f1a57610f19610ed3565b5b5f610f2784828501610ef1565b91505092915050565b5f819050919050565b610f4281610f30565b8114610f4c575f80fd5b50565b5f81359050610f5d81610f39565b92915050565b5f60208284031215610f7857610f77610ed3565b5b5f610f8584828501610f4f565b91505092915050565b610f9781610f30565b82525050565b5f602082019050610fb05f830184610f8e565b92915050565b5f80fd5b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b61100482610fbe565b810181811067ffffffffffffffff8211171561102357611022610fce565b5b80604052505050565b5f611035610eca565b90506110418282610ffb565b919050565b5f67ffffffffffffffff8211156110605761105f610fce565b5b61106982610fbe565b9050602081019050919050565b828183375f83830152505050565b5f61109661109184611046565b61102c565b9050828152602081018484840111156110b2576110b1610fba565b5b6110bd848285611076565b509392505050565b5f82601f8301126110d9576110d8610fb6565b5b81356110e9848260208601611084565b91505092915050565b5f805f6060848603121561110957611108610ed3565b5b5f61111686828701610f4f565b935050602084013567ffffffffffffffff81111561113757611136610ed7565b5b611143868287016110c5565b925050604084013567ffffffffffffffff81111561116457611163610ed7565b5b611170868287016110c5565b9150509250925092565b5f67ffffffffffffffff82111561119457611193610fce565b5b602082029050602081019050919050565b5f80fd5b5f6111bb6111b68461117a565b61102c565b905080838252602082019050602084028301858111156111de576111dd6111a5565b5b835b8181101561122557803567ffffffffffffffff81111561120357611202610fb6565b5b80860161121089826110c5565b855260208501945050506020810190506111e0565b5050509392505050565b5f82601f83011261124357611242610fb6565b5b81356112538482602086016111a9565b91505092915050565b5f805f6060848603121561127357611272610ed3565b5b5f84013567ffffffffffffffff8111156112905761128f610ed7565b5b61129c868287016110c5565b935050602084013567ffffffffffffffff8111156112bd576112bc610ed7565b5b6112c98682870161122f565b92505060406112da86828701610ef1565b9150509250925092565b5f82825260208201905092915050565b7f546f6b656e2061646472657373000000000000000000000000000000000000005f82015250565b5f611328600d836112e4565b9150611333826112f4565b602082019050919050565b5f6020820190508181035f8301526113558161131c565b9050919050565b7f4d696e206465706f7369740000000000000000000000000000000000000000005f82015250565b5f611390600b836112e4565b915061139b8261135c565b602082019050919050565b5f6020820190508181035f8301526113bd81611384565b9050919050565b7f4a6f62206e6f7420666f756e64000000000000000000000000000000000000005f82015250565b5f6113f8600d836112e4565b9150611403826113c4565b602082019050919050565b5f6020820190508181035f830152611425816113ec565b9050919050565b5f81519050919050565b5f5b83811015611453578082015181840152602081019050611438565b5f8484015250505050565b5f6114688261142c565b61147281856112e4565b9350611482818560208601611436565b61148b81610fbe565b840191505092915050565b5f6060820190506114a95f830186610f8e565b81810360208301526114bb818561145e565b905081810360408301526114cf818461145e565b9050949350505050565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c7265615f8201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b5f611533602e836112e4565b915061153e826114d9565b604082019050919050565b5f6020820190508181035f83015261156081611527565b9050919050565b5f819050919050565b5f60ff82169050919050565b5f819050919050565b5f61159f61159a61159584611567565b61157c565b611570565b9050919050565b6115af81611585565b82525050565b5f6020820190506115c85f8301846115a6565b92915050565b5f6040820190506115e15f830185610ea2565b6115ee6020830184610ea2565b9392505050565b5f8151905061160381610f39565b92915050565b5f6020828403121561161e5761161d610ed3565b5b5f61162b848285016115f5565b91505092915050565b7f546f6b656e20616c6c6f77616e6365206e6f7420656e6f7567680000000000005f82015250565b5f611668601a836112e4565b915061167382611634565b602082019050919050565b5f6020820190508181035f8301526116958161165c565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6116d382610f30565b91506116de83610f30565b92508282019050808211156116f6576116f561169c565b5b92915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f600282049050600182168061174057607f821691505b602082108103611753576117526116fc565b5b50919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f600883026117b57fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8261177a565b6117bf868361177a565b95508019841693508086168417925050509392505050565b5f6117f16117ec6117e784610f30565b61157c565b610f30565b9050919050565b5f819050919050565b61180a836117d7565b61181e611816826117f8565b848454611786565b825550505050565b5f90565b611832611826565b61183d818484611801565b505050565b5b81811015611860576118555f8261182a565b600181019050611843565b5050565b601f8211156118a55761187681611759565b61187f8461176b565b8101602085101561188e578190505b6118a261189a8561176b565b830182611842565b50505b505050565b5f82821c905092915050565b5f6118c55f19846008026118aa565b1980831691505092915050565b5f6118dd83836118b6565b9150826002028217905092915050565b6118f68261142c565b67ffffffffffffffff81111561190f5761190e610fce565b5b6119198254611729565b611924828285611864565b5f60209050601f831160018114611955575f8415611943578287015190505b61194d85826118d2565b8655506119b4565b601f19841661196386611759565b5f5b8281101561198a57848901518255600182019150602085019450602081019050611965565b868310156119a757848901516119a3601f8916826118b6565b8355505b6001600288020188555050505b505050505050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b5f82825260208201905092915050565b5f6119ff8261142c565b611a0981856119e5565b9350611a19818560208601611436565b611a2281610fbe565b840191505092915050565b5f611a3883836119f5565b905092915050565b5f602082019050919050565b5f611a56826119bc565b611a6081856119c6565b935083602082028501611a72856119d6565b805f5b85811015611aad5784840389528151611a8e8582611a2d565b9450611a9983611a40565b925060208a01995050600181019050611a75565b50829750879550505050505092915050565b5f60a082019050611ad25f830188610f8e565b611adf6020830187610ea2565b611aec6040830186610ea2565b8181036060830152611afe818561145e565b90508181036080830152611b128184611a4c565b90509695505050505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f20615f8201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b5f611b786026836112e4565b9150611b8382611b1e565b604082019050919050565b5f6020820190508181035f830152611ba581611b6c565b9050919050565b7f436f6e74726f6c6c65724f776e61626c653a20436f6e74726f6c6c65722061645f8201527f6472657373206d75737420626520646566696e65640000000000000000000000602082015250565b5f611c066035836112e4565b9150611c1182611bac565b604082019050919050565b5f6020820190508181035f830152611c3381611bfa565b9050919050565b7f436f6e74726f6c6c65724f776e61626c653a2063616e4368616e6765436f6e745f8201527f726f6c6c6572416464726573732069732064697361626c656400000000000000602082015250565b5f611c946039836112e4565b9150611c9f82611c3a565b604082019050919050565b5f6020820190508181035f830152611cc181611c88565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725f82015250565b5f611cfc6020836112e4565b9150611d0782611cc8565b602082019050919050565b5f6020820190508181035f830152611d2981611cf0565b9050919050565b7f436f6e74726f6c6c65724f776e61626c653a204f6e6c792074686520636f6e745f8201527f726f6c6c65722063616e2063616c6c2074686973206d6574686f640000000000602082015250565b5f611d8a603b836112e4565b9150611d9582611d30565b604082019050919050565b5f6020820190508181035f830152611db781611d7e565b905091905056fea2646970667358221220cdb4d3edabf0c4fdaa1eb5ba2b8b60a735be2e5ac0cb496714604acc8a47640e64736f6c63430008150033", + "deployedBytecode": "0x608060405234801561000f575f80fd5b50600436106100f3575f3560e01c8063a470295811610095578063d2a715c011610064578063d2a715c014610223578063f2fde38b14610241578063f3d3d4481461025d578063fb7cfdd714610279576100f3565b8063a4702958146101af578063c4d66de8146101b9578063c57380a2146101d5578063c75555fa146101f3576100f3565b806358e56db4116100d157806358e56db41461014d5780636c0f1f581461016b578063715018a6146101875780638da5cb5b14610191576100f3565b806310fe9ae8146100f757806326a4e8d2146101155780634c526c7614610131575b5f80fd5b6100ff610297565b60405161010c9190610eb1565b60405180910390f35b61012f600480360381019061012a9190610f05565b6102bf565b005b61014b60048036038101906101469190610f63565b6103d9565b005b61015561042e565b6040516101629190610f9d565b60405180910390f35b610185600480360381019061018091906110f2565b610437565b005b61018f61052c565b005b61019961053f565b6040516101a69190610eb1565b60405180910390f35b6101b7610566565b005b6101d360048036038101906101ce9190610f05565b61058a565b005b6101dd6106d2565b6040516101ea9190610eb1565b60405180910390f35b61020d6004803603810190610208919061125c565b6106fa565b60405161021a9190610f9d565b60405180910390f35b61022b610975565b6040516102389190610f9d565b60405180910390f35b61025b60048036038101906102569190610f05565b61097b565b005b61027760048036038101906102729190610f05565b6109fd565b005b610281610b05565b60405161028e9190610f9d565b60405180910390f35b5f60025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6102c7610b0b565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610335576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161032c9061133e565b60405180910390fd5b8060025f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660035f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6103e1610b89565b505f8111610424576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161041b906113a6565b60405180910390fd5b8060048190555050565b5f600454905090565b61043f610b89565b505f60065f8581526020019081526020015f2090505f815f015403610499576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104909061140e565b60405180910390fd5b806001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636c0f1f588585856040518463ffffffff1660e01b81526004016104f993929190611496565b5f604051808303815f87803b158015610510575f80fd5b505af1158015610522573d5f803e3d5ffd5b5050505050505050565b610534610b0b565b61053d5f610cb6565b565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b61056e610b0b565b5f600160146101000a81548160ff021916908315150217905550565b5f600160169054906101000a900460ff161590508080156105bc575060018060159054906101000a900460ff1660ff16105b806105ea57506105cb30610d77565b1580156105e9575060018060159054906101000a900460ff1660ff16145b5b610629576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062090611549565b60405180910390fd5b60018060156101000a81548160ff021916908360ff16021790555080156106655760018060166101000a81548160ff0219169083151502179055505b61066e826102bf565b5f60058190555080156106ce575f600160166101000a81548160ff0219169083151502179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249860016040516106c591906115b5565b60405180910390a15b5050565b5f60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b5f60045460035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e846107446106d2565b6040518363ffffffff1660e01b81526004016107619291906115ce565b602060405180830381865afa15801561077c573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107a09190611609565b10156107e1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107d89061167e565b60405180910390fd5b60016005546107f091906116c9565b6005819055506040518060a0016040528060055481526020013373ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1681526020018581526020018481525060065f60055481526020019081526020015f205f820151815f01556020820151816001015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506040820151816002015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550606082015181600301908161090791906118ed565b506080820151816004019080519060200190610924929190610da0565b509050507faa171d38d08c39622dbd189ddd0a5c0cf3ea10eeda0c7d4c2c75d13fcc4fe14a60055433848787604051610961959493929190611abf565b60405180910390a160055490509392505050565b60055481565b610983610b0b565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036109f1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109e890611b8e565b60405180910390fd5b6109fa81610cb6565b50565b610a05610b0b565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610a73576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a6a90611c1c565b60405180910390fd5b600160149054906101000a900460ff16610ac2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ab990611caa565b60405180910390fd5b8060015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60045481565b610b13610d99565b73ffffffffffffffffffffffffffffffffffffffff16610b3161053f565b73ffffffffffffffffffffffffffffffffffffffff1614610b87576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b7e90611d12565b60405180910390fd5b565b5f8073ffffffffffffffffffffffffffffffffffffffff1660015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603610c19576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c1090611c1c565b60405180910390fd5b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610c59610d99565b73ffffffffffffffffffffffffffffffffffffffff1614610caf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ca690611da0565b60405180910390fd5b6001905090565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b5f33905090565b828054828255905f5260205f20908101928215610de6579160200282015b82811115610de5578251829081610dd591906118ed565b5091602001919060010190610dbe565b5b509050610df39190610df7565b5090565b5b80821115610e16575f8181610e0d9190610e1a565b50600101610df8565b5090565b508054610e2690611729565b5f825580601f10610e375750610e54565b601f0160209004905f5260205f2090810190610e539190610e57565b5b50565b5b80821115610e6e575f815f905550600101610e58565b5090565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f610e9b82610e72565b9050919050565b610eab81610e91565b82525050565b5f602082019050610ec45f830184610ea2565b92915050565b5f604051905090565b5f80fd5b5f80fd5b610ee481610e91565b8114610eee575f80fd5b50565b5f81359050610eff81610edb565b92915050565b5f60208284031215610f1a57610f19610ed3565b5b5f610f2784828501610ef1565b91505092915050565b5f819050919050565b610f4281610f30565b8114610f4c575f80fd5b50565b5f81359050610f5d81610f39565b92915050565b5f60208284031215610f7857610f77610ed3565b5b5f610f8584828501610f4f565b91505092915050565b610f9781610f30565b82525050565b5f602082019050610fb05f830184610f8e565b92915050565b5f80fd5b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b61100482610fbe565b810181811067ffffffffffffffff8211171561102357611022610fce565b5b80604052505050565b5f611035610eca565b90506110418282610ffb565b919050565b5f67ffffffffffffffff8211156110605761105f610fce565b5b61106982610fbe565b9050602081019050919050565b828183375f83830152505050565b5f61109661109184611046565b61102c565b9050828152602081018484840111156110b2576110b1610fba565b5b6110bd848285611076565b509392505050565b5f82601f8301126110d9576110d8610fb6565b5b81356110e9848260208601611084565b91505092915050565b5f805f6060848603121561110957611108610ed3565b5b5f61111686828701610f4f565b935050602084013567ffffffffffffffff81111561113757611136610ed7565b5b611143868287016110c5565b925050604084013567ffffffffffffffff81111561116457611163610ed7565b5b611170868287016110c5565b9150509250925092565b5f67ffffffffffffffff82111561119457611193610fce565b5b602082029050602081019050919050565b5f80fd5b5f6111bb6111b68461117a565b61102c565b905080838252602082019050602084028301858111156111de576111dd6111a5565b5b835b8181101561122557803567ffffffffffffffff81111561120357611202610fb6565b5b80860161121089826110c5565b855260208501945050506020810190506111e0565b5050509392505050565b5f82601f83011261124357611242610fb6565b5b81356112538482602086016111a9565b91505092915050565b5f805f6060848603121561127357611272610ed3565b5b5f84013567ffffffffffffffff8111156112905761128f610ed7565b5b61129c868287016110c5565b935050602084013567ffffffffffffffff8111156112bd576112bc610ed7565b5b6112c98682870161122f565b92505060406112da86828701610ef1565b9150509250925092565b5f82825260208201905092915050565b7f546f6b656e2061646472657373000000000000000000000000000000000000005f82015250565b5f611328600d836112e4565b9150611333826112f4565b602082019050919050565b5f6020820190508181035f8301526113558161131c565b9050919050565b7f4d696e206465706f7369740000000000000000000000000000000000000000005f82015250565b5f611390600b836112e4565b915061139b8261135c565b602082019050919050565b5f6020820190508181035f8301526113bd81611384565b9050919050565b7f4a6f62206e6f7420666f756e64000000000000000000000000000000000000005f82015250565b5f6113f8600d836112e4565b9150611403826113c4565b602082019050919050565b5f6020820190508181035f830152611425816113ec565b9050919050565b5f81519050919050565b5f5b83811015611453578082015181840152602081019050611438565b5f8484015250505050565b5f6114688261142c565b61147281856112e4565b9350611482818560208601611436565b61148b81610fbe565b840191505092915050565b5f6060820190506114a95f830186610f8e565b81810360208301526114bb818561145e565b905081810360408301526114cf818461145e565b9050949350505050565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c7265615f8201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b5f611533602e836112e4565b915061153e826114d9565b604082019050919050565b5f6020820190508181035f83015261156081611527565b9050919050565b5f819050919050565b5f60ff82169050919050565b5f819050919050565b5f61159f61159a61159584611567565b61157c565b611570565b9050919050565b6115af81611585565b82525050565b5f6020820190506115c85f8301846115a6565b92915050565b5f6040820190506115e15f830185610ea2565b6115ee6020830184610ea2565b9392505050565b5f8151905061160381610f39565b92915050565b5f6020828403121561161e5761161d610ed3565b5b5f61162b848285016115f5565b91505092915050565b7f546f6b656e20616c6c6f77616e6365206e6f7420656e6f7567680000000000005f82015250565b5f611668601a836112e4565b915061167382611634565b602082019050919050565b5f6020820190508181035f8301526116958161165c565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6116d382610f30565b91506116de83610f30565b92508282019050808211156116f6576116f561169c565b5b92915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f600282049050600182168061174057607f821691505b602082108103611753576117526116fc565b5b50919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f600883026117b57fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8261177a565b6117bf868361177a565b95508019841693508086168417925050509392505050565b5f6117f16117ec6117e784610f30565b61157c565b610f30565b9050919050565b5f819050919050565b61180a836117d7565b61181e611816826117f8565b848454611786565b825550505050565b5f90565b611832611826565b61183d818484611801565b505050565b5b81811015611860576118555f8261182a565b600181019050611843565b5050565b601f8211156118a55761187681611759565b61187f8461176b565b8101602085101561188e578190505b6118a261189a8561176b565b830182611842565b50505b505050565b5f82821c905092915050565b5f6118c55f19846008026118aa565b1980831691505092915050565b5f6118dd83836118b6565b9150826002028217905092915050565b6118f68261142c565b67ffffffffffffffff81111561190f5761190e610fce565b5b6119198254611729565b611924828285611864565b5f60209050601f831160018114611955575f8415611943578287015190505b61194d85826118d2565b8655506119b4565b601f19841661196386611759565b5f5b8281101561198a57848901518255600182019150602085019450602081019050611965565b868310156119a757848901516119a3601f8916826118b6565b8355505b6001600288020188555050505b505050505050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b5f82825260208201905092915050565b5f6119ff8261142c565b611a0981856119e5565b9350611a19818560208601611436565b611a2281610fbe565b840191505092915050565b5f611a3883836119f5565b905092915050565b5f602082019050919050565b5f611a56826119bc565b611a6081856119c6565b935083602082028501611a72856119d6565b805f5b85811015611aad5784840389528151611a8e8582611a2d565b9450611a9983611a40565b925060208a01995050600181019050611a75565b50829750879550505050505092915050565b5f60a082019050611ad25f830188610f8e565b611adf6020830187610ea2565b611aec6040830186610ea2565b8181036060830152611afe818561145e565b90508181036080830152611b128184611a4c565b90509695505050505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f20615f8201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b5f611b786026836112e4565b9150611b8382611b1e565b604082019050919050565b5f6020820190508181035f830152611ba581611b6c565b9050919050565b7f436f6e74726f6c6c65724f776e61626c653a20436f6e74726f6c6c65722061645f8201527f6472657373206d75737420626520646566696e65640000000000000000000000602082015250565b5f611c066035836112e4565b9150611c1182611bac565b604082019050919050565b5f6020820190508181035f830152611c3381611bfa565b9050919050565b7f436f6e74726f6c6c65724f776e61626c653a2063616e4368616e6765436f6e745f8201527f726f6c6c6572416464726573732069732064697361626c656400000000000000602082015250565b5f611c946039836112e4565b9150611c9f82611c3a565b604082019050919050565b5f6020820190508181035f830152611cc181611c88565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725f82015250565b5f611cfc6020836112e4565b9150611d0782611cc8565b602082019050919050565b5f6020820190508181035f830152611d2981611cf0565b9050919050565b7f436f6e74726f6c6c65724f776e61626c653a204f6e6c792074686520636f6e745f8201527f726f6c6c65722063616e2063616c6c2074686973206d6574686f640000000000602082015250565b5f611d8a603b836112e4565b9150611d9582611d30565b604082019050919050565b5f6020820190508181035f830152611db781611d7e565b905091905056fea2646970667358221220cdb4d3edabf0c4fdaa1eb5ba2b8b60a735be2e5ac0cb496714604acc8a47640e64736f6c63430008150033", + "devdoc": { + "events": { + "Initialized(uint8)": { + "details": "Triggered when the contract has been initialized or reinitialized." + } + }, + "kind": "dev", + "methods": { + "owner()": { + "details": "Returns the address of the current owner." + }, + "renounceOwnership()": { + "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner." + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "initialize(address)": { + "notice": "Init" + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 680, + "contract": "contracts/LilypadOnChainJobCreator.sol:LilypadOnChainJobCreator", + "label": "_owner", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 1649, + "contract": "contracts/LilypadOnChainJobCreator.sol:LilypadOnChainJobCreator", + "label": "controllerAddress", + "offset": 0, + "slot": "1", + "type": "t_address" + }, + { + "astId": 1652, + "contract": "contracts/LilypadOnChainJobCreator.sol:LilypadOnChainJobCreator", + "label": "canChangeControllerAddress", + "offset": 20, + "slot": "1", + "type": "t_bool" + }, + { + "astId": 138, + "contract": "contracts/LilypadOnChainJobCreator.sol:LilypadOnChainJobCreator", + "label": "_initialized", + "offset": 21, + "slot": "1", + "type": "t_uint8" + }, + { + "astId": 141, + "contract": "contracts/LilypadOnChainJobCreator.sol:LilypadOnChainJobCreator", + "label": "_initializing", + "offset": 22, + "slot": "1", + "type": "t_bool" + }, + { + "astId": 3783, + "contract": "contracts/LilypadOnChainJobCreator.sol:LilypadOnChainJobCreator", + "label": "tokenAddress", + "offset": 0, + "slot": "2", + "type": "t_address" + }, + { + "astId": 3786, + "contract": "contracts/LilypadOnChainJobCreator.sol:LilypadOnChainJobCreator", + "label": "tokenContract", + "offset": 0, + "slot": "3", + "type": "t_contract(ILilypadToken)2386" + }, + { + "astId": 3788, + "contract": "contracts/LilypadOnChainJobCreator.sol:LilypadOnChainJobCreator", + "label": "requiredDeposit", + "offset": 0, + "slot": "4", + "type": "t_uint256" + }, + { + "astId": 3790, + "contract": "contracts/LilypadOnChainJobCreator.sol:LilypadOnChainJobCreator", + "label": "nextJobID", + "offset": 0, + "slot": "5", + "type": "t_uint256" + }, + { + "astId": 3795, + "contract": "contracts/LilypadOnChainJobCreator.sol:LilypadOnChainJobCreator", + "label": "jobOffers", + "offset": 0, + "slot": "6", + "type": "t_mapping(t_uint256,t_struct(JobOffer)7017_storage)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_string_storage)dyn_storage": { + "base": "t_string_storage", + "encoding": "dynamic_array", + "label": "string[]", + "numberOfBytes": "32" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_contract(ILilypadToken)2386": { + "encoding": "inplace", + "label": "contract ILilypadToken", + "numberOfBytes": "20" + }, + "t_mapping(t_uint256,t_struct(JobOffer)7017_storage)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => struct SharedStructs.JobOffer)", + "numberOfBytes": "32", + "value": "t_struct(JobOffer)7017_storage" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(JobOffer)7017_storage": { + "encoding": "inplace", + "label": "struct SharedStructs.JobOffer", + "members": [ + { + "astId": 7007, + "contract": "contracts/LilypadOnChainJobCreator.sol:LilypadOnChainJobCreator", + "label": "id", + "offset": 0, + "slot": "0", + "type": "t_uint256" + }, + { + "astId": 7009, + "contract": "contracts/LilypadOnChainJobCreator.sol:LilypadOnChainJobCreator", + "label": "calling_contract", + "offset": 0, + "slot": "1", + "type": "t_address" + }, + { + "astId": 7011, + "contract": "contracts/LilypadOnChainJobCreator.sol:LilypadOnChainJobCreator", + "label": "payee", + "offset": 0, + "slot": "2", + "type": "t_address" + }, + { + "astId": 7013, + "contract": "contracts/LilypadOnChainJobCreator.sol:LilypadOnChainJobCreator", + "label": "module", + "offset": 0, + "slot": "3", + "type": "t_string_storage" + }, + { + "astId": 7016, + "contract": "contracts/LilypadOnChainJobCreator.sol:LilypadOnChainJobCreator", + "label": "inputs", + "offset": 0, + "slot": "4", + "type": "t_array(t_string_storage)dyn_storage" + } + ], + "numberOfBytes": "160" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + } + } + } +} \ No newline at end of file diff --git a/hardhat/deployments/orbit/LilypadPayments.json b/hardhat/deployments/orbit/LilypadPayments.json new file mode 100644 index 00000000..b926eaae --- /dev/null +++ b/hardhat/deployments/orbit/LilypadPayments.json @@ -0,0 +1,762 @@ +{ + "address": "0x2279B7A0a67DB372996a5FaB50D91eAA73d2eBe6", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "dealId", + "type": "string" + }, + { + "indexed": false, + "internalType": "address", + "name": "payee", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "enum LilypadPayments.PaymentReason", + "name": "reason", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "enum LilypadPayments.PaymentDirection", + "name": "direction", + "type": "uint8" + } + ], + "name": "Payment", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + }, + { + "internalType": "address", + "name": "resourceProvider", + "type": "address" + }, + { + "internalType": "address", + "name": "jobCreator", + "type": "address" + }, + { + "internalType": "uint256", + "name": "jobCost", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "paymentCollateral", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "resultsCollateral", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timeoutCollateral", + "type": "uint256" + } + ], + "name": "acceptResult", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + }, + { + "internalType": "address", + "name": "resourceProvider", + "type": "address" + }, + { + "internalType": "uint256", + "name": "resultsCollateral", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timeoutCollateral", + "type": "uint256" + } + ], + "name": "addResult", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + }, + { + "internalType": "address", + "name": "jobCreator", + "type": "address" + }, + { + "internalType": "uint256", + "name": "paymentCollateral", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timeoutCollateral", + "type": "uint256" + } + ], + "name": "agreeJobCreator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + }, + { + "internalType": "address", + "name": "resourceProvider", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timeoutCollateral", + "type": "uint256" + } + ], + "name": "agreeResourceProvider", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + }, + { + "internalType": "address", + "name": "jobCreator", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timeoutCollateral", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "mediationFee", + "type": "uint256" + } + ], + "name": "checkResult", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "disableChangeControllerAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "disableChangeTokenAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getControllerAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getTokenAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_tokenAddress", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + }, + { + "internalType": "address", + "name": "resourceProvider", + "type": "address" + }, + { + "internalType": "address", + "name": "jobCreator", + "type": "address" + }, + { + "internalType": "uint256", + "name": "jobCost", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "paymentCollateral", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "resultsCollateral", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "mediationFee", + "type": "uint256" + } + ], + "name": "mediationAcceptResult", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + }, + { + "internalType": "address", + "name": "resourceProvider", + "type": "address" + }, + { + "internalType": "address", + "name": "jobCreator", + "type": "address" + }, + { + "internalType": "uint256", + "name": "paymentCollateral", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "resultsCollateral", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "mediationFee", + "type": "uint256" + } + ], + "name": "mediationRejectResult", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_controllerAddress", + "type": "address" + } + ], + "name": "setControllerAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_tokenAddress", + "type": "address" + } + ], + "name": "setTokenAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + }, + { + "internalType": "address", + "name": "jobCreator", + "type": "address" + }, + { + "internalType": "uint256", + "name": "paymentCollateral", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timeoutCollateral", + "type": "uint256" + } + ], + "name": "timeoutAgreeRefundJobCreator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + }, + { + "internalType": "address", + "name": "resourceProvider", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timeoutCollateral", + "type": "uint256" + } + ], + "name": "timeoutAgreeRefundResourceProvider", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + }, + { + "internalType": "address", + "name": "resourceProvider", + "type": "address" + }, + { + "internalType": "address", + "name": "jobCreator", + "type": "address" + }, + { + "internalType": "uint256", + "name": "resultsCollateral", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timeoutCollateral", + "type": "uint256" + } + ], + "name": "timeoutJudgeResults", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + }, + { + "internalType": "address", + "name": "resourceProvider", + "type": "address" + }, + { + "internalType": "address", + "name": "jobCreator", + "type": "address" + }, + { + "internalType": "uint256", + "name": "paymentCollateral", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "resultsCollateral", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "mediationFee", + "type": "uint256" + } + ], + "name": "timeoutMediateResult", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + }, + { + "internalType": "address", + "name": "resourceProvider", + "type": "address" + }, + { + "internalType": "address", + "name": "jobCreator", + "type": "address" + }, + { + "internalType": "uint256", + "name": "paymentCollateral", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timeoutCollateral", + "type": "uint256" + } + ], + "name": "timeoutSubmitResults", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x524b6306bca33313133664d1158cdf7252c02d410c4df3b89722d42b6f157342", + "receipt": { + "to": null, + "from": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266", + "contractAddress": "0x2279B7A0a67DB372996a5FaB50D91eAA73d2eBe6", + "transactionIndex": 1, + "gasUsed": "2447502", + "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000020000000000000100000800000000000000000000000000000000400000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000040000000000000000000000000000000008000000000000000200000000000000000000000002000000000000000000020000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xc690ae1117938fa1c31625c9dccbecc66b3ba5c5251395501b61c268e0f0c1ad", + "transactionHash": "0x524b6306bca33313133664d1158cdf7252c02d410c4df3b89722d42b6f157342", + "logs": [ + { + "transactionIndex": 1, + "blockNumber": 28, + "transactionHash": "0x524b6306bca33313133664d1158cdf7252c02d410c4df3b89722d42b6f157342", + "address": "0x2279B7A0a67DB372996a5FaB50D91eAA73d2eBe6", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0xc690ae1117938fa1c31625c9dccbecc66b3ba5c5251395501b61c268e0f0c1ad" + } + ], + "blockNumber": 28, + "cumulativeGasUsed": "2447502", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "06e78eaee1ee101e9b46d15f399432ba", + "metadata": "{\"compiler\":{\"version\":\"0.8.21+commit.d9974bed\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"payee\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"enum LilypadPayments.PaymentReason\",\"name\":\"reason\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"enum LilypadPayments.PaymentDirection\",\"name\":\"direction\",\"type\":\"uint8\"}],\"name\":\"Payment\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"resourceProvider\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"jobCreator\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"jobCost\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"paymentCollateral\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"resultsCollateral\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timeoutCollateral\",\"type\":\"uint256\"}],\"name\":\"acceptResult\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"resourceProvider\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"resultsCollateral\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timeoutCollateral\",\"type\":\"uint256\"}],\"name\":\"addResult\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"jobCreator\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"paymentCollateral\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timeoutCollateral\",\"type\":\"uint256\"}],\"name\":\"agreeJobCreator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"resourceProvider\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"timeoutCollateral\",\"type\":\"uint256\"}],\"name\":\"agreeResourceProvider\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"jobCreator\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"timeoutCollateral\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"mediationFee\",\"type\":\"uint256\"}],\"name\":\"checkResult\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"disableChangeControllerAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"disableChangeTokenAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getControllerAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTokenAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_tokenAddress\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"resourceProvider\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"jobCreator\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"jobCost\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"paymentCollateral\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"resultsCollateral\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"mediationFee\",\"type\":\"uint256\"}],\"name\":\"mediationAcceptResult\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"resourceProvider\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"jobCreator\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"paymentCollateral\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"resultsCollateral\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"mediationFee\",\"type\":\"uint256\"}],\"name\":\"mediationRejectResult\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_controllerAddress\",\"type\":\"address\"}],\"name\":\"setControllerAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_tokenAddress\",\"type\":\"address\"}],\"name\":\"setTokenAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"jobCreator\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"paymentCollateral\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timeoutCollateral\",\"type\":\"uint256\"}],\"name\":\"timeoutAgreeRefundJobCreator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"resourceProvider\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"timeoutCollateral\",\"type\":\"uint256\"}],\"name\":\"timeoutAgreeRefundResourceProvider\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"resourceProvider\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"jobCreator\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"resultsCollateral\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timeoutCollateral\",\"type\":\"uint256\"}],\"name\":\"timeoutJudgeResults\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"resourceProvider\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"jobCreator\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"paymentCollateral\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"resultsCollateral\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"mediationFee\",\"type\":\"uint256\"}],\"name\":\"timeoutMediateResult\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"resourceProvider\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"jobCreator\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"paymentCollateral\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timeoutCollateral\",\"type\":\"uint256\"}],\"name\":\"timeoutSubmitResults\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"}},\"kind\":\"dev\",\"methods\":{\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"events\":{\"Payment(string,address,uint256,uint8,uint8)\":{\"notice\":\"Events\"}},\"kind\":\"user\",\"methods\":{\"addResult(string,address,uint256,uint256)\":{\"notice\":\"Results\"},\"agreeResourceProvider(string,address,uint256)\":{\"notice\":\"Agreements\"},\"mediationAcceptResult(string,address,address,uint256,uint256,uint256,uint256)\":{\"notice\":\"Mediation\"},\"timeoutAgreeRefundResourceProvider(string,address,uint256)\":{\"notice\":\"Timeouts\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/LilypadPayments.sol\":\"LilypadPayments\"},\"evmVersion\":\"shanghai\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized != type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x9c80f545915582e63fe206c6ce27cbe85a86fc10b9cd2a0e8c9488fb7c2ee422\",\"license\":\"MIT\"},\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor() {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby disabling any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xba43b97fba0d32eb4254f6a5a297b39a19a247082a02d6e69349e071e2946218\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"contracts/ControllerOwnable.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\npragma solidity ^0.8.6;\\n\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\n\\n// as well as being ownable (i.e. our admin wallet)\\n// this contract has a modifier called onlyController\\n// it works the same way as Ownable but only the Owner\\n// can change the controller address so it gives us a way of\\n// re-pointing contracts if needed\\ncontract ControllerOwnable is Ownable {\\n\\n // the address of the controller that is allowed to call functions\\n address private controllerAddress;\\n\\n // used to \\\"freeze\\\" the controller address - even the admin cannot\\n // change it from this point onwards\\n bool private canChangeControllerAddress = true;\\n\\n modifier onlyController() {\\n _checkControllerAccess();\\n _;\\n }\\n\\n function _checkControllerAccess() internal view virtual returns (bool) {\\n require(controllerAddress != address(0), \\\"ControllerOwnable: Controller address must be defined\\\");\\n require(_msgSender() == controllerAddress, \\\"ControllerOwnable: Only the controller can call this method\\\");\\n return true;\\n }\\n\\n function setControllerAddress(address _controllerAddress) public onlyOwner {\\n require(_controllerAddress != address(0), \\\"ControllerOwnable: Controller address must be defined\\\");\\n require(canChangeControllerAddress, \\\"ControllerOwnable: canChangeControllerAddress is disabled\\\");\\n controllerAddress = _controllerAddress;\\n }\\n\\n function getControllerAddress() public view returns (address) {\\n return controllerAddress;\\n }\\n\\n function disableChangeControllerAddress() public onlyOwner {\\n canChangeControllerAddress = false;\\n }\\n}\\n\",\"keccak256\":\"0xecfd8b0beb12340f51cefee5e121932fa7aee0a41fb7d0233966419d153ef429\",\"license\":\"Apache-2.0\"},\"contracts/ILilypadPayments.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\npragma solidity ^0.8.6;\\n\\ninterface ILilypadPayments {\\n\\n /**\\n * Init\\n */\\n\\n function setTokenAddress(\\n address _tokenAddress\\n ) external;\\n\\n /**\\n * Agreements\\n */\\n function agreeResourceProvider(\\n string memory dealId,\\n address resourceProvider,\\n uint256 timeoutCollateral\\n ) external;\\n\\n function agreeJobCreator(\\n string memory dealId,\\n address jobCreator,\\n uint256 paymentCollateral,\\n uint256 timeoutCollateral\\n ) external;\\n\\n /**\\n * Results\\n */\\n\\n function addResult(\\n string memory dealId,\\n address resourceProvider,\\n uint256 resultsCollateral,\\n uint256 timeoutCollateral\\n ) external;\\n\\n function acceptResult(\\n string memory dealId,\\n address resourceProvider,\\n address jobCreator,\\n uint256 jobCost,\\n uint256 paymentCollateral,\\n uint256 resultsCollateral,\\n uint256 timeoutCollateral\\n ) external;\\n\\n function checkResult(\\n string memory dealId,\\n address jobCreator,\\n uint256 timeoutCollateral,\\n uint256 mediationFee\\n ) external;\\n\\n /**\\n * Mediation\\n */\\n\\n function mediationAcceptResult(\\n string memory dealId,\\n address resourceProvider,\\n address jobCreator,\\n uint256 jobCost,\\n uint256 paymentCollateral,\\n uint256 resultsCollateral,\\n uint256 mediationFee\\n ) external;\\n\\n function mediationRejectResult(\\n string memory dealId,\\n address resourceProvider,\\n address jobCreator,\\n uint256 paymentCollateral,\\n uint256 resultsCollateral,\\n uint256 mediationFee\\n ) external;\\n\\n /**\\n * Timeouts\\n */\\n\\n function timeoutAgreeRefundResourceProvider(\\n string memory dealId,\\n address resourceProvider,\\n uint256 timeoutCollateral\\n ) external;\\n\\n function timeoutAgreeRefundJobCreator(\\n string memory dealId,\\n address jobCreator,\\n uint256 paymentCollateral,\\n uint256 timeoutCollateral\\n ) external;\\n\\n function timeoutSubmitResult(\\n string memory dealId,\\n address resourceProvider,\\n address jobCreator,\\n uint256 paymentCollateral,\\n uint256 timeoutCollateral\\n ) external;\\n\\n function timeoutJudgeResult(\\n string memory dealId,\\n address resourceProvider,\\n address jobCreator,\\n uint256 resultsCollateral,\\n uint256 timeoutCollateral\\n ) external;\\n\\n function timeoutMediateResult(\\n string memory dealId,\\n address resourceProvider,\\n address jobCreator,\\n uint256 paymentCollateral,\\n uint256 resultsCollateral,\\n uint256 mediationFee\\n ) external;\\n \\n}\\n\",\"keccak256\":\"0x5b3ea3fa7c4d031fccf44098eafa82cfd79d8358b2feb0c2057fd907b85df7d0\",\"license\":\"Apache-2.0\"},\"contracts/ILilypadToken.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\npragma solidity ^0.8.6;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\ninterface ILilypadToken is IERC20 {\\n function escrowBalanceOf(\\n address _address\\n ) external returns (uint256);\\n\\n function payEscrow(\\n uint256 amount\\n ) external returns (bool);\\n\\n function refundEscrow(\\n address toAddress,\\n uint256 amount\\n ) external returns (bool);\\n\\n function payJob(\\n address fromAddress,\\n address toAddress,\\n uint256 amount\\n ) external returns (bool);\\n\\n function slashEscrow(\\n address slashedAddress,\\n uint256 amount\\n ) external returns (bool);\\n}\\n\",\"keccak256\":\"0xefae0a5923d57a0e20166dd5542a566a8752d0a015287302dbbeddd0386ee9ad\",\"license\":\"Apache-2.0\"},\"contracts/LilypadPayments.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\npragma solidity ^0.8.6;\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport \\\"./ILilypadToken.sol\\\";\\nimport \\\"./ControllerOwnable.sol\\\";\\nimport \\\"./ILilypadPayments.sol\\\";\\n\\n// import \\\"@openzeppelin/contracts/utils/Strings.sol\\\";\\n// import \\\"hardhat/console.sol\\\";\\n// console.log(\\\"ensureDeal\\\");\\n// console.log(Strings.toString(uint256(SharedStructs.AgreementState.DealNegotiating)));\\n// console.log(Strings.toString(uint256(agreements[dealId].state)));\\n\\ncontract LilypadPayments is ControllerOwnable, Initializable {\\n\\n /**\\n * Types\\n */\\n\\n // the address of the LilypadToken contract\\n address private tokenAddress;\\n ILilypadToken private tokenContract;\\n\\n // used to cut off upgrades for the remote contract\\n bool private canChangeTokenAddress = true;\\n\\n /**\\n * Enums\\n */\\n enum PaymentReason {\\n\\n // the money the JC puts up to pay for the job\\n PaymentCollateral,\\n\\n // the money the RP puts up to attest it's results are correct\\n ResultsCollateral,\\n\\n // the money the RP, JC and Mediator all put up to prevent timeouts\\n TimeoutCollateral,\\n\\n // the money the RP gets paid for the job for running it successfully\\n JobPayment,\\n\\n // the money the JC pays the mediator for resolving a dispute\\n MediationFee\\n }\\n\\n enum PaymentDirection {\\n\\n // money flowing into the contract\\n // i.e. we GET paid\\n PaidIn,\\n\\n // money paid out to services\\n // i.e. we are PAYING\\n PaidOut,\\n\\n // collateral that is locked up being refunded\\n Refunded,\\n \\n // collateral that is locked up being slashed\\n Slashed\\n }\\n\\n /**\\n * Events\\n */\\n event Payment(\\n string dealId,\\n address payee,\\n uint256 amount,\\n PaymentReason reason,\\n PaymentDirection direction\\n );\\n\\n /**\\n * Init\\n */\\n\\n // used for debugging\\n mapping(address => string) private accountNames;\\n\\n // https://docs.openzeppelin.com/upgrades-plugins/1.x/writing-upgradeable\\n function initialize(\\n address _tokenAddress\\n ) public initializer {\\n setTokenAddress(_tokenAddress);\\n\\n // this is only for debugging\\n // accountNames[address(0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266)] = \\\"admin\\\";\\n // accountNames[address(0x70997970C51812dc3A010C7d01b50e0d17dc79C8)] = \\\"faucet\\\";\\n // accountNames[address(0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC)] = \\\"solver\\\";\\n // accountNames[address(0x90F79bf6EB2c4f870365E785982E1f101E93b906)] = \\\"mediator\\\";\\n // accountNames[address(0x15d34AAf54267DB7D7c367839AAf71A00a2C6A65)] = \\\"resource_provider\\\";\\n // accountNames[address(0x9965507D1a55bcC2695C58ba16FB37d819B0A4dc)] = \\\"job_creator\\\";\\n // accountNames[address(0x976EA74026E726554dB657fA54763abd0C3a0aa9)] = \\\"directory\\\";\\n }\\n\\n // the LilypadToken we are calling payinEscrow and payoutEscrow on\\n function setTokenAddress(address _tokenAddress) public onlyOwner {\\n require(_tokenAddress != address(0), \\\"LilepadPayments: Token address must be defined\\\");\\n require(canChangeTokenAddress, \\\"LilypadToken: canChangeTokenAddress is disabled\\\");\\n tokenAddress = _tokenAddress;\\n tokenContract = ILilypadToken(_tokenAddress);\\n }\\n\\n function getTokenAddress() public view returns(address) {\\n return tokenAddress;\\n }\\n\\n // set for canChangePaymentsAddress\\n function disableChangeTokenAddress() public onlyOwner {\\n canChangeTokenAddress = false;\\n }\\n\\n /**\\n * Controller handlers\\n * \\n * these methods are called by the controller to wrap various payment\\n * scenarios - hence they are all onlyOwner\\n */\\n\\n /**\\n * Agreements\\n */\\n\\n // * pay in the timeout collateral\\n function agreeResourceProvider(\\n string memory dealId,\\n address resourceProvider,\\n uint256 timeoutCollateral\\n ) public onlyController {\\n // we check this here to double check who we are about to charge (the RP)\\n // is who signed the TX and so we can take the money\\n require(tx.origin == resourceProvider, \\\"LilypadPayments: Can only be called by the RP\\\");\\n _payEscrow(\\n dealId,\\n timeoutCollateral,\\n PaymentReason.TimeoutCollateral\\n );\\n }\\n\\n // * pay in the payment collateral and timeout collateral\\n function agreeJobCreator(\\n string memory dealId,\\n address jobCreator,\\n uint256 paymentCollateral,\\n uint256 timeoutCollateral\\n ) public onlyController {\\n require(tx.origin == jobCreator, \\\"LilypadPayments: Can only be called by the JC\\\");\\n _payEscrow(\\n dealId,\\n paymentCollateral,\\n PaymentReason.PaymentCollateral\\n );\\n _payEscrow(\\n dealId,\\n timeoutCollateral,\\n PaymentReason.TimeoutCollateral\\n );\\n }\\n\\n /**\\n * Results\\n */\\n\\n // * pay back the timeout collateral\\n // * pay in the results collateral\\n function addResult(\\n string memory dealId,\\n address resourceProvider,\\n uint256 resultsCollateral,\\n uint256 timeoutCollateral\\n ) public onlyController {\\n require(tx.origin == resourceProvider, \\\"LilypadPayments: Can only be called by the RP\\\");\\n _payEscrow(\\n dealId,\\n resultsCollateral,\\n PaymentReason.ResultsCollateral\\n );\\n _refundEscrow(\\n dealId,\\n resourceProvider,\\n timeoutCollateral,\\n PaymentReason.TimeoutCollateral\\n );\\n }\\n\\n // * pay the RP the job cost\\n // * refund the RP the results collateral\\n // * refund the JC the job collateral minus the job cost\\n // * refund the JC the timeout collateral\\n function acceptResult(\\n string memory dealId,\\n address resourceProvider,\\n address jobCreator,\\n uint256 jobCost,\\n uint256 paymentCollateral,\\n uint256 resultsCollateral,\\n uint256 timeoutCollateral\\n ) public onlyController {\\n require(tx.origin == jobCreator, \\\"LilypadPayments: Can only be called by the JC\\\");\\n\\n // what if the final job cost is more than the payment collateral?\\n // well - we have to cap the job cost at that collateral\\n // true - the RP has lost money but they agreed to the deal\\n uint256 actualPayment = jobCost;\\n uint256 jcRefund = 0;\\n if(jobCost > paymentCollateral) {\\n actualPayment = paymentCollateral;\\n } else {\\n jcRefund = paymentCollateral - jobCost;\\n }\\n\\n // pay the RP the actualPayment\\n _payOut(\\n dealId,\\n jobCreator,\\n resourceProvider,\\n actualPayment,\\n PaymentReason.JobPayment\\n );\\n\\n // if the job cost more than the payment collateral then we shold not go negative\\n // otherwise we are paying out more than the JC has put in\\n //\\n // the RP is loosing out a bit here but they agreed to doing the job\\n if(jcRefund > 0) {\\n _refundEscrow(\\n dealId,\\n jobCreator,\\n jcRefund,\\n PaymentReason.PaymentCollateral\\n );\\n }\\n\\n // refund the JC timeout collateral\\n _refundEscrow(\\n dealId,\\n jobCreator,\\n timeoutCollateral,\\n PaymentReason.TimeoutCollateral\\n );\\n\\n // refund the RP results collateral\\n _refundEscrow(\\n dealId,\\n resourceProvider,\\n resultsCollateral,\\n PaymentReason.ResultsCollateral\\n );\\n }\\n\\n // * charge the JC the mediation fee\\n // * refund the JC the timeout collateral\\n function checkResult(\\n string memory dealId,\\n address jobCreator,\\n uint256 timeoutCollateral,\\n uint256 mediationFee\\n ) public onlyController {\\n require(tx.origin == jobCreator, \\\"LilypadPayments: Can only be called by the JC\\\");\\n \\n // the refund of the timeout collateral\\n _refundEscrow(\\n dealId,\\n jobCreator,\\n timeoutCollateral,\\n PaymentReason.TimeoutCollateral\\n );\\n\\n // the payment of the mediation fee\\n _payEscrow(\\n dealId,\\n mediationFee,\\n PaymentReason.MediationFee\\n );\\n }\\n\\n /**\\n * Mediation\\n */\\n\\n // * pay the RP the job cost\\n // * refund the RP the results collateral\\n // * refund the JC the job collateral minus the job cost\\n // * pay the mediator for mediating\\n function mediationAcceptResult(\\n string memory dealId,\\n address resourceProvider,\\n address jobCreator,\\n uint256 jobCost,\\n uint256 paymentCollateral,\\n uint256 resultsCollateral,\\n uint256 mediationFee\\n ) public onlyController {\\n uint256 actualPayment = jobCost;\\n uint256 jcRefund = 0;\\n if(jobCost > paymentCollateral) {\\n actualPayment = paymentCollateral;\\n } else {\\n jcRefund = paymentCollateral - jobCost;\\n }\\n \\n // pay the RP the job cost from the JC\\n _payOut(\\n dealId,\\n jobCreator,\\n resourceProvider,\\n actualPayment,\\n PaymentReason.JobPayment\\n );\\n\\n // pay the mediator the fee from the JC\\n _payOut(\\n dealId,\\n jobCreator,\\n tx.origin,\\n mediationFee,\\n PaymentReason.MediationFee\\n );\\n\\n // if the job cost more than the payment collateral then we shold not go negative\\n // otherwise we are paying out more than the JC has put in\\n //\\n // the RP is loosing out a bit here but they agreed to doing the job\\n if(jcRefund > 0) {\\n\\n // refund the JC the diff between payment collateral and job cost\\n _refundEscrow(\\n dealId,\\n jobCreator,\\n jcRefund,\\n PaymentReason.PaymentCollateral\\n );\\n }\\n\\n // refund the RP the results collateral\\n _refundEscrow(\\n dealId,\\n resourceProvider,\\n resultsCollateral,\\n PaymentReason.ResultsCollateral\\n );\\n }\\n\\n // * refund the JC their payment collateral\\n // * slash the RP's results collateral\\n // * pay the mediator for mediating\\n function mediationRejectResult(\\n string memory dealId,\\n address resourceProvider,\\n address jobCreator,\\n uint256 paymentCollateral,\\n uint256 resultsCollateral,\\n uint256 mediationFee\\n ) public onlyController {\\n // refund the JC their payment collateral\\n _refundEscrow(\\n dealId,\\n jobCreator,\\n paymentCollateral,\\n PaymentReason.PaymentCollateral\\n );\\n\\n // pay the mediator the fee from the JC\\n _payOut(\\n dealId,\\n jobCreator,\\n tx.origin,\\n mediationFee,\\n PaymentReason.MediationFee\\n );\\n\\n // slash the RP\\n _slashEscrow(\\n dealId,\\n resourceProvider,\\n resultsCollateral,\\n PaymentReason.ResultsCollateral\\n );\\n }\\n\\n /**\\n * Timeouts\\n */\\n function timeoutAgreeRefundResourceProvider(\\n string memory dealId,\\n address resourceProvider,\\n uint256 timeoutCollateral\\n ) public onlyController {\\n require(tx.origin == resourceProvider, \\\"LilypadPayments: Can only be called by the RP\\\");\\n // the refund of the job collateral to the JC\\n _refundEscrow(\\n dealId,\\n resourceProvider,\\n timeoutCollateral,\\n PaymentReason.TimeoutCollateral\\n );\\n }\\n\\n function timeoutAgreeRefundJobCreator(\\n string memory dealId,\\n address jobCreator,\\n uint256 paymentCollateral,\\n uint256 timeoutCollateral\\n ) public onlyController {\\n require(tx.origin == jobCreator, \\\"LilypadPayments: Can only be called by the JC\\\");\\n // the refund of the job collateral to the JC\\n _refundEscrow(\\n dealId,\\n jobCreator,\\n paymentCollateral,\\n PaymentReason.PaymentCollateral\\n );\\n\\n // the refund of the job collateral to the JC\\n _refundEscrow(\\n dealId,\\n jobCreator,\\n timeoutCollateral,\\n PaymentReason.TimeoutCollateral\\n );\\n }\\n\\n // * pay back the JC's job collateral\\n // * pay back the JC's timeout collateral\\n // * slash the RP's results collateral\\n function timeoutSubmitResults(\\n string memory dealId,\\n address resourceProvider,\\n address jobCreator,\\n uint256 paymentCollateral,\\n uint256 timeoutCollateral\\n ) public onlyController {\\n require(tx.origin == jobCreator, \\\"LilypadPayments: Can only be called by the JC\\\");\\n // the refund of the job collateral to the JC\\n _refundEscrow(\\n dealId,\\n jobCreator,\\n paymentCollateral,\\n PaymentReason.PaymentCollateral\\n );\\n\\n // the refund of the job collateral to the JC\\n _refundEscrow(\\n dealId,\\n jobCreator,\\n timeoutCollateral,\\n PaymentReason.TimeoutCollateral\\n );\\n \\n // the slashing of the timeout collateral for the RP\\n _slashEscrow(\\n dealId,\\n resourceProvider,\\n timeoutCollateral,\\n PaymentReason.TimeoutCollateral\\n );\\n }\\n\\n // * pay back the RP's results collateral\\n // * pay the RP the cost of the job\\n // * slash the JC's timeout collateral\\n // * slash the JC's job collateral\\n function timeoutJudgeResults(\\n string memory dealId,\\n address resourceProvider,\\n address jobCreator,\\n uint256 resultsCollateral,\\n uint256 timeoutCollateral\\n ) public onlyController {\\n require(tx.origin == resourceProvider, \\\"LilypadPayments: Can only be called by the RP\\\");\\n // the refund of the results collateral to the RP\\n _refundEscrow(\\n dealId,\\n resourceProvider,\\n resultsCollateral,\\n PaymentReason.ResultsCollateral\\n );\\n\\n // the slashing of the timeout collateral for the RP\\n _slashEscrow(\\n dealId,\\n jobCreator,\\n timeoutCollateral,\\n PaymentReason.TimeoutCollateral\\n );\\n }\\n\\n // * pay back the RP's results collateral\\n // * pay back the JC's payment collateral\\n // * pay back the JC's mediation fee\\n function timeoutMediateResult(\\n string memory dealId,\\n address resourceProvider,\\n address jobCreator,\\n uint256 paymentCollateral,\\n uint256 resultsCollateral,\\n uint256 mediationFee\\n ) public onlyController {\\n require(tx.origin == resourceProvider || tx.origin == jobCreator, \\\"LilypadPayments: Can only be called by the RP or JC\\\");\\n // the refund of the results collateral to the RP\\n _refundEscrow(\\n dealId,\\n resourceProvider,\\n resultsCollateral,\\n PaymentReason.ResultsCollateral\\n );\\n\\n // the refund of the payment collateral to the JC\\n _refundEscrow(\\n dealId,\\n jobCreator,\\n paymentCollateral,\\n PaymentReason.PaymentCollateral\\n );\\n\\n // the refund of the mediation fee to the JC\\n _refundEscrow(\\n dealId,\\n jobCreator,\\n mediationFee,\\n PaymentReason.MediationFee\\n );\\n }\\n\\n /**\\n * Payment utils\\n */\\n\\n\\n function _payEscrow(\\n string memory dealId,\\n uint256 amount,\\n PaymentReason reason\\n ) private {\\n // we check they have that much in their token balance before moving to tokens to us\\n require(tokenContract.balanceOf(tx.origin) >= amount, \\\"LilypadPayments: Insufficient balance\\\");\\n\\n // console.log(\\\"_payEscrow\\\");\\n // console.log(accountNames[tx.origin]);\\n // console.log(amount);\\n\\n bool success = tokenContract.payEscrow(amount);\\n require(success, \\\"LilypadPayments: Pay escrow failed\\\");\\n\\n emit Payment(\\n dealId,\\n tx.origin,\\n amount,\\n reason,\\n PaymentDirection.PaidIn\\n );\\n }\\n\\n function _refundEscrow(\\n string memory dealId,\\n address toAddress,\\n uint256 amount,\\n PaymentReason reason\\n ) private {\\n // console.log(\\\"_refundEscrow\\\");\\n // console.log(accountNames[toAddress]);\\n // console.log(amount);\\n\\n bool success = tokenContract.refundEscrow(toAddress, amount);\\n require(success, \\\"LilypadPayments: Refund escrow failed\\\");\\n\\n emit Payment(\\n dealId,\\n toAddress,\\n amount,\\n reason,\\n PaymentDirection.Refunded\\n );\\n }\\n\\n function _payOut(\\n string memory dealId,\\n address fromAddress,\\n address toAddress,\\n uint256 amount,\\n PaymentReason reason\\n ) private {\\n // console.log(\\\"_payJob\\\");\\n // console.log(accountNames[fromAddress]);\\n // console.log(accountNames[toAddress]);\\n // console.log(amount);\\n\\n bool success = tokenContract.payJob(fromAddress, toAddress, amount);\\n require(success, \\\"LilypadPayments: Pay job failed\\\");\\n\\n emit Payment(\\n dealId,\\n toAddress,\\n amount,\\n reason,\\n PaymentDirection.PaidOut\\n );\\n }\\n\\n function _slashEscrow(\\n string memory dealId,\\n address slashedAddress,\\n uint256 amount,\\n PaymentReason reason\\n ) private {\\n // console.log(\\\"_slashEscrow\\\");\\n // console.log(accountNames[slashedAddress]);\\n // console.log(amount);\\n\\n bool success = tokenContract.slashEscrow(slashedAddress, amount);\\n require(success, \\\"LilypadPayments: Slash escrow failed\\\");\\n\\n emit Payment(\\n dealId,\\n slashedAddress,\\n amount,\\n reason,\\n PaymentDirection.Slashed\\n );\\n }\\n}\\n\",\"keccak256\":\"0x2967897646a0393955b571bef9b659cdeca6fb4eff85330ac0eb027f08ef981c\",\"license\":\"Apache-2.0\"}},\"version\":1}", + "bytecode": "0x608060405260018060146101000a81548160ff0219169083151502179055506001600360146101000a81548160ff02191690831515021790555034801562000045575f80fd5b50620000666200005a6200006c60201b60201c565b6200007360201b60201c565b62000134565b5f33905090565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6128c080620001425f395ff3fe608060405234801561000f575f80fd5b5060043610610140575f3560e01c80639e3868dc116100b6578063b91880351161007a578063b9188035146102d2578063c4d66de8146102ee578063c57380a21461030a578063d2485cce14610328578063f2fde38b14610344578063f3d3d4481461036057610140565b80639e3868dc14610258578063a470295814610274578063aea382511461027e578063afe1dff71461029a578063b1356714146102b657610140565b80632a1f9072116101085780632a1f9072146101d257806338698529146101ee5780634bc28da11461020a578063715018a614610214578063823f3de11461021e5780638da5cb5b1461023a57610140565b806302fd8f801461014457806309cab510146101605780630ef0d89e1461017c57806310fe9ae81461019857806326a4e8d2146101b6575b5f80fd5b61015e60048036038101906101599190611951565b61037c565b005b61017a600480360381019061017591906119e4565b610420565b005b61019660048036038101906101919190611a64565b6104b6565b005b6101a061053f565b6040516101ad9190611adf565b60405180910390f35b6101d060048036038101906101cb9190611af8565b610567565b005b6101ec60048036038101906101e79190611b23565b6106af565b005b61020860048036038101906102039190611951565b610725565b005b6102126107bd565b005b61021c6107e1565b005b61023860048036038101906102339190611bdc565b6107f4565b005b6102426108cf565b60405161024f9190611adf565b60405180910390f35b610272600480360381019061026d9190611a64565b6108f6565b005b61027c61097e565b005b610298600480360381019061029391906119e4565b6109a2565b005b6102b460048036038101906102af91906119e4565b610a38565b005b6102d060048036038101906102cb9190611b23565b610ace565b005b6102ec60048036038101906102e791906119e4565b610bb1565b005b61030860048036038101906103039190611af8565b610c45565b005b610312610d86565b60405161031f9190611adf565b60405180910390f35b610342600480360381019061033d9190611bdc565b610dae565b005b61035e60048036038101906103599190611af8565b610de6565b005b61037a60048036038101906103759190611af8565b610e68565b005b610384610f70565b508273ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff16146103f3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103ea90611d01565b60405180910390fd5b6103ff8584845f61109d565b61040c858483600261109d565b61041985858360026111c3565b5050505050565b610428610f70565b508273ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614610497576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161048e90611d8f565b60405180910390fd5b6104a3848360016112e9565b6104b0848483600261109d565b50505050565b6104be610f70565b508173ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff161461052d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161052490611d8f565b60405180910390fd5b61053a838383600261109d565b505050565b5f60025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b61056f6114e6565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036105dd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105d490611e1d565b60405180910390fd5b600360149054906101000a900460ff1661062c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062390611eab565b60405180910390fd5b8060025f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508060035f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6106b7610f70565b505f8490505f848611156106cd578491506106dc565b85856106d99190611ef6565b90505b6106ea89888a856003611564565b6106f8898832866004611564565b5f81111561070d5761070c8988835f61109d565b5b61071a898986600161109d565b505050505050505050565b61072d610f70565b508373ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff161461079c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161079390611d8f565b60405180910390fd5b6107a9858584600161109d565b6107b685848360026111c3565b5050505050565b6107c56114e6565b5f600360146101000a81548160ff021916908315150217905550565b6107e96114e6565b6107f25f61168d565b565b6107fc610f70565b508473ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff16148061086257508373ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff16145b6108a1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161089890611f99565b60405180910390fd5b6108ae868684600161109d565b6108ba8685855f61109d565b6108c7868583600461109d565b505050505050565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6108fe610f70565b508173ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff161461096d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161096490611d8f565b60405180910390fd5b610979838260026112e9565b505050565b6109866114e6565b5f600160146101000a81548160ff021916908315150217905550565b6109aa610f70565b508273ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614610a19576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a1090611d01565b60405180910390fd5b610a26848484600261109d565b610a32848260046112e9565b50505050565b610a40610f70565b508273ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614610aaf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610aa690611d01565b60405180910390fd5b610abb8484845f61109d565b610ac8848483600261109d565b50505050565b610ad6610f70565b508473ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614610b45576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b3c90611d01565b60405180910390fd5b5f8490505f84861115610b5a57849150610b69565b8585610b669190611ef6565b90505b610b7789888a856003611564565b5f811115610b8c57610b8b8988835f61109d565b5b610b99898885600261109d565b610ba6898986600161109d565b505050505050505050565b610bb9610f70565b508273ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614610c28576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c1f90611d01565b60405180910390fd5b610c3384835f6112e9565b610c3f848260026112e9565b50505050565b5f600160169054906101000a900460ff16159050808015610c77575060018060159054906101000a900460ff1660ff16105b80610ca55750610c863061174e565b158015610ca4575060018060159054906101000a900460ff1660ff16145b5b610ce4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cdb90612027565b60405180910390fd5b60018060156101000a81548160ff021916908360ff1602179055508015610d205760018060166101000a81548160ff0219169083151502179055505b610d2982610567565b8015610d82575f600160166101000a81548160ff0219169083151502179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024986001604051610d799190612093565b60405180910390a15b5050565b5f60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610db6610f70565b50610dc38685855f61109d565b610dd1868532846004611564565b610dde86868460016111c3565b505050505050565b610dee6114e6565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610e5c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e539061211c565b60405180910390fd5b610e658161168d565b50565b610e706114e6565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610ede576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ed5906121aa565b60405180910390fd5b600160149054906101000a900460ff16610f2d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f2490612238565b60405180910390fd5b8060015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b5f8073ffffffffffffffffffffffffffffffffffffffff1660015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603611000576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ff7906121aa565b60405180910390fd5b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611040611770565b73ffffffffffffffffffffffffffffffffffffffff1614611096576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161108d906122c6565b60405180910390fd5b6001905090565b5f60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663599efa6b85856040518363ffffffff1660e01b81526004016110fa9291906122f3565b6020604051808303815f875af1158015611116573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061113a919061234f565b90508061117c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611173906123ea565b60405180910390fd5b7f64861f505d0cfce7a0cc3629c70eb54f7de27be35939b48300935694958a98428585858560026040516111b495949392919061252b565b60405180910390a15050505050565b5f60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166388c2bdfe85856040518363ffffffff1660e01b81526004016112209291906122f3565b6020604051808303815f875af115801561123c573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611260919061234f565b9050806112a2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611299906125f3565b60405180910390fd5b7f64861f505d0cfce7a0cc3629c70eb54f7de27be35939b48300935694958a98428585858560036040516112da95949392919061252b565b60405180910390a15050505050565b8160035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231326040518263ffffffff1660e01b81526004016113449190611adf565b602060405180830381865afa15801561135f573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906113839190612625565b10156113c4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113bb906126c0565b60405180910390fd5b5f60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635407e93c846040518263ffffffff1660e01b815260040161141f91906126de565b6020604051808303815f875af115801561143b573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061145f919061234f565b9050806114a1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161149890612767565b60405180910390fd5b7f64861f505d0cfce7a0cc3629c70eb54f7de27be35939b48300935694958a9842843285855f6040516114d895949392919061252b565b60405180910390a150505050565b6114ee611770565b73ffffffffffffffffffffffffffffffffffffffff1661150c6108cf565b73ffffffffffffffffffffffffffffffffffffffff1614611562576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611559906127cf565b60405180910390fd5b565b5f60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663065e86c88686866040518463ffffffff1660e01b81526004016115c3939291906127ed565b6020604051808303815f875af11580156115df573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611603919061234f565b905080611645576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161163c9061286c565b60405180910390fd5b7f64861f505d0cfce7a0cc3629c70eb54f7de27be35939b48300935694958a984286858585600160405161167d95949392919061252b565b60405180910390a1505050505050565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b5f33905090565b5f604051905090565b5f80fd5b5f80fd5b5f80fd5b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6117d682611790565b810181811067ffffffffffffffff821117156117f5576117f46117a0565b5b80604052505050565b5f611807611777565b905061181382826117cd565b919050565b5f67ffffffffffffffff821115611832576118316117a0565b5b61183b82611790565b9050602081019050919050565b828183375f83830152505050565b5f61186861186384611818565b6117fe565b9050828152602081018484840111156118845761188361178c565b5b61188f848285611848565b509392505050565b5f82601f8301126118ab576118aa611788565b5b81356118bb848260208601611856565b91505092915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6118ed826118c4565b9050919050565b6118fd816118e3565b8114611907575f80fd5b50565b5f81359050611918816118f4565b92915050565b5f819050919050565b6119308161191e565b811461193a575f80fd5b50565b5f8135905061194b81611927565b92915050565b5f805f805f60a0868803121561196a57611969611780565b5b5f86013567ffffffffffffffff81111561198757611986611784565b5b61199388828901611897565b95505060206119a48882890161190a565b94505060406119b58882890161190a565b93505060606119c68882890161193d565b92505060806119d78882890161193d565b9150509295509295909350565b5f805f80608085870312156119fc576119fb611780565b5b5f85013567ffffffffffffffff811115611a1957611a18611784565b5b611a2587828801611897565b9450506020611a368782880161190a565b9350506040611a478782880161193d565b9250506060611a588782880161193d565b91505092959194509250565b5f805f60608486031215611a7b57611a7a611780565b5b5f84013567ffffffffffffffff811115611a9857611a97611784565b5b611aa486828701611897565b9350506020611ab58682870161190a565b9250506040611ac68682870161193d565b9150509250925092565b611ad9816118e3565b82525050565b5f602082019050611af25f830184611ad0565b92915050565b5f60208284031215611b0d57611b0c611780565b5b5f611b1a8482850161190a565b91505092915050565b5f805f805f805f60e0888a031215611b3e57611b3d611780565b5b5f88013567ffffffffffffffff811115611b5b57611b5a611784565b5b611b678a828b01611897565b9750506020611b788a828b0161190a565b9650506040611b898a828b0161190a565b9550506060611b9a8a828b0161193d565b9450506080611bab8a828b0161193d565b93505060a0611bbc8a828b0161193d565b92505060c0611bcd8a828b0161193d565b91505092959891949750929550565b5f805f805f8060c08789031215611bf657611bf5611780565b5b5f87013567ffffffffffffffff811115611c1357611c12611784565b5b611c1f89828a01611897565b9650506020611c3089828a0161190a565b9550506040611c4189828a0161190a565b9450506060611c5289828a0161193d565b9350506080611c6389828a0161193d565b92505060a0611c7489828a0161193d565b9150509295509295509295565b5f82825260208201905092915050565b7f4c696c797061645061796d656e74733a2043616e206f6e6c792062652063616c5f8201527f6c656420627920746865204a4300000000000000000000000000000000000000602082015250565b5f611ceb602d83611c81565b9150611cf682611c91565b604082019050919050565b5f6020820190508181035f830152611d1881611cdf565b9050919050565b7f4c696c797061645061796d656e74733a2043616e206f6e6c792062652063616c5f8201527f6c65642062792074686520525000000000000000000000000000000000000000602082015250565b5f611d79602d83611c81565b9150611d8482611d1f565b604082019050919050565b5f6020820190508181035f830152611da681611d6d565b9050919050565b7f4c696c657061645061796d656e74733a20546f6b656e2061646472657373206d5f8201527f75737420626520646566696e6564000000000000000000000000000000000000602082015250565b5f611e07602e83611c81565b9150611e1282611dad565b604082019050919050565b5f6020820190508181035f830152611e3481611dfb565b9050919050565b7f4c696c79706164546f6b656e3a2063616e4368616e6765546f6b656e416464725f8201527f6573732069732064697361626c65640000000000000000000000000000000000602082015250565b5f611e95602f83611c81565b9150611ea082611e3b565b604082019050919050565b5f6020820190508181035f830152611ec281611e89565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f611f008261191e565b9150611f0b8361191e565b9250828203905081811115611f2357611f22611ec9565b5b92915050565b7f4c696c797061645061796d656e74733a2043616e206f6e6c792062652063616c5f8201527f6c656420627920746865205250206f72204a4300000000000000000000000000602082015250565b5f611f83603383611c81565b9150611f8e82611f29565b604082019050919050565b5f6020820190508181035f830152611fb081611f77565b9050919050565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c7265615f8201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b5f612011602e83611c81565b915061201c82611fb7565b604082019050919050565b5f6020820190508181035f83015261203e81612005565b9050919050565b5f819050919050565b5f60ff82169050919050565b5f819050919050565b5f61207d61207861207384612045565b61205a565b61204e565b9050919050565b61208d81612063565b82525050565b5f6020820190506120a65f830184612084565b92915050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f20615f8201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b5f612106602683611c81565b9150612111826120ac565b604082019050919050565b5f6020820190508181035f830152612133816120fa565b9050919050565b7f436f6e74726f6c6c65724f776e61626c653a20436f6e74726f6c6c65722061645f8201527f6472657373206d75737420626520646566696e65640000000000000000000000602082015250565b5f612194603583611c81565b915061219f8261213a565b604082019050919050565b5f6020820190508181035f8301526121c181612188565b9050919050565b7f436f6e74726f6c6c65724f776e61626c653a2063616e4368616e6765436f6e745f8201527f726f6c6c6572416464726573732069732064697361626c656400000000000000602082015250565b5f612222603983611c81565b915061222d826121c8565b604082019050919050565b5f6020820190508181035f83015261224f81612216565b9050919050565b7f436f6e74726f6c6c65724f776e61626c653a204f6e6c792074686520636f6e745f8201527f726f6c6c65722063616e2063616c6c2074686973206d6574686f640000000000602082015250565b5f6122b0603b83611c81565b91506122bb82612256565b604082019050919050565b5f6020820190508181035f8301526122dd816122a4565b9050919050565b6122ed8161191e565b82525050565b5f6040820190506123065f830185611ad0565b61231360208301846122e4565b9392505050565b5f8115159050919050565b61232e8161231a565b8114612338575f80fd5b50565b5f8151905061234981612325565b92915050565b5f6020828403121561236457612363611780565b5b5f6123718482850161233b565b91505092915050565b7f4c696c797061645061796d656e74733a20526566756e6420657363726f7720665f8201527f61696c6564000000000000000000000000000000000000000000000000000000602082015250565b5f6123d4602583611c81565b91506123df8261237a565b604082019050919050565b5f6020820190508181035f830152612401816123c8565b9050919050565b5f81519050919050565b5f5b8381101561242f578082015181840152602081019050612414565b5f8484015250505050565b5f61244482612408565b61244e8185611c81565b935061245e818560208601612412565b61246781611790565b840191505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b600581106124b0576124af612472565b5b50565b5f8190506124c08261249f565b919050565b5f6124cf826124b3565b9050919050565b6124df816124c5565b82525050565b600481106124f6576124f5612472565b5b50565b5f819050612506826124e5565b919050565b5f612515826124f9565b9050919050565b6125258161250b565b82525050565b5f60a0820190508181035f830152612543818861243a565b90506125526020830187611ad0565b61255f60408301866122e4565b61256c60608301856124d6565b612579608083018461251c565b9695505050505050565b7f4c696c797061645061796d656e74733a20536c61736820657363726f772066615f8201527f696c656400000000000000000000000000000000000000000000000000000000602082015250565b5f6125dd602483611c81565b91506125e882612583565b604082019050919050565b5f6020820190508181035f83015261260a816125d1565b9050919050565b5f8151905061261f81611927565b92915050565b5f6020828403121561263a57612639611780565b5b5f61264784828501612611565b91505092915050565b7f4c696c797061645061796d656e74733a20496e73756666696369656e742062615f8201527f6c616e6365000000000000000000000000000000000000000000000000000000602082015250565b5f6126aa602583611c81565b91506126b582612650565b604082019050919050565b5f6020820190508181035f8301526126d78161269e565b9050919050565b5f6020820190506126f15f8301846122e4565b92915050565b7f4c696c797061645061796d656e74733a2050617920657363726f77206661696c5f8201527f6564000000000000000000000000000000000000000000000000000000000000602082015250565b5f612751602283611c81565b915061275c826126f7565b604082019050919050565b5f6020820190508181035f83015261277e81612745565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725f82015250565b5f6127b9602083611c81565b91506127c482612785565b602082019050919050565b5f6020820190508181035f8301526127e6816127ad565b9050919050565b5f6060820190506128005f830186611ad0565b61280d6020830185611ad0565b61281a60408301846122e4565b949350505050565b7f4c696c797061645061796d656e74733a20506179206a6f62206661696c6564005f82015250565b5f612856601f83611c81565b915061286182612822565b602082019050919050565b5f6020820190508181035f8301526128838161284a565b905091905056fea2646970667358221220824d577d5c1421b3c695c691b639c8ac5f9d1f7c90b2a900d0bf33b48f7b90f264736f6c63430008150033", + "deployedBytecode": "0x608060405234801561000f575f80fd5b5060043610610140575f3560e01c80639e3868dc116100b6578063b91880351161007a578063b9188035146102d2578063c4d66de8146102ee578063c57380a21461030a578063d2485cce14610328578063f2fde38b14610344578063f3d3d4481461036057610140565b80639e3868dc14610258578063a470295814610274578063aea382511461027e578063afe1dff71461029a578063b1356714146102b657610140565b80632a1f9072116101085780632a1f9072146101d257806338698529146101ee5780634bc28da11461020a578063715018a614610214578063823f3de11461021e5780638da5cb5b1461023a57610140565b806302fd8f801461014457806309cab510146101605780630ef0d89e1461017c57806310fe9ae81461019857806326a4e8d2146101b6575b5f80fd5b61015e60048036038101906101599190611951565b61037c565b005b61017a600480360381019061017591906119e4565b610420565b005b61019660048036038101906101919190611a64565b6104b6565b005b6101a061053f565b6040516101ad9190611adf565b60405180910390f35b6101d060048036038101906101cb9190611af8565b610567565b005b6101ec60048036038101906101e79190611b23565b6106af565b005b61020860048036038101906102039190611951565b610725565b005b6102126107bd565b005b61021c6107e1565b005b61023860048036038101906102339190611bdc565b6107f4565b005b6102426108cf565b60405161024f9190611adf565b60405180910390f35b610272600480360381019061026d9190611a64565b6108f6565b005b61027c61097e565b005b610298600480360381019061029391906119e4565b6109a2565b005b6102b460048036038101906102af91906119e4565b610a38565b005b6102d060048036038101906102cb9190611b23565b610ace565b005b6102ec60048036038101906102e791906119e4565b610bb1565b005b61030860048036038101906103039190611af8565b610c45565b005b610312610d86565b60405161031f9190611adf565b60405180910390f35b610342600480360381019061033d9190611bdc565b610dae565b005b61035e60048036038101906103599190611af8565b610de6565b005b61037a60048036038101906103759190611af8565b610e68565b005b610384610f70565b508273ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff16146103f3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103ea90611d01565b60405180910390fd5b6103ff8584845f61109d565b61040c858483600261109d565b61041985858360026111c3565b5050505050565b610428610f70565b508273ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614610497576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161048e90611d8f565b60405180910390fd5b6104a3848360016112e9565b6104b0848483600261109d565b50505050565b6104be610f70565b508173ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff161461052d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161052490611d8f565b60405180910390fd5b61053a838383600261109d565b505050565b5f60025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b61056f6114e6565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036105dd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105d490611e1d565b60405180910390fd5b600360149054906101000a900460ff1661062c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062390611eab565b60405180910390fd5b8060025f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508060035f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6106b7610f70565b505f8490505f848611156106cd578491506106dc565b85856106d99190611ef6565b90505b6106ea89888a856003611564565b6106f8898832866004611564565b5f81111561070d5761070c8988835f61109d565b5b61071a898986600161109d565b505050505050505050565b61072d610f70565b508373ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff161461079c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161079390611d8f565b60405180910390fd5b6107a9858584600161109d565b6107b685848360026111c3565b5050505050565b6107c56114e6565b5f600360146101000a81548160ff021916908315150217905550565b6107e96114e6565b6107f25f61168d565b565b6107fc610f70565b508473ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff16148061086257508373ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff16145b6108a1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161089890611f99565b60405180910390fd5b6108ae868684600161109d565b6108ba8685855f61109d565b6108c7868583600461109d565b505050505050565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6108fe610f70565b508173ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff161461096d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161096490611d8f565b60405180910390fd5b610979838260026112e9565b505050565b6109866114e6565b5f600160146101000a81548160ff021916908315150217905550565b6109aa610f70565b508273ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614610a19576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a1090611d01565b60405180910390fd5b610a26848484600261109d565b610a32848260046112e9565b50505050565b610a40610f70565b508273ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614610aaf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610aa690611d01565b60405180910390fd5b610abb8484845f61109d565b610ac8848483600261109d565b50505050565b610ad6610f70565b508473ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614610b45576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b3c90611d01565b60405180910390fd5b5f8490505f84861115610b5a57849150610b69565b8585610b669190611ef6565b90505b610b7789888a856003611564565b5f811115610b8c57610b8b8988835f61109d565b5b610b99898885600261109d565b610ba6898986600161109d565b505050505050505050565b610bb9610f70565b508273ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614610c28576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c1f90611d01565b60405180910390fd5b610c3384835f6112e9565b610c3f848260026112e9565b50505050565b5f600160169054906101000a900460ff16159050808015610c77575060018060159054906101000a900460ff1660ff16105b80610ca55750610c863061174e565b158015610ca4575060018060159054906101000a900460ff1660ff16145b5b610ce4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cdb90612027565b60405180910390fd5b60018060156101000a81548160ff021916908360ff1602179055508015610d205760018060166101000a81548160ff0219169083151502179055505b610d2982610567565b8015610d82575f600160166101000a81548160ff0219169083151502179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024986001604051610d799190612093565b60405180910390a15b5050565b5f60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610db6610f70565b50610dc38685855f61109d565b610dd1868532846004611564565b610dde86868460016111c3565b505050505050565b610dee6114e6565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610e5c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e539061211c565b60405180910390fd5b610e658161168d565b50565b610e706114e6565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610ede576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ed5906121aa565b60405180910390fd5b600160149054906101000a900460ff16610f2d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f2490612238565b60405180910390fd5b8060015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b5f8073ffffffffffffffffffffffffffffffffffffffff1660015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603611000576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ff7906121aa565b60405180910390fd5b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611040611770565b73ffffffffffffffffffffffffffffffffffffffff1614611096576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161108d906122c6565b60405180910390fd5b6001905090565b5f60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663599efa6b85856040518363ffffffff1660e01b81526004016110fa9291906122f3565b6020604051808303815f875af1158015611116573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061113a919061234f565b90508061117c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611173906123ea565b60405180910390fd5b7f64861f505d0cfce7a0cc3629c70eb54f7de27be35939b48300935694958a98428585858560026040516111b495949392919061252b565b60405180910390a15050505050565b5f60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166388c2bdfe85856040518363ffffffff1660e01b81526004016112209291906122f3565b6020604051808303815f875af115801561123c573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611260919061234f565b9050806112a2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611299906125f3565b60405180910390fd5b7f64861f505d0cfce7a0cc3629c70eb54f7de27be35939b48300935694958a98428585858560036040516112da95949392919061252b565b60405180910390a15050505050565b8160035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231326040518263ffffffff1660e01b81526004016113449190611adf565b602060405180830381865afa15801561135f573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906113839190612625565b10156113c4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113bb906126c0565b60405180910390fd5b5f60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635407e93c846040518263ffffffff1660e01b815260040161141f91906126de565b6020604051808303815f875af115801561143b573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061145f919061234f565b9050806114a1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161149890612767565b60405180910390fd5b7f64861f505d0cfce7a0cc3629c70eb54f7de27be35939b48300935694958a9842843285855f6040516114d895949392919061252b565b60405180910390a150505050565b6114ee611770565b73ffffffffffffffffffffffffffffffffffffffff1661150c6108cf565b73ffffffffffffffffffffffffffffffffffffffff1614611562576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611559906127cf565b60405180910390fd5b565b5f60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663065e86c88686866040518463ffffffff1660e01b81526004016115c3939291906127ed565b6020604051808303815f875af11580156115df573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611603919061234f565b905080611645576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161163c9061286c565b60405180910390fd5b7f64861f505d0cfce7a0cc3629c70eb54f7de27be35939b48300935694958a984286858585600160405161167d95949392919061252b565b60405180910390a1505050505050565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b5f33905090565b5f604051905090565b5f80fd5b5f80fd5b5f80fd5b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6117d682611790565b810181811067ffffffffffffffff821117156117f5576117f46117a0565b5b80604052505050565b5f611807611777565b905061181382826117cd565b919050565b5f67ffffffffffffffff821115611832576118316117a0565b5b61183b82611790565b9050602081019050919050565b828183375f83830152505050565b5f61186861186384611818565b6117fe565b9050828152602081018484840111156118845761188361178c565b5b61188f848285611848565b509392505050565b5f82601f8301126118ab576118aa611788565b5b81356118bb848260208601611856565b91505092915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6118ed826118c4565b9050919050565b6118fd816118e3565b8114611907575f80fd5b50565b5f81359050611918816118f4565b92915050565b5f819050919050565b6119308161191e565b811461193a575f80fd5b50565b5f8135905061194b81611927565b92915050565b5f805f805f60a0868803121561196a57611969611780565b5b5f86013567ffffffffffffffff81111561198757611986611784565b5b61199388828901611897565b95505060206119a48882890161190a565b94505060406119b58882890161190a565b93505060606119c68882890161193d565b92505060806119d78882890161193d565b9150509295509295909350565b5f805f80608085870312156119fc576119fb611780565b5b5f85013567ffffffffffffffff811115611a1957611a18611784565b5b611a2587828801611897565b9450506020611a368782880161190a565b9350506040611a478782880161193d565b9250506060611a588782880161193d565b91505092959194509250565b5f805f60608486031215611a7b57611a7a611780565b5b5f84013567ffffffffffffffff811115611a9857611a97611784565b5b611aa486828701611897565b9350506020611ab58682870161190a565b9250506040611ac68682870161193d565b9150509250925092565b611ad9816118e3565b82525050565b5f602082019050611af25f830184611ad0565b92915050565b5f60208284031215611b0d57611b0c611780565b5b5f611b1a8482850161190a565b91505092915050565b5f805f805f805f60e0888a031215611b3e57611b3d611780565b5b5f88013567ffffffffffffffff811115611b5b57611b5a611784565b5b611b678a828b01611897565b9750506020611b788a828b0161190a565b9650506040611b898a828b0161190a565b9550506060611b9a8a828b0161193d565b9450506080611bab8a828b0161193d565b93505060a0611bbc8a828b0161193d565b92505060c0611bcd8a828b0161193d565b91505092959891949750929550565b5f805f805f8060c08789031215611bf657611bf5611780565b5b5f87013567ffffffffffffffff811115611c1357611c12611784565b5b611c1f89828a01611897565b9650506020611c3089828a0161190a565b9550506040611c4189828a0161190a565b9450506060611c5289828a0161193d565b9350506080611c6389828a0161193d565b92505060a0611c7489828a0161193d565b9150509295509295509295565b5f82825260208201905092915050565b7f4c696c797061645061796d656e74733a2043616e206f6e6c792062652063616c5f8201527f6c656420627920746865204a4300000000000000000000000000000000000000602082015250565b5f611ceb602d83611c81565b9150611cf682611c91565b604082019050919050565b5f6020820190508181035f830152611d1881611cdf565b9050919050565b7f4c696c797061645061796d656e74733a2043616e206f6e6c792062652063616c5f8201527f6c65642062792074686520525000000000000000000000000000000000000000602082015250565b5f611d79602d83611c81565b9150611d8482611d1f565b604082019050919050565b5f6020820190508181035f830152611da681611d6d565b9050919050565b7f4c696c657061645061796d656e74733a20546f6b656e2061646472657373206d5f8201527f75737420626520646566696e6564000000000000000000000000000000000000602082015250565b5f611e07602e83611c81565b9150611e1282611dad565b604082019050919050565b5f6020820190508181035f830152611e3481611dfb565b9050919050565b7f4c696c79706164546f6b656e3a2063616e4368616e6765546f6b656e416464725f8201527f6573732069732064697361626c65640000000000000000000000000000000000602082015250565b5f611e95602f83611c81565b9150611ea082611e3b565b604082019050919050565b5f6020820190508181035f830152611ec281611e89565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f611f008261191e565b9150611f0b8361191e565b9250828203905081811115611f2357611f22611ec9565b5b92915050565b7f4c696c797061645061796d656e74733a2043616e206f6e6c792062652063616c5f8201527f6c656420627920746865205250206f72204a4300000000000000000000000000602082015250565b5f611f83603383611c81565b9150611f8e82611f29565b604082019050919050565b5f6020820190508181035f830152611fb081611f77565b9050919050565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c7265615f8201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b5f612011602e83611c81565b915061201c82611fb7565b604082019050919050565b5f6020820190508181035f83015261203e81612005565b9050919050565b5f819050919050565b5f60ff82169050919050565b5f819050919050565b5f61207d61207861207384612045565b61205a565b61204e565b9050919050565b61208d81612063565b82525050565b5f6020820190506120a65f830184612084565b92915050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f20615f8201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b5f612106602683611c81565b9150612111826120ac565b604082019050919050565b5f6020820190508181035f830152612133816120fa565b9050919050565b7f436f6e74726f6c6c65724f776e61626c653a20436f6e74726f6c6c65722061645f8201527f6472657373206d75737420626520646566696e65640000000000000000000000602082015250565b5f612194603583611c81565b915061219f8261213a565b604082019050919050565b5f6020820190508181035f8301526121c181612188565b9050919050565b7f436f6e74726f6c6c65724f776e61626c653a2063616e4368616e6765436f6e745f8201527f726f6c6c6572416464726573732069732064697361626c656400000000000000602082015250565b5f612222603983611c81565b915061222d826121c8565b604082019050919050565b5f6020820190508181035f83015261224f81612216565b9050919050565b7f436f6e74726f6c6c65724f776e61626c653a204f6e6c792074686520636f6e745f8201527f726f6c6c65722063616e2063616c6c2074686973206d6574686f640000000000602082015250565b5f6122b0603b83611c81565b91506122bb82612256565b604082019050919050565b5f6020820190508181035f8301526122dd816122a4565b9050919050565b6122ed8161191e565b82525050565b5f6040820190506123065f830185611ad0565b61231360208301846122e4565b9392505050565b5f8115159050919050565b61232e8161231a565b8114612338575f80fd5b50565b5f8151905061234981612325565b92915050565b5f6020828403121561236457612363611780565b5b5f6123718482850161233b565b91505092915050565b7f4c696c797061645061796d656e74733a20526566756e6420657363726f7720665f8201527f61696c6564000000000000000000000000000000000000000000000000000000602082015250565b5f6123d4602583611c81565b91506123df8261237a565b604082019050919050565b5f6020820190508181035f830152612401816123c8565b9050919050565b5f81519050919050565b5f5b8381101561242f578082015181840152602081019050612414565b5f8484015250505050565b5f61244482612408565b61244e8185611c81565b935061245e818560208601612412565b61246781611790565b840191505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b600581106124b0576124af612472565b5b50565b5f8190506124c08261249f565b919050565b5f6124cf826124b3565b9050919050565b6124df816124c5565b82525050565b600481106124f6576124f5612472565b5b50565b5f819050612506826124e5565b919050565b5f612515826124f9565b9050919050565b6125258161250b565b82525050565b5f60a0820190508181035f830152612543818861243a565b90506125526020830187611ad0565b61255f60408301866122e4565b61256c60608301856124d6565b612579608083018461251c565b9695505050505050565b7f4c696c797061645061796d656e74733a20536c61736820657363726f772066615f8201527f696c656400000000000000000000000000000000000000000000000000000000602082015250565b5f6125dd602483611c81565b91506125e882612583565b604082019050919050565b5f6020820190508181035f83015261260a816125d1565b9050919050565b5f8151905061261f81611927565b92915050565b5f6020828403121561263a57612639611780565b5b5f61264784828501612611565b91505092915050565b7f4c696c797061645061796d656e74733a20496e73756666696369656e742062615f8201527f6c616e6365000000000000000000000000000000000000000000000000000000602082015250565b5f6126aa602583611c81565b91506126b582612650565b604082019050919050565b5f6020820190508181035f8301526126d78161269e565b9050919050565b5f6020820190506126f15f8301846122e4565b92915050565b7f4c696c797061645061796d656e74733a2050617920657363726f77206661696c5f8201527f6564000000000000000000000000000000000000000000000000000000000000602082015250565b5f612751602283611c81565b915061275c826126f7565b604082019050919050565b5f6020820190508181035f83015261277e81612745565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725f82015250565b5f6127b9602083611c81565b91506127c482612785565b602082019050919050565b5f6020820190508181035f8301526127e6816127ad565b9050919050565b5f6060820190506128005f830186611ad0565b61280d6020830185611ad0565b61281a60408301846122e4565b949350505050565b7f4c696c797061645061796d656e74733a20506179206a6f62206661696c6564005f82015250565b5f612856601f83611c81565b915061286182612822565b602082019050919050565b5f6020820190508181035f8301526128838161284a565b905091905056fea2646970667358221220824d577d5c1421b3c695c691b639c8ac5f9d1f7c90b2a900d0bf33b48f7b90f264736f6c63430008150033", + "devdoc": { + "events": { + "Initialized(uint8)": { + "details": "Triggered when the contract has been initialized or reinitialized." + } + }, + "kind": "dev", + "methods": { + "owner()": { + "details": "Returns the address of the current owner." + }, + "renounceOwnership()": { + "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner." + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + } + }, + "version": 1 + }, + "userdoc": { + "events": { + "Payment(string,address,uint256,uint8,uint8)": { + "notice": "Events" + } + }, + "kind": "user", + "methods": { + "addResult(string,address,uint256,uint256)": { + "notice": "Results" + }, + "agreeResourceProvider(string,address,uint256)": { + "notice": "Agreements" + }, + "mediationAcceptResult(string,address,address,uint256,uint256,uint256,uint256)": { + "notice": "Mediation" + }, + "timeoutAgreeRefundResourceProvider(string,address,uint256)": { + "notice": "Timeouts" + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 680, + "contract": "contracts/LilypadPayments.sol:LilypadPayments", + "label": "_owner", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 1649, + "contract": "contracts/LilypadPayments.sol:LilypadPayments", + "label": "controllerAddress", + "offset": 0, + "slot": "1", + "type": "t_address" + }, + { + "astId": 1652, + "contract": "contracts/LilypadPayments.sol:LilypadPayments", + "label": "canChangeControllerAddress", + "offset": 20, + "slot": "1", + "type": "t_bool" + }, + { + "astId": 138, + "contract": "contracts/LilypadPayments.sol:LilypadPayments", + "label": "_initialized", + "offset": 21, + "slot": "1", + "type": "t_uint8" + }, + { + "astId": 141, + "contract": "contracts/LilypadPayments.sol:LilypadPayments", + "label": "_initializing", + "offset": 22, + "slot": "1", + "type": "t_bool" + }, + { + "astId": 3999, + "contract": "contracts/LilypadPayments.sol:LilypadPayments", + "label": "tokenAddress", + "offset": 0, + "slot": "2", + "type": "t_address" + }, + { + "astId": 4002, + "contract": "contracts/LilypadPayments.sol:LilypadPayments", + "label": "tokenContract", + "offset": 0, + "slot": "3", + "type": "t_contract(ILilypadToken)2386" + }, + { + "astId": 4005, + "contract": "contracts/LilypadPayments.sol:LilypadPayments", + "label": "canChangeTokenAddress", + "offset": 20, + "slot": "3", + "type": "t_bool" + }, + { + "astId": 4037, + "contract": "contracts/LilypadPayments.sol:LilypadPayments", + "label": "accountNames", + "offset": 0, + "slot": "4", + "type": "t_mapping(t_address,t_string_storage)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_contract(ILilypadToken)2386": { + "encoding": "inplace", + "label": "contract ILilypadToken", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_string_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => string)", + "numberOfBytes": "32", + "value": "t_string_storage" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + } + } + } +} \ No newline at end of file diff --git a/hardhat/deployments/orbit/LilypadPow.json b/hardhat/deployments/orbit/LilypadPow.json new file mode 100644 index 00000000..3accd035 --- /dev/null +++ b/hardhat/deployments/orbit/LilypadPow.json @@ -0,0 +1,826 @@ +{ + "address": "0x4ed7c70F96B99c776995fB64377f0d4aB3B0e1C1", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "challenge", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "difficulty", + "type": "uint256" + } + ], + "name": "GenerateChallenge", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "NewPowRound", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "walletAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "string", + "name": "nodeId", + "type": "string" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "start_timestamp", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "complete_timestamp", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "challenge", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "difficulty", + "type": "uint256" + } + ], + "name": "ValidPOWSubmitted", + "type": "event" + }, + { + "inputs": [], + "name": "calculate_difficulty", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "difficulty", + "type": "uint256" + } + ], + "name": "change_difficulty", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "checkTimeWindow", + "outputs": [], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "nodeId", + "type": "string" + } + ], + "name": "generateChallenge", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getMinerCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "getMinerPowSubmissionCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "getMinerPowSubmissions", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "walletAddress", + "type": "address" + }, + { + "internalType": "string", + "name": "nodeId", + "type": "string" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "start_timestamp", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "complete_timestamp", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "challenge", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "difficulty", + "type": "uint256" + } + ], + "internalType": "struct LilypadPow.POWSubmission[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMiners", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "lastChallenges", + "outputs": [ + { + "internalType": "bytes32", + "name": "challenge", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "difficulty", + "type": "uint256" + }, + { + "internalType": "string", + "name": "nodeId", + "type": "string" + }, + { + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "miners", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "powSubmissions", + "outputs": [ + { + "internalType": "address", + "name": "walletAddress", + "type": "address" + }, + { + "internalType": "string", + "name": "nodeId", + "type": "string" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "start_timestamp", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "complete_timestamp", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "challenge", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "difficulty", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "startTime", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "string", + "name": "nodeId", + "type": "string" + } + ], + "name": "submitWork", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "targetDifficulty", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "triggerNewPowRound", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "validProofs", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "window_end", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "window_start", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0xd35696184ebbeedd372fb1505f59235360e62ca8a5c441b77d1607a86dfebe14", + "receipt": { + "to": null, + "from": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266", + "contractAddress": "0x4ed7c70F96B99c776995fB64377f0d4aB3B0e1C1", + "transactionIndex": 1, + "gasUsed": "2187724", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x67fa3b3d85278f90f8b1b0cb4b8ab9558cce430859be9b8f4f3f80af6228b111", + "transactionHash": "0xd35696184ebbeedd372fb1505f59235360e62ca8a5c441b77d1607a86dfebe14", + "logs": [], + "blockNumber": 42, + "cumulativeGasUsed": "2187724", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "06e78eaee1ee101e9b46d15f399432ba", + "metadata": "{\"compiler\":{\"version\":\"0.8.21+commit.d9974bed\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"challenge\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"difficulty\",\"type\":\"uint256\"}],\"name\":\"GenerateChallenge\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"NewPowRound\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"walletAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"nodeId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"start_timestamp\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"complete_timestamp\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"challenge\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"difficulty\",\"type\":\"uint256\"}],\"name\":\"ValidPOWSubmitted\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"calculate_difficulty\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"difficulty\",\"type\":\"uint256\"}],\"name\":\"change_difficulty\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"checkTimeWindow\",\"outputs\":[],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"nodeId\",\"type\":\"string\"}],\"name\":\"generateChallenge\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getMinerCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"getMinerPowSubmissionCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"getMinerPowSubmissions\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"walletAddress\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"nodeId\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"start_timestamp\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"complete_timestamp\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"challenge\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"difficulty\",\"type\":\"uint256\"}],\"internalType\":\"struct LilypadPow.POWSubmission[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getMiners\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"lastChallenges\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"challenge\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"difficulty\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"nodeId\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"miners\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"powSubmissions\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"walletAddress\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"nodeId\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"start_timestamp\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"complete_timestamp\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"challenge\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"difficulty\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"startTime\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"nodeId\",\"type\":\"string\"}],\"name\":\"submitWork\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"targetDifficulty\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"triggerNewPowRound\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"validProofs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"window_end\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"window_start\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"}},\"kind\":\"dev\",\"methods\":{\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"initialize()\":{\"notice\":\"Init\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/LilypadPow.sol\":\"LilypadPow\"},\"evmVersion\":\"shanghai\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n function __Ownable_init() internal onlyInitializing {\\n __Ownable_init_unchained();\\n }\\n\\n function __Ownable_init_unchained() internal onlyInitializing {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby disabling any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x4075622496acc77fd6d4de4cc30a8577a744d5c75afad33fdeacf1704d6eda98\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized != type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x9c80f545915582e63fe206c6ce27cbe85a86fc10b9cd2a0e8c9488fb7c2ee422\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract ContextUpgradeable is Initializable {\\n function __Context_init() internal onlyInitializing {\\n }\\n\\n function __Context_init_unchained() internal onlyInitializing {\\n }\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x963ea7f0b48b032eef72fe3a7582edf78408d6f834115b9feadd673a4d5bd149\",\"license\":\"MIT\"},\"contracts/LilypadPow.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.6;\\n//import \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\n\\ncontract LilypadPow is Initializable, OwnableUpgradeable {\\n struct POWSubmission {\\n address walletAddress;\\n string nodeId;\\n uint256 nonce;\\n uint256 start_timestamp;\\n uint256 complete_timestamp; //used to estimate hashrate of this submission\\n bytes32 challenge; //record this to provent user never change challenge\\n uint256 difficulty;\\n }\\n\\n struct Challenge {\\n bytes32 challenge;\\n uint256 difficulty;\\n string nodeId;\\n uint256 timestamp;\\n }\\n\\n // todo difficulty may need to adjust in test\\n // this difficulty was calculate with this tool https://github.com/hunjixin/pow-tool/tree/main/difficulty\\n // Theoretically A machine with a hash rate of 8M has a probability of no more than 0.01% of not finding a nonce that meets the difficulty within 20 blocks.\\n // However, this issue has not been well validated in practice. it can solve nonce within one minute most of the time.\\n uint256 public targetDifficulty; // =\\n //555460709263765739036470010701196062214039696708679004195670928130048;\\n mapping(address => POWSubmission[]) public powSubmissions;\\n address[] public miners;\\n\\n mapping(address => Challenge) public lastChallenges;\\n uint256 public validProofs;\\n uint256 public startTime;\\n\\n uint256 public window_start;\\n uint256 public window_end;\\n /**\\n * Init\\n */\\n\\n // https://docs.openzeppelin.com/upgrades-plugins/1.x/writing-upgradeable\\n function initialize() public initializer {\\n __Ownable_init();\\n targetDifficulty = 555460709263765739036470010701196062214039696708679004195670928130048;\\n }\\n\\n function getMinerCount() public view returns (uint256) {\\n return miners.length;\\n }\\n\\n function getMiners() public view returns (address[] memory) {\\n return miners;\\n }\\n\\n function getMinerPowSubmissionCount(\\n address addr\\n ) public view returns (uint256) {\\n return powSubmissions[addr].length;\\n }\\n\\n function getMinerPowSubmissions(\\n address addr\\n ) public view returns (POWSubmission[] memory) {\\n return powSubmissions[addr];\\n }\\n\\n // generateChallenge gen a byte32 value as challenge value, Sc store this one for verify\\n function generateChallenge(string calldata nodeId) external {\\n checkTimeWindow();\\n\\n bytes32 challenge = keccak256(\\n abi.encodePacked(block.timestamp, window_start, msg.sender, nodeId)\\n );\\n\\n uint256 difficulty = calculate_difficulty();\\n lastChallenges[msg.sender] = Challenge(\\n challenge,\\n difficulty,\\n nodeId,\\n block.timestamp\\n );\\n emit GenerateChallenge(challenge, difficulty);\\n }\\n\\n function change_difficulty(uint256 difficulty) public onlyOwner {\\n targetDifficulty = difficulty;\\n }\\n\\n function calculate_difficulty() public view returns (uint256) {\\n uint256 percentChange = 90 + (block.prevrandao % 21);\\n return (targetDifficulty * percentChange) / 100;\\n }\\n\\n // submitWork miner submint a nonce value, sc check the difficulty and emit a valid pow event when success\\n function submitWork(uint256 nonce, string calldata nodeId) external {\\n checkTimeWindow();\\n\\n Challenge memory lastChallenge = lastChallenges[msg.sender];\\n bytes32 challenge = keccak256(\\n abi.encodePacked(\\n lastChallenge.timestamp,\\n window_start,\\n msg.sender,\\n nodeId\\n )\\n );\\n\\n require(\\n lastChallenge.challenge == challenge,\\n \\\"Work submit not compatable with challenge\\\"\\n );\\n\\n bytes32 hash = keccak256(abi.encodePacked(challenge, nonce));\\n require(\\n uint256(hash) < lastChallenge.difficulty,\\n \\\"Work does not meet difficulty target\\\"\\n );\\n\\n validProofs++;\\n\\n POWSubmission[] storage onwMinerPowSubmissions = powSubmissions[\\n msg.sender\\n ];\\n if (onwMinerPowSubmissions.length == 0) {\\n miners.push(msg.sender);\\n }\\n onwMinerPowSubmissions.push(\\n POWSubmission(\\n msg.sender,\\n nodeId,\\n nonce,\\n lastChallenge.timestamp,\\n block.timestamp,\\n lastChallenge.challenge,\\n lastChallenge.difficulty\\n )\\n );\\n\\n //clean last challenge to submit the same proof\\n lastChallenges[msg.sender] = Challenge(0, 0, \\\"\\\", 0);\\n emit ValidPOWSubmitted(\\n msg.sender,\\n nodeId,\\n nonce,\\n lastChallenge.timestamp,\\n block.timestamp,\\n lastChallenge.challenge,\\n lastChallenge.difficulty\\n );\\n }\\n\\n function triggerNewPowRound() external onlyOwner {\\n window_start = block.number;\\n window_end = block.number + 30; //todo arbitary value , need to discuss\\n emit NewPowRound();\\n }\\n\\n function checkTimeWindow() public view {\\n require(block.number < window_end, \\\"proof windows has closed\\\");\\n }\\n\\n event ValidPOWSubmitted(\\n address walletAddress,\\n string nodeId,\\n uint256 nonce,\\n uint256 start_timestamp,\\n uint256 complete_timestamp,\\n bytes32 challenge,\\n uint256 difficulty\\n );\\n event GenerateChallenge(bytes32 challenge, uint256 difficulty);\\n event NewPowRound();\\n}\\n\",\"keccak256\":\"0x45dc1b2f2af33fa6958258ff172a7a5a0afe46bdcf074fbebd703201f84c8524\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561000f575f80fd5b5061251a8061001d5f395ff3fe608060405234801561000f575f80fd5b5060043610610140575f3560e01c8063a738bf8f116100b6578063bb52c1371161007a578063bb52c13714610323578063bfb660de14610341578063c2c434da1461034b578063da8accf91461037b578063e0d152af14610397578063f2fde38b146103c757610140565b8063a738bf8f146102a5578063ab098945146102c3578063adf0047c146102df578063b28d87ea146102fb578063b681f2fd1461031957610140565b80636189f3ac116101085780636189f3ac14610204578063715018a61461023757806378e97925146102415780638129fc1c1461025f5780638b2db16e146102695780638da5cb5b1461028757610140565b80631633da6e146101445780631bb0d808146101625780632d68c39714610192578063331bade1146101b05780634bbe05e4146101ce575b5f80fd5b61014c6103e3565b60405161015991906114d9565b60405180910390f35b61017c6004803603810190610177919061152b565b61046e565b604051610189919061156e565b60405180910390f35b61019a6104b7565b6040516101a7919061156e565b60405180910390f35b6101b86104f4565b6040516101c5919061156e565b60405180910390f35b6101e860048036038101906101e391906115b1565b6104fa565b6040516101fb97969594939291906116a0565b60405180910390f35b61021e6004803603810190610219919061152b565b6105f7565b60405161022e9493929190611714565b60405180910390f35b61023f6106a9565b005b6102496106bc565b604051610256919061156e565b60405180910390f35b6102676106c2565b005b61027161081e565b60405161027e919061156e565b60405180910390f35b61028f610824565b60405161029c919061175e565b60405180910390f35b6102ad61084c565b6040516102ba919061156e565b60405180910390f35b6102dd60048036038101906102d891906117d8565b610852565b005b6102f960048036038101906102f49190611823565b6109ae565b005b6103036109c0565b604051610310919061156e565b60405180910390f35b6103216109c6565b005b61032b610a16565b604051610338919061156e565b60405180910390f35b610349610a22565b005b6103656004803603810190610360919061152b565b610a68565b6040516103729190611a08565b60405180910390f35b61039560048036038101906103909190611a28565b610c17565b005b6103b160048036038101906103ac9190611823565b611113565b6040516103be919061175e565b60405180910390f35b6103e160048036038101906103dc919061152b565b61114e565b005b6060606780548060200260200160405190810160405280929190818152602001828054801561046457602002820191905f5260205f20905b815f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001906001019080831161041b575b5050505050905090565b5f60665f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20805490509050919050565b5f806015446104c69190611ab2565b605a6104d29190611b0f565b90506064816065546104e49190611b42565b6104ee9190611b83565b91505090565b606b5481565b6066602052815f5260405f208181548110610513575f80fd5b905f5260205f2090600702015f9150915050805f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169080600101805461055890611be0565b80601f016020809104026020016040519081016040528092919081815260200182805461058490611be0565b80156105cf5780601f106105a6576101008083540402835291602001916105cf565b820191905f5260205f20905b8154815290600101906020018083116105b257829003601f168201915b5050505050908060020154908060030154908060040154908060050154908060060154905087565b6068602052805f5260405f205f91509050805f01549080600101549080600201805461062290611be0565b80601f016020809104026020016040519081016040528092919081815260200182805461064e90611be0565b80156106995780601f1061067057610100808354040283529160200191610699565b820191905f5260205f20905b81548152906001019060200180831161067c57829003601f168201915b5050505050908060030154905084565b6106b16111d0565b6106ba5f61124e565b565b606a5481565b5f8060019054906101000a900460ff161590508080156106f1575060015f8054906101000a900460ff1660ff16105b8061071d575061070030611311565b15801561071c575060015f8054906101000a900460ff1660ff16145b5b61075c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161075390611c80565b60405180910390fd5b60015f806101000a81548160ff021916908360ff16021790555080156107975760015f60016101000a81548160ff0219169083151502179055505b61079f611333565b7c149a6a3000000000000000000000000000000000000000000000000000606581905550801561081b575f8060016101000a81548160ff0219169083151502179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249860016040516108129190611cec565b60405180910390a15b50565b60655481565b5f60335f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606c5481565b61085a610a22565b5f42606b54338585604051602001610876959493929190611da6565b6040516020818303038152906040528051906020012090505f6108976104b7565b9050604051806080016040528083815260200182815260200185858080601f0160208091040260200160405190810160405280939291908181526020018383808284375f81840152601f19601f8201169050808301925050505050505081526020014281525060685f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f820151815f01556020820151816001015560408201518160020190816109619190611fb2565b50606082015181600301559050507f496186a9d930bac0744acdcd1d0c054b18283eecbe99d30bda98102d3d06b8ef82826040516109a0929190612081565b60405180910390a150505050565b6109b66111d0565b8060658190555050565b60695481565b6109ce6111d0565b43606b81905550601e436109e29190611b0f565b606c819055507f10cc99616aca050d810fd487c95f968e516d0fa25318530ed50753153d060a1e60405160405180910390a1565b5f606780549050905090565b606c544310610a66576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a5d906120f2565b60405180910390fd5b565b606060665f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20805480602002602001604051908101604052809291908181526020015f905b82821015610c0c578382905f5260205f2090600702016040518060e00160405290815f82015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600182018054610b4b90611be0565b80601f0160208091040260200160405190810160405280929190818152602001828054610b7790611be0565b8015610bc25780601f10610b9957610100808354040283529160200191610bc2565b820191905f5260205f20905b815481529060010190602001808311610ba557829003601f168201915b505050505081526020016002820154815260200160038201548152602001600482015481526020016005820154815260200160068201548152505081526020019060010190610ac6565b505050509050919050565b610c1f610a22565b5f60685f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f206040518060800160405290815f820154815260200160018201548152602001600282018054610c8b90611be0565b80601f0160208091040260200160405190810160405280929190818152602001828054610cb790611be0565b8015610d025780601f10610cd957610100808354040283529160200191610d02565b820191905f5260205f20905b815481529060010190602001808311610ce557829003601f168201915b5050505050815260200160038201548152505090505f8160600151606b54338686604051602001610d37959493929190611da6565b60405160208183030381529060405280519060200120905080825f015114610d94576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d8b90612180565b60405180910390fd5b5f8186604051602001610da89291906121be565b6040516020818303038152906040528051906020012090508260200151815f1c10610e08576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dff90612259565b60405180910390fd5b60695f815480929190610e1a90612277565b91905055505f60665f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2090505f818054905003610ecb57606733908060018154018082558091505060019003905f5260205f20015f9091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b806040518060e001604052803373ffffffffffffffffffffffffffffffffffffffff16815260200188888080601f0160208091040260200160405190810160405280939291908181526020018383808284375f81840152601f19601f82011690508083019250505050505050815260200189815260200186606001518152602001428152602001865f015181526020018660200151815250908060018154018082558091505060019003905f5260205f2090600702015f909190919091505f820151815f015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506020820151816001019081610fe29190611fb2565b5060408201518160020155606082015181600301556080820151816004015560a0820151816005015560c08201518160060155505060405180608001604052805f801b81526020015f815260200160405180602001604052805f81525081526020015f81525060685f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f820151815f01556020820151816001015560408201518160020190816110ac9190611fb2565b50606082015181600301559050507f172b7d59e60446d8dfc98985344fb883c871ef150b1db4d1592bcb67699037323387878a8860600151428a5f01518b602001516040516111029897969594939291906122ea565b60405180910390a150505050505050565b60678181548110611122575f80fd5b905f5260205f20015f915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6111566111d0565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036111c4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111bb906123d0565b60405180910390fd5b6111cd8161124e565b50565b6111d861138b565b73ffffffffffffffffffffffffffffffffffffffff166111f6610824565b73ffffffffffffffffffffffffffffffffffffffff161461124c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161124390612438565b60405180910390fd5b565b5f60335f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508160335f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b5f60019054906101000a900460ff16611381576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611378906124c6565b60405180910390fd5b611389611392565b565b5f33905090565b5f60019054906101000a900460ff166113e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113d7906124c6565b60405180910390fd5b6113f06113eb61138b565b61124e565b565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6114448261141b565b9050919050565b6114548161143a565b82525050565b5f611465838361144b565b60208301905092915050565b5f602082019050919050565b5f611487826113f2565b61149181856113fc565b935061149c8361140c565b805f5b838110156114cc5781516114b3888261145a565b97506114be83611471565b92505060018101905061149f565b5085935050505092915050565b5f6020820190508181035f8301526114f1818461147d565b905092915050565b5f80fd5b5f80fd5b61150a8161143a565b8114611514575f80fd5b50565b5f8135905061152581611501565b92915050565b5f602082840312156115405761153f6114f9565b5b5f61154d84828501611517565b91505092915050565b5f819050919050565b61156881611556565b82525050565b5f6020820190506115815f83018461155f565b92915050565b61159081611556565b811461159a575f80fd5b50565b5f813590506115ab81611587565b92915050565b5f80604083850312156115c7576115c66114f9565b5b5f6115d485828601611517565b92505060206115e58582860161159d565b9150509250929050565b6115f88161143a565b82525050565b5f81519050919050565b5f82825260208201905092915050565b5f5b8381101561163557808201518184015260208101905061161a565b5f8484015250505050565b5f601f19601f8301169050919050565b5f61165a826115fe565b6116648185611608565b9350611674818560208601611618565b61167d81611640565b840191505092915050565b5f819050919050565b61169a81611688565b82525050565b5f60e0820190506116b35f83018a6115ef565b81810360208301526116c58189611650565b90506116d4604083018861155f565b6116e1606083018761155f565b6116ee608083018661155f565b6116fb60a0830185611691565b61170860c083018461155f565b98975050505050505050565b5f6080820190506117275f830187611691565b611734602083018661155f565b81810360408301526117468185611650565b9050611755606083018461155f565b95945050505050565b5f6020820190506117715f8301846115ef565b92915050565b5f80fd5b5f80fd5b5f80fd5b5f8083601f84011261179857611797611777565b5b8235905067ffffffffffffffff8111156117b5576117b461177b565b5b6020830191508360018202830111156117d1576117d061177f565b5b9250929050565b5f80602083850312156117ee576117ed6114f9565b5b5f83013567ffffffffffffffff81111561180b5761180a6114fd565b5b61181785828601611783565b92509250509250929050565b5f60208284031215611838576118376114f9565b5b5f6118458482850161159d565b91505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b5f82825260208201905092915050565b5f611891826115fe565b61189b8185611877565b93506118ab818560208601611618565b6118b481611640565b840191505092915050565b6118c881611556565b82525050565b6118d781611688565b82525050565b5f60e083015f8301516118f25f86018261144b565b506020830151848203602086015261190a8282611887565b915050604083015161191f60408601826118bf565b50606083015161193260608601826118bf565b50608083015161194560808601826118bf565b5060a083015161195860a08601826118ce565b5060c083015161196b60c08601826118bf565b508091505092915050565b5f61198183836118dd565b905092915050565b5f602082019050919050565b5f61199f8261184e565b6119a98185611858565b9350836020820285016119bb85611868565b805f5b858110156119f657848403895281516119d78582611976565b94506119e283611989565b925060208a019950506001810190506119be565b50829750879550505050505092915050565b5f6020820190508181035f830152611a208184611995565b905092915050565b5f805f60408486031215611a3f57611a3e6114f9565b5b5f611a4c8682870161159d565b935050602084013567ffffffffffffffff811115611a6d57611a6c6114fd565b5b611a7986828701611783565b92509250509250925092565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f611abc82611556565b9150611ac783611556565b925082611ad757611ad6611a85565b5b828206905092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f611b1982611556565b9150611b2483611556565b9250828201905080821115611b3c57611b3b611ae2565b5b92915050565b5f611b4c82611556565b9150611b5783611556565b9250828202611b6581611556565b91508282048414831517611b7c57611b7b611ae2565b5b5092915050565b5f611b8d82611556565b9150611b9883611556565b925082611ba857611ba7611a85565b5b828204905092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f6002820490506001821680611bf757607f821691505b602082108103611c0a57611c09611bb3565b5b50919050565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c7265615f8201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b5f611c6a602e83611608565b9150611c7582611c10565b604082019050919050565b5f6020820190508181035f830152611c9781611c5e565b9050919050565b5f819050919050565b5f60ff82169050919050565b5f819050919050565b5f611cd6611cd1611ccc84611c9e565b611cb3565b611ca7565b9050919050565b611ce681611cbc565b82525050565b5f602082019050611cff5f830184611cdd565b92915050565b5f819050919050565b611d1f611d1a82611556565b611d05565b82525050565b5f8160601b9050919050565b5f611d3b82611d25565b9050919050565b5f611d4c82611d31565b9050919050565b611d64611d5f8261143a565b611d42565b82525050565b5f81905092915050565b828183375f83830152505050565b5f611d8d8385611d6a565b9350611d9a838584611d74565b82840190509392505050565b5f611db18288611d0e565b602082019150611dc18287611d0e565b602082019150611dd18286611d53565b601482019150611de2828486611d82565b91508190509695505050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f60088302611e7a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82611e3f565b611e848683611e3f565b95508019841693508086168417925050509392505050565b5f611eb6611eb1611eac84611556565b611cb3565b611556565b9050919050565b5f819050919050565b611ecf83611e9c565b611ee3611edb82611ebd565b848454611e4b565b825550505050565b5f90565b611ef7611eeb565b611f02818484611ec6565b505050565b5b81811015611f2557611f1a5f82611eef565b600181019050611f08565b5050565b601f821115611f6a57611f3b81611e1e565b611f4484611e30565b81016020851015611f53578190505b611f67611f5f85611e30565b830182611f07565b50505b505050565b5f82821c905092915050565b5f611f8a5f1984600802611f6f565b1980831691505092915050565b5f611fa28383611f7b565b9150826002028217905092915050565b611fbb826115fe565b67ffffffffffffffff811115611fd457611fd3611df1565b5b611fde8254611be0565b611fe9828285611f29565b5f60209050601f83116001811461201a575f8415612008578287015190505b6120128582611f97565b865550612079565b601f19841661202886611e1e565b5f5b8281101561204f5784890151825560018201915060208501945060208101905061202a565b8683101561206c5784890151612068601f891682611f7b565b8355505b6001600288020188555050505b505050505050565b5f6040820190506120945f830185611691565b6120a1602083018461155f565b9392505050565b7f70726f6f662077696e646f77732068617320636c6f73656400000000000000005f82015250565b5f6120dc601883611608565b91506120e7826120a8565b602082019050919050565b5f6020820190508181035f830152612109816120d0565b9050919050565b7f576f726b207375626d6974206e6f7420636f6d70617461626c652077697468205f8201527f6368616c6c656e67650000000000000000000000000000000000000000000000602082015250565b5f61216a602983611608565b915061217582612110565b604082019050919050565b5f6020820190508181035f8301526121978161215e565b9050919050565b5f819050919050565b6121b86121b382611688565b61219e565b82525050565b5f6121c982856121a7565b6020820191506121d98284611d0e565b6020820191508190509392505050565b7f576f726b20646f6573206e6f74206d65657420646966666963756c74792074615f8201527f7267657400000000000000000000000000000000000000000000000000000000602082015250565b5f612243602483611608565b915061224e826121e9565b604082019050919050565b5f6020820190508181035f83015261227081612237565b9050919050565b5f61228182611556565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036122b3576122b2611ae2565b5b600182019050919050565b5f6122c98385611608565b93506122d6838584611d74565b6122df83611640565b840190509392505050565b5f60e0820190506122fd5f83018b6115ef565b818103602083015261231081898b6122be565b905061231f604083018861155f565b61232c606083018761155f565b612339608083018661155f565b61234660a0830185611691565b61235360c083018461155f565b9998505050505050505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f20615f8201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b5f6123ba602683611608565b91506123c582612360565b604082019050919050565b5f6020820190508181035f8301526123e7816123ae565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725f82015250565b5f612422602083611608565b915061242d826123ee565b602082019050919050565b5f6020820190508181035f83015261244f81612416565b9050919050565b7f496e697469616c697a61626c653a20636f6e7472616374206973206e6f7420695f8201527f6e697469616c697a696e67000000000000000000000000000000000000000000602082015250565b5f6124b0602b83611608565b91506124bb82612456565b604082019050919050565b5f6020820190508181035f8301526124dd816124a4565b905091905056fea2646970667358221220394bd473da50434eb7ec6d1b197ca4a2248b2bcd7b13ef80123434f68eb3763264736f6c63430008150033", + "deployedBytecode": "0x608060405234801561000f575f80fd5b5060043610610140575f3560e01c8063a738bf8f116100b6578063bb52c1371161007a578063bb52c13714610323578063bfb660de14610341578063c2c434da1461034b578063da8accf91461037b578063e0d152af14610397578063f2fde38b146103c757610140565b8063a738bf8f146102a5578063ab098945146102c3578063adf0047c146102df578063b28d87ea146102fb578063b681f2fd1461031957610140565b80636189f3ac116101085780636189f3ac14610204578063715018a61461023757806378e97925146102415780638129fc1c1461025f5780638b2db16e146102695780638da5cb5b1461028757610140565b80631633da6e146101445780631bb0d808146101625780632d68c39714610192578063331bade1146101b05780634bbe05e4146101ce575b5f80fd5b61014c6103e3565b60405161015991906114d9565b60405180910390f35b61017c6004803603810190610177919061152b565b61046e565b604051610189919061156e565b60405180910390f35b61019a6104b7565b6040516101a7919061156e565b60405180910390f35b6101b86104f4565b6040516101c5919061156e565b60405180910390f35b6101e860048036038101906101e391906115b1565b6104fa565b6040516101fb97969594939291906116a0565b60405180910390f35b61021e6004803603810190610219919061152b565b6105f7565b60405161022e9493929190611714565b60405180910390f35b61023f6106a9565b005b6102496106bc565b604051610256919061156e565b60405180910390f35b6102676106c2565b005b61027161081e565b60405161027e919061156e565b60405180910390f35b61028f610824565b60405161029c919061175e565b60405180910390f35b6102ad61084c565b6040516102ba919061156e565b60405180910390f35b6102dd60048036038101906102d891906117d8565b610852565b005b6102f960048036038101906102f49190611823565b6109ae565b005b6103036109c0565b604051610310919061156e565b60405180910390f35b6103216109c6565b005b61032b610a16565b604051610338919061156e565b60405180910390f35b610349610a22565b005b6103656004803603810190610360919061152b565b610a68565b6040516103729190611a08565b60405180910390f35b61039560048036038101906103909190611a28565b610c17565b005b6103b160048036038101906103ac9190611823565b611113565b6040516103be919061175e565b60405180910390f35b6103e160048036038101906103dc919061152b565b61114e565b005b6060606780548060200260200160405190810160405280929190818152602001828054801561046457602002820191905f5260205f20905b815f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001906001019080831161041b575b5050505050905090565b5f60665f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20805490509050919050565b5f806015446104c69190611ab2565b605a6104d29190611b0f565b90506064816065546104e49190611b42565b6104ee9190611b83565b91505090565b606b5481565b6066602052815f5260405f208181548110610513575f80fd5b905f5260205f2090600702015f9150915050805f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169080600101805461055890611be0565b80601f016020809104026020016040519081016040528092919081815260200182805461058490611be0565b80156105cf5780601f106105a6576101008083540402835291602001916105cf565b820191905f5260205f20905b8154815290600101906020018083116105b257829003601f168201915b5050505050908060020154908060030154908060040154908060050154908060060154905087565b6068602052805f5260405f205f91509050805f01549080600101549080600201805461062290611be0565b80601f016020809104026020016040519081016040528092919081815260200182805461064e90611be0565b80156106995780601f1061067057610100808354040283529160200191610699565b820191905f5260205f20905b81548152906001019060200180831161067c57829003601f168201915b5050505050908060030154905084565b6106b16111d0565b6106ba5f61124e565b565b606a5481565b5f8060019054906101000a900460ff161590508080156106f1575060015f8054906101000a900460ff1660ff16105b8061071d575061070030611311565b15801561071c575060015f8054906101000a900460ff1660ff16145b5b61075c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161075390611c80565b60405180910390fd5b60015f806101000a81548160ff021916908360ff16021790555080156107975760015f60016101000a81548160ff0219169083151502179055505b61079f611333565b7c149a6a3000000000000000000000000000000000000000000000000000606581905550801561081b575f8060016101000a81548160ff0219169083151502179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249860016040516108129190611cec565b60405180910390a15b50565b60655481565b5f60335f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606c5481565b61085a610a22565b5f42606b54338585604051602001610876959493929190611da6565b6040516020818303038152906040528051906020012090505f6108976104b7565b9050604051806080016040528083815260200182815260200185858080601f0160208091040260200160405190810160405280939291908181526020018383808284375f81840152601f19601f8201169050808301925050505050505081526020014281525060685f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f820151815f01556020820151816001015560408201518160020190816109619190611fb2565b50606082015181600301559050507f496186a9d930bac0744acdcd1d0c054b18283eecbe99d30bda98102d3d06b8ef82826040516109a0929190612081565b60405180910390a150505050565b6109b66111d0565b8060658190555050565b60695481565b6109ce6111d0565b43606b81905550601e436109e29190611b0f565b606c819055507f10cc99616aca050d810fd487c95f968e516d0fa25318530ed50753153d060a1e60405160405180910390a1565b5f606780549050905090565b606c544310610a66576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a5d906120f2565b60405180910390fd5b565b606060665f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20805480602002602001604051908101604052809291908181526020015f905b82821015610c0c578382905f5260205f2090600702016040518060e00160405290815f82015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600182018054610b4b90611be0565b80601f0160208091040260200160405190810160405280929190818152602001828054610b7790611be0565b8015610bc25780601f10610b9957610100808354040283529160200191610bc2565b820191905f5260205f20905b815481529060010190602001808311610ba557829003601f168201915b505050505081526020016002820154815260200160038201548152602001600482015481526020016005820154815260200160068201548152505081526020019060010190610ac6565b505050509050919050565b610c1f610a22565b5f60685f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f206040518060800160405290815f820154815260200160018201548152602001600282018054610c8b90611be0565b80601f0160208091040260200160405190810160405280929190818152602001828054610cb790611be0565b8015610d025780601f10610cd957610100808354040283529160200191610d02565b820191905f5260205f20905b815481529060010190602001808311610ce557829003601f168201915b5050505050815260200160038201548152505090505f8160600151606b54338686604051602001610d37959493929190611da6565b60405160208183030381529060405280519060200120905080825f015114610d94576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d8b90612180565b60405180910390fd5b5f8186604051602001610da89291906121be565b6040516020818303038152906040528051906020012090508260200151815f1c10610e08576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dff90612259565b60405180910390fd5b60695f815480929190610e1a90612277565b91905055505f60665f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2090505f818054905003610ecb57606733908060018154018082558091505060019003905f5260205f20015f9091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b806040518060e001604052803373ffffffffffffffffffffffffffffffffffffffff16815260200188888080601f0160208091040260200160405190810160405280939291908181526020018383808284375f81840152601f19601f82011690508083019250505050505050815260200189815260200186606001518152602001428152602001865f015181526020018660200151815250908060018154018082558091505060019003905f5260205f2090600702015f909190919091505f820151815f015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506020820151816001019081610fe29190611fb2565b5060408201518160020155606082015181600301556080820151816004015560a0820151816005015560c08201518160060155505060405180608001604052805f801b81526020015f815260200160405180602001604052805f81525081526020015f81525060685f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f820151815f01556020820151816001015560408201518160020190816110ac9190611fb2565b50606082015181600301559050507f172b7d59e60446d8dfc98985344fb883c871ef150b1db4d1592bcb67699037323387878a8860600151428a5f01518b602001516040516111029897969594939291906122ea565b60405180910390a150505050505050565b60678181548110611122575f80fd5b905f5260205f20015f915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6111566111d0565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036111c4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111bb906123d0565b60405180910390fd5b6111cd8161124e565b50565b6111d861138b565b73ffffffffffffffffffffffffffffffffffffffff166111f6610824565b73ffffffffffffffffffffffffffffffffffffffff161461124c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161124390612438565b60405180910390fd5b565b5f60335f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508160335f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b5f60019054906101000a900460ff16611381576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611378906124c6565b60405180910390fd5b611389611392565b565b5f33905090565b5f60019054906101000a900460ff166113e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113d7906124c6565b60405180910390fd5b6113f06113eb61138b565b61124e565b565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6114448261141b565b9050919050565b6114548161143a565b82525050565b5f611465838361144b565b60208301905092915050565b5f602082019050919050565b5f611487826113f2565b61149181856113fc565b935061149c8361140c565b805f5b838110156114cc5781516114b3888261145a565b97506114be83611471565b92505060018101905061149f565b5085935050505092915050565b5f6020820190508181035f8301526114f1818461147d565b905092915050565b5f80fd5b5f80fd5b61150a8161143a565b8114611514575f80fd5b50565b5f8135905061152581611501565b92915050565b5f602082840312156115405761153f6114f9565b5b5f61154d84828501611517565b91505092915050565b5f819050919050565b61156881611556565b82525050565b5f6020820190506115815f83018461155f565b92915050565b61159081611556565b811461159a575f80fd5b50565b5f813590506115ab81611587565b92915050565b5f80604083850312156115c7576115c66114f9565b5b5f6115d485828601611517565b92505060206115e58582860161159d565b9150509250929050565b6115f88161143a565b82525050565b5f81519050919050565b5f82825260208201905092915050565b5f5b8381101561163557808201518184015260208101905061161a565b5f8484015250505050565b5f601f19601f8301169050919050565b5f61165a826115fe565b6116648185611608565b9350611674818560208601611618565b61167d81611640565b840191505092915050565b5f819050919050565b61169a81611688565b82525050565b5f60e0820190506116b35f83018a6115ef565b81810360208301526116c58189611650565b90506116d4604083018861155f565b6116e1606083018761155f565b6116ee608083018661155f565b6116fb60a0830185611691565b61170860c083018461155f565b98975050505050505050565b5f6080820190506117275f830187611691565b611734602083018661155f565b81810360408301526117468185611650565b9050611755606083018461155f565b95945050505050565b5f6020820190506117715f8301846115ef565b92915050565b5f80fd5b5f80fd5b5f80fd5b5f8083601f84011261179857611797611777565b5b8235905067ffffffffffffffff8111156117b5576117b461177b565b5b6020830191508360018202830111156117d1576117d061177f565b5b9250929050565b5f80602083850312156117ee576117ed6114f9565b5b5f83013567ffffffffffffffff81111561180b5761180a6114fd565b5b61181785828601611783565b92509250509250929050565b5f60208284031215611838576118376114f9565b5b5f6118458482850161159d565b91505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b5f82825260208201905092915050565b5f611891826115fe565b61189b8185611877565b93506118ab818560208601611618565b6118b481611640565b840191505092915050565b6118c881611556565b82525050565b6118d781611688565b82525050565b5f60e083015f8301516118f25f86018261144b565b506020830151848203602086015261190a8282611887565b915050604083015161191f60408601826118bf565b50606083015161193260608601826118bf565b50608083015161194560808601826118bf565b5060a083015161195860a08601826118ce565b5060c083015161196b60c08601826118bf565b508091505092915050565b5f61198183836118dd565b905092915050565b5f602082019050919050565b5f61199f8261184e565b6119a98185611858565b9350836020820285016119bb85611868565b805f5b858110156119f657848403895281516119d78582611976565b94506119e283611989565b925060208a019950506001810190506119be565b50829750879550505050505092915050565b5f6020820190508181035f830152611a208184611995565b905092915050565b5f805f60408486031215611a3f57611a3e6114f9565b5b5f611a4c8682870161159d565b935050602084013567ffffffffffffffff811115611a6d57611a6c6114fd565b5b611a7986828701611783565b92509250509250925092565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f611abc82611556565b9150611ac783611556565b925082611ad757611ad6611a85565b5b828206905092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f611b1982611556565b9150611b2483611556565b9250828201905080821115611b3c57611b3b611ae2565b5b92915050565b5f611b4c82611556565b9150611b5783611556565b9250828202611b6581611556565b91508282048414831517611b7c57611b7b611ae2565b5b5092915050565b5f611b8d82611556565b9150611b9883611556565b925082611ba857611ba7611a85565b5b828204905092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f6002820490506001821680611bf757607f821691505b602082108103611c0a57611c09611bb3565b5b50919050565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c7265615f8201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b5f611c6a602e83611608565b9150611c7582611c10565b604082019050919050565b5f6020820190508181035f830152611c9781611c5e565b9050919050565b5f819050919050565b5f60ff82169050919050565b5f819050919050565b5f611cd6611cd1611ccc84611c9e565b611cb3565b611ca7565b9050919050565b611ce681611cbc565b82525050565b5f602082019050611cff5f830184611cdd565b92915050565b5f819050919050565b611d1f611d1a82611556565b611d05565b82525050565b5f8160601b9050919050565b5f611d3b82611d25565b9050919050565b5f611d4c82611d31565b9050919050565b611d64611d5f8261143a565b611d42565b82525050565b5f81905092915050565b828183375f83830152505050565b5f611d8d8385611d6a565b9350611d9a838584611d74565b82840190509392505050565b5f611db18288611d0e565b602082019150611dc18287611d0e565b602082019150611dd18286611d53565b601482019150611de2828486611d82565b91508190509695505050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f60088302611e7a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82611e3f565b611e848683611e3f565b95508019841693508086168417925050509392505050565b5f611eb6611eb1611eac84611556565b611cb3565b611556565b9050919050565b5f819050919050565b611ecf83611e9c565b611ee3611edb82611ebd565b848454611e4b565b825550505050565b5f90565b611ef7611eeb565b611f02818484611ec6565b505050565b5b81811015611f2557611f1a5f82611eef565b600181019050611f08565b5050565b601f821115611f6a57611f3b81611e1e565b611f4484611e30565b81016020851015611f53578190505b611f67611f5f85611e30565b830182611f07565b50505b505050565b5f82821c905092915050565b5f611f8a5f1984600802611f6f565b1980831691505092915050565b5f611fa28383611f7b565b9150826002028217905092915050565b611fbb826115fe565b67ffffffffffffffff811115611fd457611fd3611df1565b5b611fde8254611be0565b611fe9828285611f29565b5f60209050601f83116001811461201a575f8415612008578287015190505b6120128582611f97565b865550612079565b601f19841661202886611e1e565b5f5b8281101561204f5784890151825560018201915060208501945060208101905061202a565b8683101561206c5784890151612068601f891682611f7b565b8355505b6001600288020188555050505b505050505050565b5f6040820190506120945f830185611691565b6120a1602083018461155f565b9392505050565b7f70726f6f662077696e646f77732068617320636c6f73656400000000000000005f82015250565b5f6120dc601883611608565b91506120e7826120a8565b602082019050919050565b5f6020820190508181035f830152612109816120d0565b9050919050565b7f576f726b207375626d6974206e6f7420636f6d70617461626c652077697468205f8201527f6368616c6c656e67650000000000000000000000000000000000000000000000602082015250565b5f61216a602983611608565b915061217582612110565b604082019050919050565b5f6020820190508181035f8301526121978161215e565b9050919050565b5f819050919050565b6121b86121b382611688565b61219e565b82525050565b5f6121c982856121a7565b6020820191506121d98284611d0e565b6020820191508190509392505050565b7f576f726b20646f6573206e6f74206d65657420646966666963756c74792074615f8201527f7267657400000000000000000000000000000000000000000000000000000000602082015250565b5f612243602483611608565b915061224e826121e9565b604082019050919050565b5f6020820190508181035f83015261227081612237565b9050919050565b5f61228182611556565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036122b3576122b2611ae2565b5b600182019050919050565b5f6122c98385611608565b93506122d6838584611d74565b6122df83611640565b840190509392505050565b5f60e0820190506122fd5f83018b6115ef565b818103602083015261231081898b6122be565b905061231f604083018861155f565b61232c606083018761155f565b612339608083018661155f565b61234660a0830185611691565b61235360c083018461155f565b9998505050505050505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f20615f8201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b5f6123ba602683611608565b91506123c582612360565b604082019050919050565b5f6020820190508181035f8301526123e7816123ae565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725f82015250565b5f612422602083611608565b915061242d826123ee565b602082019050919050565b5f6020820190508181035f83015261244f81612416565b9050919050565b7f496e697469616c697a61626c653a20636f6e7472616374206973206e6f7420695f8201527f6e697469616c697a696e67000000000000000000000000000000000000000000602082015250565b5f6124b0602b83611608565b91506124bb82612456565b604082019050919050565b5f6020820190508181035f8301526124dd816124a4565b905091905056fea2646970667358221220394bd473da50434eb7ec6d1b197ca4a2248b2bcd7b13ef80123434f68eb3763264736f6c63430008150033", + "devdoc": { + "events": { + "Initialized(uint8)": { + "details": "Triggered when the contract has been initialized or reinitialized." + } + }, + "kind": "dev", + "methods": { + "owner()": { + "details": "Returns the address of the current owner." + }, + "renounceOwnership()": { + "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner." + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "initialize()": { + "notice": "Init" + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 138, + "contract": "contracts/LilypadPow.sol:LilypadPow", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8" + }, + { + "astId": 141, + "contract": "contracts/LilypadPow.sol:LilypadPow", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 671, + "contract": "contracts/LilypadPow.sol:LilypadPow", + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 10, + "contract": "contracts/LilypadPow.sol:LilypadPow", + "label": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address" + }, + { + "astId": 130, + "contract": "contracts/LilypadPow.sol:LilypadPow", + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 4871, + "contract": "contracts/LilypadPow.sol:LilypadPow", + "label": "targetDifficulty", + "offset": 0, + "slot": "101", + "type": "t_uint256" + }, + { + "astId": 4877, + "contract": "contracts/LilypadPow.sol:LilypadPow", + "label": "powSubmissions", + "offset": 0, + "slot": "102", + "type": "t_mapping(t_address,t_array(t_struct(POWSubmission)4860_storage)dyn_storage)" + }, + { + "astId": 4880, + "contract": "contracts/LilypadPow.sol:LilypadPow", + "label": "miners", + "offset": 0, + "slot": "103", + "type": "t_array(t_address)dyn_storage" + }, + { + "astId": 4885, + "contract": "contracts/LilypadPow.sol:LilypadPow", + "label": "lastChallenges", + "offset": 0, + "slot": "104", + "type": "t_mapping(t_address,t_struct(Challenge)4869_storage)" + }, + { + "astId": 4887, + "contract": "contracts/LilypadPow.sol:LilypadPow", + "label": "validProofs", + "offset": 0, + "slot": "105", + "type": "t_uint256" + }, + { + "astId": 4889, + "contract": "contracts/LilypadPow.sol:LilypadPow", + "label": "startTime", + "offset": 0, + "slot": "106", + "type": "t_uint256" + }, + { + "astId": 4891, + "contract": "contracts/LilypadPow.sol:LilypadPow", + "label": "window_start", + "offset": 0, + "slot": "107", + "type": "t_uint256" + }, + { + "astId": 4893, + "contract": "contracts/LilypadPow.sol:LilypadPow", + "label": "window_end", + "offset": 0, + "slot": "108", + "type": "t_uint256" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_address)dyn_storage": { + "base": "t_address", + "encoding": "dynamic_array", + "label": "address[]", + "numberOfBytes": "32" + }, + "t_array(t_struct(POWSubmission)4860_storage)dyn_storage": { + "base": "t_struct(POWSubmission)4860_storage", + "encoding": "dynamic_array", + "label": "struct LilypadPow.POWSubmission[]", + "numberOfBytes": "32" + }, + "t_array(t_uint256)49_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_array(t_struct(POWSubmission)4860_storage)dyn_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct LilypadPow.POWSubmission[])", + "numberOfBytes": "32", + "value": "t_array(t_struct(POWSubmission)4860_storage)dyn_storage" + }, + "t_mapping(t_address,t_struct(Challenge)4869_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct LilypadPow.Challenge)", + "numberOfBytes": "32", + "value": "t_struct(Challenge)4869_storage" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(Challenge)4869_storage": { + "encoding": "inplace", + "label": "struct LilypadPow.Challenge", + "members": [ + { + "astId": 4862, + "contract": "contracts/LilypadPow.sol:LilypadPow", + "label": "challenge", + "offset": 0, + "slot": "0", + "type": "t_bytes32" + }, + { + "astId": 4864, + "contract": "contracts/LilypadPow.sol:LilypadPow", + "label": "difficulty", + "offset": 0, + "slot": "1", + "type": "t_uint256" + }, + { + "astId": 4866, + "contract": "contracts/LilypadPow.sol:LilypadPow", + "label": "nodeId", + "offset": 0, + "slot": "2", + "type": "t_string_storage" + }, + { + "astId": 4868, + "contract": "contracts/LilypadPow.sol:LilypadPow", + "label": "timestamp", + "offset": 0, + "slot": "3", + "type": "t_uint256" + } + ], + "numberOfBytes": "128" + }, + "t_struct(POWSubmission)4860_storage": { + "encoding": "inplace", + "label": "struct LilypadPow.POWSubmission", + "members": [ + { + "astId": 4847, + "contract": "contracts/LilypadPow.sol:LilypadPow", + "label": "walletAddress", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 4849, + "contract": "contracts/LilypadPow.sol:LilypadPow", + "label": "nodeId", + "offset": 0, + "slot": "1", + "type": "t_string_storage" + }, + { + "astId": 4851, + "contract": "contracts/LilypadPow.sol:LilypadPow", + "label": "nonce", + "offset": 0, + "slot": "2", + "type": "t_uint256" + }, + { + "astId": 4853, + "contract": "contracts/LilypadPow.sol:LilypadPow", + "label": "start_timestamp", + "offset": 0, + "slot": "3", + "type": "t_uint256" + }, + { + "astId": 4855, + "contract": "contracts/LilypadPow.sol:LilypadPow", + "label": "complete_timestamp", + "offset": 0, + "slot": "4", + "type": "t_uint256" + }, + { + "astId": 4857, + "contract": "contracts/LilypadPow.sol:LilypadPow", + "label": "challenge", + "offset": 0, + "slot": "5", + "type": "t_bytes32" + }, + { + "astId": 4859, + "contract": "contracts/LilypadPow.sol:LilypadPow", + "label": "difficulty", + "offset": 0, + "slot": "6", + "type": "t_uint256" + } + ], + "numberOfBytes": "224" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + } + } + } +} \ No newline at end of file diff --git a/hardhat/deployments/orbit/LilypadStorage.json b/hardhat/deployments/orbit/LilypadStorage.json new file mode 100644 index 00000000..435cc834 --- /dev/null +++ b/hardhat/deployments/orbit/LilypadStorage.json @@ -0,0 +1,1746 @@ +{ + "address": "0xB7f8BC63BbcaD18155201308C8f3540b07f84F5e", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "dealId", + "type": "string" + }, + { + "indexed": false, + "internalType": "enum SharedStructs.AgreementState", + "name": "state", + "type": "uint8" + } + ], + "name": "DealStateChange", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + } + ], + "name": "acceptResult", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + }, + { + "internalType": "string", + "name": "resultsId", + "type": "string" + }, + { + "internalType": "string", + "name": "dataId", + "type": "string" + }, + { + "internalType": "uint256", + "name": "instructionCount", + "type": "uint256" + } + ], + "name": "addResult", + "outputs": [ + { + "components": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + }, + { + "internalType": "string", + "name": "resultsId", + "type": "string" + }, + { + "internalType": "string", + "name": "dataId", + "type": "string" + }, + { + "internalType": "uint256", + "name": "instructionCount", + "type": "uint256" + } + ], + "internalType": "struct SharedStructs.Result", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + } + ], + "name": "agreeJobCreator", + "outputs": [ + { + "components": [ + { + "internalType": "enum SharedStructs.AgreementState", + "name": "state", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "resourceProviderAgreedAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "jobCreatorAgreedAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "dealCreatedAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "dealAgreedAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "resultsSubmittedAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "resultsAcceptedAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "resultsCheckedAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "mediationAcceptedAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "mediationRejectedAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timeoutAgreeAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timeoutSubmitResultsAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timeoutJudgeResultsAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timeoutMediateResultsAt", + "type": "uint256" + } + ], + "internalType": "struct SharedStructs.Agreement", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + } + ], + "name": "agreeResourceProvider", + "outputs": [ + { + "components": [ + { + "internalType": "enum SharedStructs.AgreementState", + "name": "state", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "resourceProviderAgreedAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "jobCreatorAgreedAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "dealCreatedAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "dealAgreedAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "resultsSubmittedAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "resultsAcceptedAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "resultsCheckedAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "mediationAcceptedAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "mediationRejectedAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timeoutAgreeAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timeoutSubmitResultsAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timeoutJudgeResultsAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timeoutMediateResultsAt", + "type": "uint256" + } + ], + "internalType": "struct SharedStructs.Agreement", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + } + ], + "name": "checkResult", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "disableChangeControllerAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + }, + { + "components": [ + { + "internalType": "address", + "name": "solver", + "type": "address" + }, + { + "internalType": "address", + "name": "jobCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "resourceProvider", + "type": "address" + }, + { + "internalType": "address[]", + "name": "mediators", + "type": "address[]" + } + ], + "internalType": "struct SharedStructs.DealMembers", + "name": "members", + "type": "tuple" + }, + { + "components": [ + { + "components": [ + { + "internalType": "uint256", + "name": "timeout", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "collateral", + "type": "uint256" + } + ], + "internalType": "struct SharedStructs.DealTimeout", + "name": "agree", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "timeout", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "collateral", + "type": "uint256" + } + ], + "internalType": "struct SharedStructs.DealTimeout", + "name": "submitResults", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "timeout", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "collateral", + "type": "uint256" + } + ], + "internalType": "struct SharedStructs.DealTimeout", + "name": "judgeResults", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "timeout", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "collateral", + "type": "uint256" + } + ], + "internalType": "struct SharedStructs.DealTimeout", + "name": "mediateResults", + "type": "tuple" + } + ], + "internalType": "struct SharedStructs.DealTimeouts", + "name": "timeouts", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "instructionPrice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "paymentCollateral", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "resultsCollateralMultiple", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "mediationFee", + "type": "uint256" + } + ], + "internalType": "struct SharedStructs.DealPricing", + "name": "pricing", + "type": "tuple" + } + ], + "name": "ensureDeal", + "outputs": [ + { + "components": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + }, + { + "components": [ + { + "internalType": "address", + "name": "solver", + "type": "address" + }, + { + "internalType": "address", + "name": "jobCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "resourceProvider", + "type": "address" + }, + { + "internalType": "address[]", + "name": "mediators", + "type": "address[]" + } + ], + "internalType": "struct SharedStructs.DealMembers", + "name": "members", + "type": "tuple" + }, + { + "components": [ + { + "components": [ + { + "internalType": "uint256", + "name": "timeout", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "collateral", + "type": "uint256" + } + ], + "internalType": "struct SharedStructs.DealTimeout", + "name": "agree", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "timeout", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "collateral", + "type": "uint256" + } + ], + "internalType": "struct SharedStructs.DealTimeout", + "name": "submitResults", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "timeout", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "collateral", + "type": "uint256" + } + ], + "internalType": "struct SharedStructs.DealTimeout", + "name": "judgeResults", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "timeout", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "collateral", + "type": "uint256" + } + ], + "internalType": "struct SharedStructs.DealTimeout", + "name": "mediateResults", + "type": "tuple" + } + ], + "internalType": "struct SharedStructs.DealTimeouts", + "name": "timeouts", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "instructionPrice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "paymentCollateral", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "resultsCollateralMultiple", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "mediationFee", + "type": "uint256" + } + ], + "internalType": "struct SharedStructs.DealPricing", + "name": "pricing", + "type": "tuple" + } + ], + "internalType": "struct SharedStructs.Deal", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + } + ], + "name": "getAgreement", + "outputs": [ + { + "components": [ + { + "internalType": "enum SharedStructs.AgreementState", + "name": "state", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "resourceProviderAgreedAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "jobCreatorAgreedAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "dealCreatedAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "dealAgreedAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "resultsSubmittedAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "resultsAcceptedAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "resultsCheckedAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "mediationAcceptedAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "mediationRejectedAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timeoutAgreeAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timeoutSubmitResultsAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timeoutJudgeResultsAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timeoutMediateResultsAt", + "type": "uint256" + } + ], + "internalType": "struct SharedStructs.Agreement", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getControllerAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + } + ], + "name": "getDeal", + "outputs": [ + { + "components": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + }, + { + "components": [ + { + "internalType": "address", + "name": "solver", + "type": "address" + }, + { + "internalType": "address", + "name": "jobCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "resourceProvider", + "type": "address" + }, + { + "internalType": "address[]", + "name": "mediators", + "type": "address[]" + } + ], + "internalType": "struct SharedStructs.DealMembers", + "name": "members", + "type": "tuple" + }, + { + "components": [ + { + "components": [ + { + "internalType": "uint256", + "name": "timeout", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "collateral", + "type": "uint256" + } + ], + "internalType": "struct SharedStructs.DealTimeout", + "name": "agree", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "timeout", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "collateral", + "type": "uint256" + } + ], + "internalType": "struct SharedStructs.DealTimeout", + "name": "submitResults", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "timeout", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "collateral", + "type": "uint256" + } + ], + "internalType": "struct SharedStructs.DealTimeout", + "name": "judgeResults", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "timeout", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "collateral", + "type": "uint256" + } + ], + "internalType": "struct SharedStructs.DealTimeout", + "name": "mediateResults", + "type": "tuple" + } + ], + "internalType": "struct SharedStructs.DealTimeouts", + "name": "timeouts", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "instructionPrice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "paymentCollateral", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "resultsCollateralMultiple", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "mediationFee", + "type": "uint256" + } + ], + "internalType": "struct SharedStructs.DealPricing", + "name": "pricing", + "type": "tuple" + } + ], + "internalType": "struct SharedStructs.Deal", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "party", + "type": "address" + } + ], + "name": "getDealsForParty", + "outputs": [ + { + "internalType": "string[]", + "name": "", + "type": "string[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + } + ], + "name": "getJobCost", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + } + ], + "name": "getResult", + "outputs": [ + { + "components": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + }, + { + "internalType": "string", + "name": "resultsId", + "type": "string" + }, + { + "internalType": "string", + "name": "dataId", + "type": "string" + }, + { + "internalType": "uint256", + "name": "instructionCount", + "type": "uint256" + } + ], + "internalType": "struct SharedStructs.Result", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + } + ], + "name": "getResultsCollateral", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + } + ], + "name": "hasDeal", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + }, + { + "internalType": "enum SharedStructs.AgreementState", + "name": "state", + "type": "uint8" + } + ], + "name": "isState", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + } + ], + "name": "mediationAcceptResult", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + } + ], + "name": "mediationRejectResult", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_controllerAddress", + "type": "address" + } + ], + "name": "setControllerAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + } + ], + "name": "timeoutAgree", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + } + ], + "name": "timeoutJudgeResult", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + } + ], + "name": "timeoutMediateResult", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + } + ], + "name": "timeoutSubmitResult", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x75c9e7ab5cc0faf214cc7ce3d4985c0602ff8f9e3419fdbab6e01c502dedcb0e", + "receipt": { + "to": null, + "from": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266", + "contractAddress": "0xB7f8BC63BbcaD18155201308C8f3540b07f84F5e", + "transactionIndex": 1, + "gasUsed": "4672094", + "logsBloom": "0x00000000100000000000000000000000000000000040000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001800000000000000000000000000000000000020000000000000100000800000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000002000000000000000000020000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xf4e955aa14b5abd3579ec3292d4be4cce0c28a2a5a5efdce3cc3a380bff9f4e6", + "transactionHash": "0x75c9e7ab5cc0faf214cc7ce3d4985c0602ff8f9e3419fdbab6e01c502dedcb0e", + "logs": [ + { + "transactionIndex": 1, + "blockNumber": 31, + "transactionHash": "0x75c9e7ab5cc0faf214cc7ce3d4985c0602ff8f9e3419fdbab6e01c502dedcb0e", + "address": "0xB7f8BC63BbcaD18155201308C8f3540b07f84F5e", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0xf4e955aa14b5abd3579ec3292d4be4cce0c28a2a5a5efdce3cc3a380bff9f4e6" + } + ], + "blockNumber": 31, + "cumulativeGasUsed": "4672094", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "06e78eaee1ee101e9b46d15f399432ba", + "metadata": "{\"compiler\":{\"version\":\"0.8.21+commit.d9974bed\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"enum SharedStructs.AgreementState\",\"name\":\"state\",\"type\":\"uint8\"}],\"name\":\"DealStateChange\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"}],\"name\":\"acceptResult\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"resultsId\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"dataId\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"instructionCount\",\"type\":\"uint256\"}],\"name\":\"addResult\",\"outputs\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"resultsId\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"dataId\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"instructionCount\",\"type\":\"uint256\"}],\"internalType\":\"struct SharedStructs.Result\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"}],\"name\":\"agreeJobCreator\",\"outputs\":[{\"components\":[{\"internalType\":\"enum SharedStructs.AgreementState\",\"name\":\"state\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"resourceProviderAgreedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"jobCreatorAgreedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"dealCreatedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"dealAgreedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"resultsSubmittedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"resultsAcceptedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"resultsCheckedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"mediationAcceptedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"mediationRejectedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timeoutAgreeAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timeoutSubmitResultsAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timeoutJudgeResultsAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timeoutMediateResultsAt\",\"type\":\"uint256\"}],\"internalType\":\"struct SharedStructs.Agreement\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"}],\"name\":\"agreeResourceProvider\",\"outputs\":[{\"components\":[{\"internalType\":\"enum SharedStructs.AgreementState\",\"name\":\"state\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"resourceProviderAgreedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"jobCreatorAgreedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"dealCreatedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"dealAgreedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"resultsSubmittedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"resultsAcceptedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"resultsCheckedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"mediationAcceptedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"mediationRejectedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timeoutAgreeAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timeoutSubmitResultsAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timeoutJudgeResultsAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timeoutMediateResultsAt\",\"type\":\"uint256\"}],\"internalType\":\"struct SharedStructs.Agreement\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"}],\"name\":\"checkResult\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"disableChangeControllerAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"solver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"jobCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"resourceProvider\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"mediators\",\"type\":\"address[]\"}],\"internalType\":\"struct SharedStructs.DealMembers\",\"name\":\"members\",\"type\":\"tuple\"},{\"components\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"timeout\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"collateral\",\"type\":\"uint256\"}],\"internalType\":\"struct SharedStructs.DealTimeout\",\"name\":\"agree\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"timeout\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"collateral\",\"type\":\"uint256\"}],\"internalType\":\"struct SharedStructs.DealTimeout\",\"name\":\"submitResults\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"timeout\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"collateral\",\"type\":\"uint256\"}],\"internalType\":\"struct SharedStructs.DealTimeout\",\"name\":\"judgeResults\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"timeout\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"collateral\",\"type\":\"uint256\"}],\"internalType\":\"struct SharedStructs.DealTimeout\",\"name\":\"mediateResults\",\"type\":\"tuple\"}],\"internalType\":\"struct SharedStructs.DealTimeouts\",\"name\":\"timeouts\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"instructionPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"paymentCollateral\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"resultsCollateralMultiple\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"mediationFee\",\"type\":\"uint256\"}],\"internalType\":\"struct SharedStructs.DealPricing\",\"name\":\"pricing\",\"type\":\"tuple\"}],\"name\":\"ensureDeal\",\"outputs\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"solver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"jobCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"resourceProvider\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"mediators\",\"type\":\"address[]\"}],\"internalType\":\"struct SharedStructs.DealMembers\",\"name\":\"members\",\"type\":\"tuple\"},{\"components\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"timeout\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"collateral\",\"type\":\"uint256\"}],\"internalType\":\"struct SharedStructs.DealTimeout\",\"name\":\"agree\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"timeout\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"collateral\",\"type\":\"uint256\"}],\"internalType\":\"struct SharedStructs.DealTimeout\",\"name\":\"submitResults\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"timeout\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"collateral\",\"type\":\"uint256\"}],\"internalType\":\"struct SharedStructs.DealTimeout\",\"name\":\"judgeResults\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"timeout\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"collateral\",\"type\":\"uint256\"}],\"internalType\":\"struct SharedStructs.DealTimeout\",\"name\":\"mediateResults\",\"type\":\"tuple\"}],\"internalType\":\"struct SharedStructs.DealTimeouts\",\"name\":\"timeouts\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"instructionPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"paymentCollateral\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"resultsCollateralMultiple\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"mediationFee\",\"type\":\"uint256\"}],\"internalType\":\"struct SharedStructs.DealPricing\",\"name\":\"pricing\",\"type\":\"tuple\"}],\"internalType\":\"struct SharedStructs.Deal\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"}],\"name\":\"getAgreement\",\"outputs\":[{\"components\":[{\"internalType\":\"enum SharedStructs.AgreementState\",\"name\":\"state\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"resourceProviderAgreedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"jobCreatorAgreedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"dealCreatedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"dealAgreedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"resultsSubmittedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"resultsAcceptedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"resultsCheckedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"mediationAcceptedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"mediationRejectedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timeoutAgreeAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timeoutSubmitResultsAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timeoutJudgeResultsAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timeoutMediateResultsAt\",\"type\":\"uint256\"}],\"internalType\":\"struct SharedStructs.Agreement\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getControllerAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"}],\"name\":\"getDeal\",\"outputs\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"solver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"jobCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"resourceProvider\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"mediators\",\"type\":\"address[]\"}],\"internalType\":\"struct SharedStructs.DealMembers\",\"name\":\"members\",\"type\":\"tuple\"},{\"components\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"timeout\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"collateral\",\"type\":\"uint256\"}],\"internalType\":\"struct SharedStructs.DealTimeout\",\"name\":\"agree\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"timeout\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"collateral\",\"type\":\"uint256\"}],\"internalType\":\"struct SharedStructs.DealTimeout\",\"name\":\"submitResults\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"timeout\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"collateral\",\"type\":\"uint256\"}],\"internalType\":\"struct SharedStructs.DealTimeout\",\"name\":\"judgeResults\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"timeout\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"collateral\",\"type\":\"uint256\"}],\"internalType\":\"struct SharedStructs.DealTimeout\",\"name\":\"mediateResults\",\"type\":\"tuple\"}],\"internalType\":\"struct SharedStructs.DealTimeouts\",\"name\":\"timeouts\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"instructionPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"paymentCollateral\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"resultsCollateralMultiple\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"mediationFee\",\"type\":\"uint256\"}],\"internalType\":\"struct SharedStructs.DealPricing\",\"name\":\"pricing\",\"type\":\"tuple\"}],\"internalType\":\"struct SharedStructs.Deal\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"party\",\"type\":\"address\"}],\"name\":\"getDealsForParty\",\"outputs\":[{\"internalType\":\"string[]\",\"name\":\"\",\"type\":\"string[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"}],\"name\":\"getJobCost\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"}],\"name\":\"getResult\",\"outputs\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"resultsId\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"dataId\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"instructionCount\",\"type\":\"uint256\"}],\"internalType\":\"struct SharedStructs.Result\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"}],\"name\":\"getResultsCollateral\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"}],\"name\":\"hasDeal\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"},{\"internalType\":\"enum SharedStructs.AgreementState\",\"name\":\"state\",\"type\":\"uint8\"}],\"name\":\"isState\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"}],\"name\":\"mediationAcceptResult\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"}],\"name\":\"mediationRejectResult\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_controllerAddress\",\"type\":\"address\"}],\"name\":\"setControllerAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"}],\"name\":\"timeoutAgree\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"}],\"name\":\"timeoutJudgeResult\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"}],\"name\":\"timeoutMediateResult\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"}],\"name\":\"timeoutSubmitResult\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"}},\"kind\":\"dev\",\"methods\":{\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"acceptResult(string)\":{\"notice\":\"Judge Results\"},\"getAgreement(string)\":{\"notice\":\"Agreements\"},\"getDeal(string)\":{\"notice\":\"Deals\"},\"getJobCost(string)\":{\"notice\":\"Costings\"},\"getResult(string)\":{\"notice\":\"Post Results\"},\"hasDeal(string)\":{\"notice\":\"Checkers\"},\"initialize()\":{\"notice\":\"Init\"},\"mediationAcceptResult(string)\":{\"notice\":\"Mediati:\"},\"timeoutAgree(string)\":{\"notice\":\"Timeouts\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/LilypadStorage.sol\":\"LilypadStorage\"},\"evmVersion\":\"shanghai\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized != type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x9c80f545915582e63fe206c6ce27cbe85a86fc10b9cd2a0e8c9488fb7c2ee422\",\"license\":\"MIT\"},\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor() {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby disabling any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xba43b97fba0d32eb4254f6a5a297b39a19a247082a02d6e69349e071e2946218\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"contracts/ControllerOwnable.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\npragma solidity ^0.8.6;\\n\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\n\\n// as well as being ownable (i.e. our admin wallet)\\n// this contract has a modifier called onlyController\\n// it works the same way as Ownable but only the Owner\\n// can change the controller address so it gives us a way of\\n// re-pointing contracts if needed\\ncontract ControllerOwnable is Ownable {\\n\\n // the address of the controller that is allowed to call functions\\n address private controllerAddress;\\n\\n // used to \\\"freeze\\\" the controller address - even the admin cannot\\n // change it from this point onwards\\n bool private canChangeControllerAddress = true;\\n\\n modifier onlyController() {\\n _checkControllerAccess();\\n _;\\n }\\n\\n function _checkControllerAccess() internal view virtual returns (bool) {\\n require(controllerAddress != address(0), \\\"ControllerOwnable: Controller address must be defined\\\");\\n require(_msgSender() == controllerAddress, \\\"ControllerOwnable: Only the controller can call this method\\\");\\n return true;\\n }\\n\\n function setControllerAddress(address _controllerAddress) public onlyOwner {\\n require(_controllerAddress != address(0), \\\"ControllerOwnable: Controller address must be defined\\\");\\n require(canChangeControllerAddress, \\\"ControllerOwnable: canChangeControllerAddress is disabled\\\");\\n controllerAddress = _controllerAddress;\\n }\\n\\n function getControllerAddress() public view returns (address) {\\n return controllerAddress;\\n }\\n\\n function disableChangeControllerAddress() public onlyOwner {\\n canChangeControllerAddress = false;\\n }\\n}\\n\",\"keccak256\":\"0xecfd8b0beb12340f51cefee5e121932fa7aee0a41fb7d0233966419d153ef429\",\"license\":\"Apache-2.0\"},\"contracts/LilypadStorage.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\npragma solidity ^0.8.6;\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport \\\"./SharedStructs.sol\\\";\\nimport \\\"./ControllerOwnable.sol\\\";\\n\\ncontract LilypadStorage is ControllerOwnable, Initializable {\\n\\n // the address that is allowed to be the msg.sender for the payment functions\\n address private controllerAddress;\\n\\n // used to cut off upgrades for the remote contract\\n bool private canChangeControllerAddress = true;\\n\\n // a map of deal id -> deal\\n mapping(string => SharedStructs.Deal) private deals;\\n\\n // a map of party -> dealid[]\\n mapping(address => string[]) private dealsForParty;\\n\\n // a map of deal id -> agreement\\n mapping(string => SharedStructs.Agreement) private agreements;\\n\\n // a map of deal id -> result\\n mapping(string => SharedStructs.Result) private results;\\n\\n // a map of deal id -> result\\n mapping(string => SharedStructs.Result) private mediations;\\n\\n event DealStateChange(\\n string dealId,\\n SharedStructs.AgreementState state\\n );\\n\\n /**\\n * Init\\n */\\n\\n // https://docs.openzeppelin.com/upgrades-plugins/1.x/writing-upgradeable\\n function initialize() public initializer {\\n \\n }\\n\\n /**\\n * Deals\\n */\\n\\n function getDeal(\\n string memory dealId\\n ) public view returns (SharedStructs.Deal memory) {\\n return deals[dealId];\\n }\\n\\n function getDealsForParty(\\n address party\\n ) public view returns (string[] memory) {\\n return dealsForParty[party];\\n }\\n\\n function checkDealMembers(\\n SharedStructs.DealMembers memory members\\n ) private pure {\\n require(members.resourceProvider != address(0), \\\"RP missing\\\");\\n require(members.jobCreator != address(0), \\\"JC missing\\\");\\n require(members.solver != address(0), \\\"Solver missing\\\");\\n require(members.mediators.length > 0, \\\"Mediators <= 0\\\");\\n require(members.resourceProvider != members.jobCreator, \\\"RP / JC same\\\");\\n }\\n\\n function checkTimeouts(\\n SharedStructs.DealTimeouts memory timeouts\\n ) private pure {\\n // the cost of the agree timeout cannot be > 0 because the whole point is\\n // one party has not paid anything into the contract is what has timed out\\n require(timeouts.agree.collateral == 0, \\\"Agree deposit must be 0\\\");\\n // the same is true of the mediation timeout - it's cost cannot be zero\\n require(timeouts.mediateResults.collateral == 0, \\\"Mediate deposit must be 0\\\");\\n }\\n\\n function compareDealMembers(\\n SharedStructs.DealMembers memory members1,\\n SharedStructs.DealMembers memory members2\\n ) private pure {\\n require(members1.resourceProvider == members2.resourceProvider, \\\"RP\\\");\\n require(members1.jobCreator == members2.jobCreator, \\\"JC\\\");\\n require(members1.solver == members2.solver, \\\"Solver\\\");\\n require(members1.mediators.length == members2.mediators.length, \\\"Mediators\\\");\\n for (uint256 i = 0; i < members1.mediators.length; i++) {\\n require(members1.mediators[i] == members2.mediators[i], \\\"Mediator\\\");\\n }\\n }\\n\\n function compareDealTimeout(\\n SharedStructs.DealTimeout memory timeout1,\\n SharedStructs.DealTimeout memory timeout2\\n ) private pure {\\n require(timeout1.timeout == timeout2.timeout, \\\"Timeout\\\");\\n require(timeout1.collateral == timeout2.collateral, \\\"Collateral\\\");\\n }\\n \\n function compareDealTimeouts(\\n SharedStructs.DealTimeouts memory timeouts1,\\n SharedStructs.DealTimeouts memory timeouts2\\n ) private pure {\\n compareDealTimeout(timeouts1.agree, timeouts2.agree);\\n compareDealTimeout(timeouts1.submitResults, timeouts2.submitResults);\\n compareDealTimeout(timeouts1.judgeResults, timeouts2.judgeResults);\\n compareDealTimeout(timeouts1.mediateResults, timeouts2.mediateResults);\\n }\\n\\n function compareDealPricing(\\n SharedStructs.DealPricing memory pricing1,\\n SharedStructs.DealPricing memory pricing2\\n ) private pure {\\n require(pricing1.instructionPrice == pricing2.instructionPrice, \\\"Price\\\");\\n require(pricing1.paymentCollateral == pricing2.paymentCollateral, \\\"Payment\\\");\\n require(pricing1.resultsCollateralMultiple == pricing2.resultsCollateralMultiple, \\\"Results\\\");\\n require(pricing1.mediationFee == pricing2.mediationFee, \\\"Mediation\\\");\\n }\\n\\n function ensureDeal(\\n string memory dealId,\\n SharedStructs.DealMembers memory members,\\n SharedStructs.DealTimeouts memory timeouts,\\n SharedStructs.DealPricing memory pricing\\n ) public onlyController returns (SharedStructs.Deal memory) {\\n require(isState(dealId, SharedStructs.AgreementState.DealNegotiating), \\\"DealNegotiating\\\");\\n checkDealMembers(members);\\n checkTimeouts(timeouts);\\n if(hasDeal(dealId)) {\\n SharedStructs.Deal memory existingDeal = getDeal(dealId);\\n compareDealMembers(existingDeal.members, members);\\n compareDealTimeouts(existingDeal.timeouts, timeouts);\\n compareDealPricing(existingDeal.pricing, pricing);\\n }\\n else {\\n deals[dealId] = SharedStructs.Deal(\\n dealId,\\n members,\\n timeouts,\\n pricing\\n );\\n dealsForParty[members.resourceProvider].push(dealId);\\n dealsForParty[members.jobCreator].push(dealId);\\n }\\n return deals[dealId];\\n }\\n\\n /**\\n * Agreements\\n */\\n \\n function getAgreement(\\n string memory dealId\\n ) public view returns (SharedStructs.Agreement memory) {\\n return agreements[dealId];\\n }\\n\\n function agreeResourceProvider(\\n string memory dealId\\n ) public onlyController returns (SharedStructs.Agreement memory) {\\n require(hasDeal(dealId), \\\"Deal does not exist\\\");\\n require(agreements[dealId].resourceProviderAgreedAt == 0, \\\"RP has already agreed\\\");\\n agreements[dealId].resourceProviderAgreedAt = block.timestamp;\\n _maybeAgreeDeal(dealId);\\n return agreements[dealId];\\n }\\n\\n function agreeJobCreator(\\n string memory dealId\\n ) public onlyController returns (SharedStructs.Agreement memory) {\\n require(hasDeal(dealId), \\\"Deal does not exist\\\");\\n require(agreements[dealId].jobCreatorAgreedAt == 0, \\\"JC has already agreed\\\");\\n agreements[dealId].jobCreatorAgreedAt = block.timestamp;\\n _maybeAgreeDeal(dealId);\\n return agreements[dealId];\\n }\\n\\n /**\\n * Post Results\\n */\\n\\n function getResult(\\n string memory dealId\\n ) public view returns (SharedStructs.Result memory) {\\n return results[dealId];\\n }\\n\\n function addResult(\\n string memory dealId,\\n string memory resultsId,\\n string memory dataId,\\n uint256 instructionCount\\n ) public onlyController returns (SharedStructs.Result memory) {\\n require(isState(dealId, SharedStructs.AgreementState.DealAgreed), \\\"DealAgreed\\\");\\n agreements[dealId].resultsSubmittedAt = block.timestamp;\\n _changeAgreementState(dealId, SharedStructs.AgreementState.ResultsSubmitted);\\n results[dealId] = SharedStructs.Result(\\n dealId,\\n resultsId,\\n dataId,\\n instructionCount\\n );\\n return results[dealId];\\n }\\n\\n /**\\n * Judge Results\\n */\\n\\n function acceptResult(\\n string memory dealId\\n ) public onlyController {\\n require(isState(dealId, SharedStructs.AgreementState.ResultsSubmitted), \\\"ResultsSubmitted\\\");\\n agreements[dealId].resultsAcceptedAt = block.timestamp;\\n _changeAgreementState(dealId, SharedStructs.AgreementState.ResultsAccepted);\\n }\\n\\n function checkResult(\\n string memory dealId\\n ) public onlyController {\\n require(isState(dealId, SharedStructs.AgreementState.ResultsSubmitted), \\\"ResultsSubmitted\\\");\\n agreements[dealId].resultsCheckedAt = block.timestamp;\\n _changeAgreementState(dealId, SharedStructs.AgreementState.ResultsChecked);\\n }\\n\\n /**\\n * Mediati:\\n */\\n\\n function mediationAcceptResult(\\n string memory dealId\\n ) public onlyController {\\n require(isState(dealId, SharedStructs.AgreementState.ResultsChecked), \\\"ResultsChecked\\\");\\n agreements[dealId].mediationAcceptedAt = block.timestamp;\\n _changeAgreementState(dealId, SharedStructs.AgreementState.MediationAccepted);\\n }\\n\\n function mediationRejectResult(\\n string memory dealId\\n ) public onlyController {\\n require(isState(dealId, SharedStructs.AgreementState.ResultsChecked), \\\"ResultsChecked\\\");\\n agreements[dealId].mediationRejectedAt = block.timestamp;\\n _changeAgreementState(dealId, SharedStructs.AgreementState.MediationRejected);\\n }\\n\\n /**\\n * Timeouts\\n */\\n\\n // called because one party submitted a deal and the other party\\n // did not agree in time\\n function timeoutAgree(\\n string memory dealId\\n ) public onlyController {\\n require(isState(dealId, SharedStructs.AgreementState.DealNegotiating), \\\"DealNegotiating\\\");\\n agreements[dealId].timeoutAgreeAt = block.timestamp;\\n _changeAgreementState(dealId, SharedStructs.AgreementState.TimeoutAgree);\\n }\\n\\n // called because the JC waited too long for a result to be submitted\\n // and wants it's money back\\n function timeoutSubmitResult(\\n string memory dealId\\n ) public onlyController {\\n require(isState(dealId, SharedStructs.AgreementState.DealAgreed), \\\"DealAgreed\\\");\\n agreements[dealId].timeoutSubmitResultsAt = block.timestamp;\\n _changeAgreementState(dealId, SharedStructs.AgreementState.TimeoutSubmitResults);\\n }\\n\\n // called because the RP waited too long for a judgement of it's results\\n // and wants it's money back\\n function timeoutJudgeResult(\\n string memory dealId\\n ) public onlyController {\\n require(isState(dealId, SharedStructs.AgreementState.ResultsSubmitted), \\\"ResultsSubmitted\\\");\\n agreements[dealId].timeoutJudgeResultsAt = block.timestamp;\\n _changeAgreementState(dealId, SharedStructs.AgreementState.TimeoutJudgeResults);\\n }\\n // called because the RP or JC waited too long for a mediation of it's results\\n // and both want their money back\\n function timeoutMediateResult(\\n string memory dealId\\n ) public onlyController {\\n require(isState(dealId, SharedStructs.AgreementState.ResultsChecked), \\\"ResultsChecked\\\");\\n agreements[dealId].timeoutMediateResultsAt = block.timestamp;\\n _changeAgreementState(dealId, SharedStructs.AgreementState.TimeoutMediateResults);\\n }\\n\\n /**\\n * Costings\\n */\\n\\n function getJobCost(\\n string memory dealId\\n ) public view returns (uint256) {\\n return deals[dealId].pricing.instructionPrice * results[dealId].instructionCount;\\n }\\n\\n function getResultsCollateral(\\nstring memory dealId\\n ) public view returns (uint256) {\\n return deals[dealId].pricing.resultsCollateralMultiple * getJobCost(dealId);\\n }\\n\\n /**\\n * Checkers\\n */\\n\\n function hasDeal(\\n string memory dealId\\n ) public view returns (bool) {\\n return bytes(getDeal(dealId).dealId).length > 0;\\n }\\n\\n function isState(\\n string memory dealId,\\n SharedStructs.AgreementState state\\n ) public view returns (bool) {\\n // if we don't have a deal, we should check against DealNegotiating\\n // as this is the default state - otherwise it's impossible to check\\n // for isState('DealNegotiating')\\n if(!hasDeal(dealId)) {\\n return state == SharedStructs.AgreementState.DealNegotiating;\\n }\\n return agreements[dealId].state == state;\\n }\\n\\n /**\\n * Utils\\n */\\n\\n function _maybeAgreeDeal(\\n string memory dealId\\n ) private {\\n if(agreements[dealId].resourceProviderAgreedAt != 0 && agreements[dealId].jobCreatorAgreedAt != 0) {\\n agreements[dealId].dealAgreedAt = block.timestamp;\\n _changeAgreementState(dealId, SharedStructs.AgreementState.DealAgreed);\\n } else {\\n // this is used so we can know if a party can call an agree timeout trigger\\n agreements[dealId].dealCreatedAt = block.timestamp;\\n }\\n }\\n\\n function _changeAgreementState(\\n string memory dealId,\\n SharedStructs.AgreementState state\\n ) private {\\n agreements[dealId].state = state;\\n emit DealStateChange(dealId, state);\\n }\\n}\\n\",\"keccak256\":\"0x6c248c5abb18f2505d293f9b7bb962d75c234611a1fb3c9ac00b49344082c445\",\"license\":\"Apache-2.0\"},\"contracts/SharedStructs.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\npragma solidity ^0.8.6;\\n\\nlibrary SharedStructs {\\n\\n enum ServiceType {\\n Solver,\\n Mediator,\\n ResourceProvider,\\n JobCreator\\n }\\n\\n enum AgreementState {\\n\\n // the two parties have not yet both agreed to the deal\\n DealNegotiating,\\n\\n // both parties have agreed\\n DealAgreed,\\n\\n // results have been submitted by the RP\\n ResultsSubmitted,\\n\\n // the JC has accepted the results\\n ResultsAccepted,\\n\\n // the JC has checked the results\\n ResultsChecked,\\n\\n // a mediator has accepted the results\\n MediationAccepted,\\n\\n // a mediator has rejected the results\\n MediationRejected,\\n\\n // this means the counter-party did not agree to the deal in time\\n TimeoutAgree,\\n\\n // this means the RP did not submit results in time\\n TimeoutSubmitResults,\\n\\n // this means the JC did not accept or reject results in time\\n TimeoutJudgeResults,\\n\\n // this means the mediator did not accept or submit judgement in time\\n TimeoutMediateResults\\n\\n }\\n\\n // we map addresses onto infomation about the user\\n struct User {\\n address userAddress;\\n // the CID of information for this user\\n string metadataCID;\\n string url;\\n ServiceType[] roles;\\n }\\n\\n // the various addresses involved in runnig a deal\\n struct DealMembers {\\n // the address of the solver service that the RP and JC have agreed to use\\n address solver;\\n // the addresses of the RP and JC that have agreed to this deal\\n address jobCreator;\\n address resourceProvider;\\n // the list of mediators that the RP and JC have agreed to use\\n address[] mediators;\\n }\\n\\n // a timeout represents the agreed amount of time and the penalty\\n // that is applied if the timeout is exceeded \\n struct DealTimeout {\\n uint256 timeout;\\n uint256 collateral;\\n }\\n \\n // the various forms of timeout a deal can have\\n struct DealTimeouts { \\n DealTimeout agree;\\n DealTimeout submitResults;\\n DealTimeout judgeResults;\\n DealTimeout mediateResults;\\n }\\n\\n // configure the cost of a deal\\n struct DealPricing {\\n // agreed price per instruction\\n uint256 instructionPrice;\\n\\n // the collateral that the JC has put up to pay for the job\\n // the final cost of the job will be deducted from this\\n uint256 paymentCollateral;\\n\\n // how much collateral the RP will post to attest it's results are correct\\n // this is a multiple of the cost of the job which is known at results\\n // submission time\\n uint256 resultsCollateralMultiple;\\n\\n // how much is the JC willing to pay the mediator to resolve disputes\\n uint256 mediationFee;\\n }\\n\\n // a Deal forms the information that is agreed between both parties\\n // both parties must have called \\\"agree_deal\\\" with the exact\\n // same parameters before the deal is considered valid\\n // a Deal is immutable - nothing about it can be updated\\n struct Deal {\\n // the CID of the Deal document on IPFS (and directory service)\\n // this contains the job spec, the job offer and the resource offer\\n string dealId;\\n\\n // who is participating in this deal\\n DealMembers members;\\n \\n // the timeout settings for a deal\\n DealTimeouts timeouts;\\n\\n // the pricing settings for a deal\\n DealPricing pricing; \\n }\\n\\n // what the RP submits back once having run the job\\n // this is also immutable\\n struct Result {\\n // the id of the deal that this result is for\\n string dealId;\\n\\n // the CID of the results on IPFS (and directory service)\\n // NOTE - this is not the CID of actual results data rather\\n // of the JSON object reporting that data\\n string resultsId;\\n\\n // this is the actual lower level data CID\\n string dataId;\\n\\n // how many instructions were executed by the RP\\n uint256 instructionCount;\\n }\\n\\n // an agreement keeps track of the state of a deal and it's fields can be mutated\\n struct Agreement {\\n // the current state of the agreement\\n AgreementState state;\\n\\n uint256 resourceProviderAgreedAt;\\n uint256 jobCreatorAgreedAt;\\n uint256 dealCreatedAt;\\n uint256 dealAgreedAt;\\n\\n uint256 resultsSubmittedAt;\\n uint256 resultsAcceptedAt;\\n uint256 resultsCheckedAt;\\n\\n uint256 mediationAcceptedAt;\\n uint256 mediationRejectedAt;\\n\\n uint256 timeoutAgreeAt;\\n uint256 timeoutSubmitResultsAt;\\n uint256 timeoutJudgeResultsAt;\\n uint256 timeoutMediateResultsAt;\\n }\\n\\n struct JobOffer {\\n uint256 id;\\n \\n // this is the contract that will be triggered\\n // once there are some results\\n address calling_contract;\\n\\n // this is the address that is paying for the job\\n // they must have called approve on the token contract\\n // and granted the solver address the number of tokens\\n // required\\n address payee;\\n\\n // the job spec\\n string module;\\n string[] inputs;\\n }\\n}\\n\",\"keccak256\":\"0x17ae1fe0274d61f5460caee95e214371a378a3e49730e5bdc4833506de99fcb6\",\"license\":\"Apache-2.0\"}},\"version\":1}", + "bytecode": "0x608060405260018060146101000a81548160ff0219169083151502179055506001600260146101000a81548160ff02191690831515021790555034801562000045575f80fd5b50620000666200005a6200006c60201b60201c565b6200007360201b60201c565b62000134565b5f33905090565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b61500380620001425f395ff3fe608060405234801561000f575f80fd5b50600436106101a7575f3560e01c80638224ce5f116100f7578063cdd82d1d11610095578063e850be371161006f578063e850be37146104d9578063ec95b967146104f5578063f2fde38b14610525578063f3d3d44814610541576101a7565b8063cdd82d1d1461045d578063e70791801461048d578063e7b957d1146104bd576101a7565b8063a4702958116100d1578063a4702958146103d5578063a6370b0e146103df578063b050e74b1461040f578063c57380a21461043f576101a7565b80638224ce5f1461036b578063824518aa1461039b5780638da5cb5b146103b7576101a7565b8063498cc70d1161016457806373db5c6a1161013e57806373db5c6a146102f9578063795f9abf1461032957806380ffdfe0146103455780638129fc1c14610361576101a7565b8063498cc70d146102a3578063511a9f68146102d3578063715018a6146102ef576101a7565b806311d5af33146101ab5780632244ad2b146101db578063297f9e551461020b5780633955548e146102275780633c4135da1461025757806346834d1e14610287575b5f80fd5b6101c560048036038101906101c091906130bc565b61055d565b6040516101d2919061322c565b60405180910390f35b6101f560048036038101906101f09190613378565b61066e565b60405161020291906133d9565b60405180910390f35b61022560048036038101906102209190613378565b610685565b005b610241600480360381019061023c9190613425565b61070c565b60405161024e919061355a565b60405180910390f35b610271600480360381019061026c9190613378565b610a10565b60405161027e919061370b565b60405180910390f35b6102a1600480360381019061029c9190613378565b610be7565b005b6102bd60048036038101906102b89190613378565b610c6e565b6040516102ca919061355a565b60405180910390f35b6102ed60048036038101906102e89190613378565b610e5f565b005b6102f7610ee6565b005b610313600480360381019061030e9190613378565b610ef9565b6040516103209190613734565b60405180910390f35b610343600480360381019061033e9190613378565b610f51565b005b61035f600480360381019061035a9190613378565b610fd7565b005b61036961105e565b005b61038560048036038101906103809190613378565b611195565b6040516103929190613734565b60405180910390f35b6103b560048036038101906103b09190613378565b6111d5565b005b6103bf61125c565b6040516103cc919061375c565b60405180910390f35b6103dd611283565b005b6103f960048036038101906103f49190613a0a565b6112a7565b6040516104069190613cfc565b60405180910390f35b61042960048036038101906104249190613d3f565b611985565b60405161043691906133d9565b60405180910390f35b610447611a1d565b604051610454919061375c565b60405180910390f35b61047760048036038101906104729190613378565b611a45565b604051610484919061370b565b60405180910390f35b6104a760048036038101906104a29190613378565b611b39565b6040516104b49190613cfc565b60405180910390f35b6104d760048036038101906104d29190613378565b611e87565b005b6104f360048036038101906104ee9190613378565b611f0e565b005b61050f600480360381019061050a9190613378565b611f95565b60405161051c919061370b565b60405180910390f35b61053f600480360381019061053a91906130bc565b61216c565b005b61055b600480360381019061055691906130bc565b6121ee565b005b606060045f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20805480602002602001604051908101604052809291908181526020015f905b82821015610663578382905f5260205f200180546105d890613dc6565b80601f016020809104026020016040519081016040528092919081815260200182805461060490613dc6565b801561064f5780601f106106265761010080835404028352916020019161064f565b820191905f5260205f20905b81548152906001019060200180831161063257829003601f168201915b5050505050815260200190600101906105bb565b505050509050919050565b5f8061067983611b39565b5f015151119050919050565b61068d6122f6565b50610699816002611985565b6106d8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106cf90613e50565b60405180910390fd5b426005826040516106e99190613ea8565b908152602001604051809103902060060181905550610709816003612423565b50565b610714612df8565b61071c6122f6565b50610728856001611985565b610767576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161075e90613f08565b60405180910390fd5b426005866040516107789190613ea8565b908152602001604051809103902060050181905550610798856002612423565b6040518060800160405280868152602001858152602001848152602001838152506006866040516107c99190613ea8565b90815260200160405180910390205f820151815f0190816107ea91906140c3565b50602082015181600101908161080091906140c3565b50604082015181600201908161081691906140c3565b50606082015181600301559050506006856040516108349190613ea8565b90815260200160405180910390206040518060800160405290815f8201805461085c90613dc6565b80601f016020809104026020016040519081016040528092919081815260200182805461088890613dc6565b80156108d35780601f106108aa576101008083540402835291602001916108d3565b820191905f5260205f20905b8154815290600101906020018083116108b657829003601f168201915b505050505081526020016001820180546108ec90613dc6565b80601f016020809104026020016040519081016040528092919081815260200182805461091890613dc6565b80156109635780601f1061093a57610100808354040283529160200191610963565b820191905f5260205f20905b81548152906001019060200180831161094657829003601f168201915b5050505050815260200160028201805461097c90613dc6565b80601f01602080910402602001604051908101604052809291908181526020018280546109a890613dc6565b80156109f35780601f106109ca576101008083540402835291602001916109f3565b820191905f5260205f20905b8154815290600101906020018083116109d657829003601f168201915b505050505081526020016003820154815250509050949350505050565b610a18612e1f565b610a206122f6565b50610a2a8261066e565b610a69576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a60906141dc565b60405180910390fd5b5f600583604051610a7a9190613ea8565b90815260200160405180910390206002015414610acc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ac390614244565b60405180910390fd5b42600583604051610add9190613ea8565b908152602001604051809103902060020181905550610afb826124a7565b600582604051610b0b9190613ea8565b9081526020016040518091039020604051806101c00160405290815f82015f9054906101000a900460ff16600a811115610b4857610b4761357a565b5b600a811115610b5a57610b5961357a565b5b8152602001600182015481526020016002820154815260200160038201548152602001600482015481526020016005820154815260200160068201548152602001600782015481526020016008820154815260200160098201548152602001600a8201548152602001600b8201548152602001600c8201548152602001600d820154815250509050919050565b610bef6122f6565b50610bfb816002611985565b610c3a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c3190613e50565b60405180910390fd5b42600582604051610c4b9190613ea8565b908152602001604051809103902060070181905550610c6b816004612423565b50565b610c76612df8565b600682604051610c869190613ea8565b90815260200160405180910390206040518060800160405290815f82018054610cae90613dc6565b80601f0160208091040260200160405190810160405280929190818152602001828054610cda90613dc6565b8015610d255780601f10610cfc57610100808354040283529160200191610d25565b820191905f5260205f20905b815481529060010190602001808311610d0857829003601f168201915b50505050508152602001600182018054610d3e90613dc6565b80601f0160208091040260200160405190810160405280929190818152602001828054610d6a90613dc6565b8015610db55780601f10610d8c57610100808354040283529160200191610db5565b820191905f5260205f20905b815481529060010190602001808311610d9857829003601f168201915b50505050508152602001600282018054610dce90613dc6565b80601f0160208091040260200160405190810160405280929190818152602001828054610dfa90613dc6565b8015610e455780601f10610e1c57610100808354040283529160200191610e45565b820191905f5260205f20905b815481529060010190602001808311610e2857829003601f168201915b505050505081526020016003820154815250509050919050565b610e676122f6565b50610e73816001611985565b610eb2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ea990613f08565b60405180910390fd5b42600582604051610ec39190613ea8565b9081526020016040518091039020600b0181905550610ee3816008612423565b50565b610eee61255e565b610ef75f6125dc565b565b5f600682604051610f0a9190613ea8565b908152602001604051809103902060030154600383604051610f2c9190613ea8565b9081526020016040518091039020600d015f0154610f4a919061428f565b9050919050565b610f596122f6565b50610f64815f611985565b610fa3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f9a9061431a565b60405180910390fd5b42600582604051610fb49190613ea8565b9081526020016040518091039020600a0181905550610fd4816007612423565b50565b610fdf6122f6565b50610feb816004611985565b61102a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161102190614382565b60405180910390fd5b4260058260405161103b9190613ea8565b90815260200160405180910390206009018190555061105b816006612423565b50565b5f600160169054906101000a900460ff16159050808015611090575060018060159054906101000a900460ff1660ff16105b806110be575061109f3061269d565b1580156110bd575060018060159054906101000a900460ff1660ff16145b5b6110fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110f490614410565b60405180910390fd5b60018060156101000a81548160ff021916908360ff16021790555080156111395760018060166101000a81548160ff0219169083151502179055505b8015611192575f600160166101000a81548160ff0219169083151502179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249860016040516111899190614473565b60405180910390a15b50565b5f61119f82610ef9565b6003836040516111af9190613ea8565b9081526020016040518091039020600d01600201546111ce919061428f565b9050919050565b6111dd6122f6565b506111e9816004611985565b611228576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161121f90614382565b60405180910390fd5b426005826040516112399190613ea8565b908152602001604051809103902060080181905550611259816005612423565b50565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b61128b61255e565b5f600160146101000a81548160ff021916908315150217905550565b6112af612e92565b6112b76122f6565b506112c2855f611985565b611301576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112f89061431a565b60405180910390fd5b61130a846126bf565b611313836128d4565b61131c8561066e565b1561135d575f61132b86611b39565b905061133b81602001518661296a565b611349816040015185612be7565b611357816060015184612c31565b5061163c565b60405180608001604052808681526020018581526020018481526020018381525060038660405161138e9190613ea8565b90815260200160405180910390205f820151815f0190816113af91906140c3565b506020820151816001015f820151815f015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506020820151816001015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506040820151816002015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060608201518160030190805190602001906114a5929190612ecc565b5050506040820151816005015f820151815f015f820151815f01556020820151816001015550506020820151816002015f820151815f01556020820151816001015550506040820151816004015f820151815f01556020820151816001015550506060820151816006015f820151815f01556020820151816001015550505050606082015181600d015f820151815f0155602082015181600101556040820151816002015560608201518160030155505090505060045f856040015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2085908060018154018082558091505060019003905f5260205f20015f9091909190915090816115c991906140c3565b5060045f856020015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2085908060018154018082558091505060019003905f5260205f20015f90919091909150908161163a91906140c3565b505b60038560405161164c9190613ea8565b90815260200160405180910390206040518060800160405290815f8201805461167490613dc6565b80601f01602080910402602001604051908101604052809291908181526020018280546116a090613dc6565b80156116eb5780601f106116c2576101008083540402835291602001916116eb565b820191905f5260205f20905b8154815290600101906020018083116116ce57829003601f168201915b50505050508152602001600182016040518060800160405290815f82015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600182015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600282015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016003820180548060200260200160405190810160405280929190818152602001828054801561188457602002820191905f5260205f20905b815f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001906001019080831161183b575b5050505050815250508152602001600582016040518060800160405290815f82016040518060400160405290815f82015481526020016001820154815250508152602001600282016040518060400160405290815f82015481526020016001820154815250508152602001600482016040518060400160405290815f82015481526020016001820154815250508152602001600682016040518060400160405290815f8201548152602001600182015481525050815250508152602001600d82016040518060800160405290815f82015481526020016001820154815260200160028201548152602001600382015481525050815250509050949350505050565b5f61198f8361066e565b6119c1575f600a8111156119a6576119a561357a565b5b82600a8111156119b9576119b861357a565b5b149050611a17565b81600a8111156119d4576119d361357a565b5b6005846040516119e49190613ea8565b90815260200160405180910390205f015f9054906101000a900460ff16600a811115611a1357611a1261357a565b5b1490505b92915050565b5f60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b611a4d612e1f565b600582604051611a5d9190613ea8565b9081526020016040518091039020604051806101c00160405290815f82015f9054906101000a900460ff16600a811115611a9a57611a9961357a565b5b600a811115611aac57611aab61357a565b5b8152602001600182015481526020016002820154815260200160038201548152602001600482015481526020016005820154815260200160068201548152602001600782015481526020016008820154815260200160098201548152602001600a8201548152602001600b8201548152602001600c8201548152602001600d820154815250509050919050565b611b41612e92565b600382604051611b519190613ea8565b90815260200160405180910390206040518060800160405290815f82018054611b7990613dc6565b80601f0160208091040260200160405190810160405280929190818152602001828054611ba590613dc6565b8015611bf05780601f10611bc757610100808354040283529160200191611bf0565b820191905f5260205f20905b815481529060010190602001808311611bd357829003601f168201915b50505050508152602001600182016040518060800160405290815f82015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600182015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600282015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160038201805480602002602001604051908101604052809291908181526020018280548015611d8957602002820191905f5260205f20905b815f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311611d40575b5050505050815250508152602001600582016040518060800160405290815f82016040518060400160405290815f82015481526020016001820154815250508152602001600282016040518060400160405290815f82015481526020016001820154815250508152602001600482016040518060400160405290815f82015481526020016001820154815250508152602001600682016040518060400160405290815f8201548152602001600182015481525050815250508152602001600d82016040518060800160405290815f82015481526020016001820154815260200160028201548152602001600382015481525050815250509050919050565b611e8f6122f6565b50611e9b816004611985565b611eda576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ed190614382565b60405180910390fd5b42600582604051611eeb9190613ea8565b9081526020016040518091039020600d0181905550611f0b81600a612423565b50565b611f166122f6565b50611f22816002611985565b611f61576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f5890613e50565b60405180910390fd5b42600582604051611f729190613ea8565b9081526020016040518091039020600c0181905550611f92816009612423565b50565b611f9d612e1f565b611fa56122f6565b50611faf8261066e565b611fee576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611fe5906141dc565b60405180910390fd5b5f600583604051611fff9190613ea8565b90815260200160405180910390206001015414612051576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612048906144d6565b60405180910390fd5b426005836040516120629190613ea8565b908152602001604051809103902060010181905550612080826124a7565b6005826040516120909190613ea8565b9081526020016040518091039020604051806101c00160405290815f82015f9054906101000a900460ff16600a8111156120cd576120cc61357a565b5b600a8111156120df576120de61357a565b5b8152602001600182015481526020016002820154815260200160038201548152602001600482015481526020016005820154815260200160068201548152602001600782015481526020016008820154815260200160098201548152602001600a8201548152602001600b8201548152602001600c8201548152602001600d820154815250509050919050565b61217461255e565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036121e2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121d990614564565b60405180910390fd5b6121eb816125dc565b50565b6121f661255e565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603612264576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161225b906145f2565b60405180910390fd5b600160149054906101000a900460ff166122b3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122aa90614680565b60405180910390fd5b8060015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b5f8073ffffffffffffffffffffffffffffffffffffffff1660015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603612386576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161237d906145f2565b60405180910390fd5b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166123c6612d5b565b73ffffffffffffffffffffffffffffffffffffffff161461241c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124139061470e565b60405180910390fd5b6001905090565b806005836040516124349190613ea8565b90815260200160405180910390205f015f6101000a81548160ff0219169083600a8111156124655761246461357a565b5b02179055507f10ca3d89184491f5d8de422bd36534abe6eb4b4aa1429a261bdb5ff1dd9ac386828260405161249b929190614773565b60405180910390a15050565b5f6005826040516124b89190613ea8565b908152602001604051809103902060010154141580156124f957505f6005826040516124e49190613ea8565b90815260200160405180910390206002015414155b15612534574260058260405161250f9190613ea8565b90815260200160405180910390206004018190555061252f816001612423565b61255b565b426005826040516125459190613ea8565b9081526020016040518091039020600301819055505b50565b612566612d5b565b73ffffffffffffffffffffffffffffffffffffffff1661258461125c565b73ffffffffffffffffffffffffffffffffffffffff16146125da576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125d1906147eb565b60405180910390fd5b565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b5f73ffffffffffffffffffffffffffffffffffffffff16816040015173ffffffffffffffffffffffffffffffffffffffff1603612731576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161272890614853565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff16816020015173ffffffffffffffffffffffffffffffffffffffff16036127a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161279a906148bb565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff16815f015173ffffffffffffffffffffffffffffffffffffffff1603612814576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161280b90614923565b60405180910390fd5b5f8160600151511161285b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128529061498b565b60405180910390fd5b806020015173ffffffffffffffffffffffffffffffffffffffff16816040015173ffffffffffffffffffffffffffffffffffffffff16036128d1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128c8906149f3565b60405180910390fd5b50565b5f815f0151602001511461291d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161291490614a5b565b60405180910390fd5b5f81606001516020015114612967576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161295e90614ac3565b60405180910390fd5b50565b806040015173ffffffffffffffffffffffffffffffffffffffff16826040015173ffffffffffffffffffffffffffffffffffffffff16146129e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016129d790614b2b565b60405180910390fd5b806020015173ffffffffffffffffffffffffffffffffffffffff16826020015173ffffffffffffffffffffffffffffffffffffffff1614612a56576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a4d90614b93565b60405180910390fd5b805f015173ffffffffffffffffffffffffffffffffffffffff16825f015173ffffffffffffffffffffffffffffffffffffffff1614612aca576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612ac190614bfb565b60405180910390fd5b80606001515182606001515114612b16576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612b0d90614c63565b60405180910390fd5b5f5b826060015151811015612be25781606001518181518110612b3c57612b3b614c81565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1683606001518281518110612b7157612b70614c81565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614612bcf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612bc690614cf8565b60405180910390fd5b8080612bda90614d16565b915050612b18565b505050565b612bf7825f0151825f0151612d62565b612c0982602001518260200151612d62565b612c1b82604001518260400151612d62565b612c2d82606001518260600151612d62565b5050565b805f0151825f015114612c79576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612c7090614da7565b60405180910390fd5b8060200151826020015114612cc3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612cba90614e0f565b60405180910390fd5b8060400151826040015114612d0d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612d0490614e77565b60405180910390fd5b8060600151826060015114612d57576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612d4e90614edf565b60405180910390fd5b5050565b5f33905090565b805f0151825f015114612daa576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612da190614f47565b60405180910390fd5b8060200151826020015114612df4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612deb90614faf565b60405180910390fd5b5050565b60405180608001604052806060815260200160608152602001606081526020015f81525090565b604051806101c001604052805f600a811115612e3e57612e3d61357a565b5b81526020015f81526020015f81526020015f81526020015f81526020015f81526020015f81526020015f81526020015f81526020015f81526020015f81526020015f81526020015f81526020015f81525090565b604051806080016040528060608152602001612eac612f53565b8152602001612eb9612fba565b8152602001612ec6612ffa565b81525090565b828054828255905f5260205f20908101928215612f42579160200282015b82811115612f41578251825f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555091602001919060010190612eea565b5b509050612f4f919061301e565b5090565b60405180608001604052805f73ffffffffffffffffffffffffffffffffffffffff1681526020015f73ffffffffffffffffffffffffffffffffffffffff1681526020015f73ffffffffffffffffffffffffffffffffffffffff168152602001606081525090565b6040518060800160405280612fcd613039565b8152602001612fda613039565b8152602001612fe7613039565b8152602001612ff4613039565b81525090565b60405180608001604052805f81526020015f81526020015f81526020015f81525090565b5b80821115613035575f815f90555060010161301f565b5090565b60405180604001604052805f81526020015f81525090565b5f604051905090565b5f80fd5b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61308b82613062565b9050919050565b61309b81613081565b81146130a5575f80fd5b50565b5f813590506130b681613092565b92915050565b5f602082840312156130d1576130d061305a565b5b5f6130de848285016130a8565b91505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b5f81519050919050565b5f82825260208201905092915050565b5f5b8381101561314757808201518184015260208101905061312c565b5f8484015250505050565b5f601f19601f8301169050919050565b5f61316c82613110565b613176818561311a565b935061318681856020860161312a565b61318f81613152565b840191505092915050565b5f6131a58383613162565b905092915050565b5f602082019050919050565b5f6131c3826130e7565b6131cd81856130f1565b9350836020820285016131df85613101565b805f5b8581101561321a57848403895281516131fb858261319a565b9450613206836131ad565b925060208a019950506001810190506131e2565b50829750879550505050505092915050565b5f6020820190508181035f83015261324481846131b9565b905092915050565b5f80fd5b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b61328a82613152565b810181811067ffffffffffffffff821117156132a9576132a8613254565b5b80604052505050565b5f6132bb613051565b90506132c78282613281565b919050565b5f67ffffffffffffffff8211156132e6576132e5613254565b5b6132ef82613152565b9050602081019050919050565b828183375f83830152505050565b5f61331c613317846132cc565b6132b2565b90508281526020810184848401111561333857613337613250565b5b6133438482856132fc565b509392505050565b5f82601f83011261335f5761335e61324c565b5b813561336f84826020860161330a565b91505092915050565b5f6020828403121561338d5761338c61305a565b5b5f82013567ffffffffffffffff8111156133aa576133a961305e565b5b6133b68482850161334b565b91505092915050565b5f8115159050919050565b6133d3816133bf565b82525050565b5f6020820190506133ec5f8301846133ca565b92915050565b5f819050919050565b613404816133f2565b811461340e575f80fd5b50565b5f8135905061341f816133fb565b92915050565b5f805f806080858703121561343d5761343c61305a565b5b5f85013567ffffffffffffffff81111561345a5761345961305e565b5b6134668782880161334b565b945050602085013567ffffffffffffffff8111156134875761348661305e565b5b6134938782880161334b565b935050604085013567ffffffffffffffff8111156134b4576134b361305e565b5b6134c08782880161334b565b92505060606134d187828801613411565b91505092959194509250565b6134e6816133f2565b82525050565b5f608083015f8301518482035f8601526135068282613162565b915050602083015184820360208601526135208282613162565b9150506040830151848203604086015261353a8282613162565b915050606083015161354f60608601826134dd565b508091505092915050565b5f6020820190508181035f83015261357281846134ec565b905092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b600b81106135b8576135b761357a565b5b50565b5f8190506135c8826135a7565b919050565b5f6135d7826135bb565b9050919050565b6135e7816135cd565b82525050565b6101c082015f8201516136025f8501826135de565b50602082015161361560208501826134dd565b50604082015161362860408501826134dd565b50606082015161363b60608501826134dd565b50608082015161364e60808501826134dd565b5060a082015161366160a08501826134dd565b5060c082015161367460c08501826134dd565b5060e082015161368760e08501826134dd565b5061010082015161369c6101008501826134dd565b506101208201516136b16101208501826134dd565b506101408201516136c66101408501826134dd565b506101608201516136db6101608501826134dd565b506101808201516136f06101808501826134dd565b506101a08201516137056101a08501826134dd565b50505050565b5f6101c08201905061371f5f8301846135ed565b92915050565b61372e816133f2565b82525050565b5f6020820190506137475f830184613725565b92915050565b61375681613081565b82525050565b5f60208201905061376f5f83018461374d565b92915050565b5f80fd5b5f80fd5b5f67ffffffffffffffff82111561379757613796613254565b5b602082029050602081019050919050565b5f80fd5b5f6137be6137b98461377d565b6132b2565b905080838252602082019050602084028301858111156137e1576137e06137a8565b5b835b8181101561380a57806137f688826130a8565b8452602084019350506020810190506137e3565b5050509392505050565b5f82601f8301126138285761382761324c565b5b81356138388482602086016137ac565b91505092915050565b5f6080828403121561385657613855613775565b5b61386060806132b2565b90505f61386f848285016130a8565b5f830152506020613882848285016130a8565b6020830152506040613896848285016130a8565b604083015250606082013567ffffffffffffffff8111156138ba576138b9613779565b5b6138c684828501613814565b60608301525092915050565b5f604082840312156138e7576138e6613775565b5b6138f160406132b2565b90505f61390084828501613411565b5f83015250602061391384828501613411565b60208301525092915050565b5f610100828403121561393557613934613775565b5b61393f60806132b2565b90505f61394e848285016138d2565b5f830152506040613961848285016138d2565b6020830152506080613975848285016138d2565b60408301525060c0613989848285016138d2565b60608301525092915050565b5f608082840312156139aa576139a9613775565b5b6139b460806132b2565b90505f6139c384828501613411565b5f8301525060206139d684828501613411565b60208301525060406139ea84828501613411565b60408301525060606139fe84828501613411565b60608301525092915050565b5f805f806101c08587031215613a2357613a2261305a565b5b5f85013567ffffffffffffffff811115613a4057613a3f61305e565b5b613a4c8782880161334b565b945050602085013567ffffffffffffffff811115613a6d57613a6c61305e565b5b613a7987828801613841565b9350506040613a8a8782880161391f565b925050610140613a9c87828801613995565b91505092959194509250565b613ab181613081565b82525050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b5f613aeb8383613aa8565b60208301905092915050565b5f602082019050919050565b5f613b0d82613ab7565b613b178185613ac1565b9350613b2283613ad1565b805f5b83811015613b52578151613b398882613ae0565b9750613b4483613af7565b925050600181019050613b25565b5085935050505092915050565b5f608083015f830151613b745f860182613aa8565b506020830151613b876020860182613aa8565b506040830151613b9a6040860182613aa8565b5060608301518482036060860152613bb28282613b03565b9150508091505092915050565b604082015f820151613bd35f8501826134dd565b506020820151613be660208501826134dd565b50505050565b61010082015f820151613c015f850182613bbf565b506020820151613c146040850182613bbf565b506040820151613c276080850182613bbf565b506060820151613c3a60c0850182613bbf565b50505050565b608082015f820151613c545f8501826134dd565b506020820151613c6760208501826134dd565b506040820151613c7a60408501826134dd565b506060820151613c8d60608501826134dd565b50505050565b5f6101c083015f8301518482035f860152613cae8282613162565b91505060208301518482036020860152613cc88282613b5f565b9150506040830151613cdd6040860182613bec565b506060830151613cf1610140860182613c40565b508091505092915050565b5f6020820190508181035f830152613d148184613c93565b905092915050565b600b8110613d28575f80fd5b50565b5f81359050613d3981613d1c565b92915050565b5f8060408385031215613d5557613d5461305a565b5b5f83013567ffffffffffffffff811115613d7257613d7161305e565b5b613d7e8582860161334b565b9250506020613d8f85828601613d2b565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f6002820490506001821680613ddd57607f821691505b602082108103613df057613def613d99565b5b50919050565b5f82825260208201905092915050565b7f526573756c74735375626d6974746564000000000000000000000000000000005f82015250565b5f613e3a601083613df6565b9150613e4582613e06565b602082019050919050565b5f6020820190508181035f830152613e6781613e2e565b9050919050565b5f81905092915050565b5f613e8282613110565b613e8c8185613e6e565b9350613e9c81856020860161312a565b80840191505092915050565b5f613eb38284613e78565b915081905092915050565b7f4465616c416772656564000000000000000000000000000000000000000000005f82015250565b5f613ef2600a83613df6565b9150613efd82613ebe565b602082019050919050565b5f6020820190508181035f830152613f1f81613ee6565b9050919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f60088302613f827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82613f47565b613f8c8683613f47565b95508019841693508086168417925050509392505050565b5f819050919050565b5f613fc7613fc2613fbd846133f2565b613fa4565b6133f2565b9050919050565b5f819050919050565b613fe083613fad565b613ff4613fec82613fce565b848454613f53565b825550505050565b5f90565b614008613ffc565b614013818484613fd7565b505050565b5b818110156140365761402b5f82614000565b600181019050614019565b5050565b601f82111561407b5761404c81613f26565b61405584613f38565b81016020851015614064578190505b61407861407085613f38565b830182614018565b50505b505050565b5f82821c905092915050565b5f61409b5f1984600802614080565b1980831691505092915050565b5f6140b3838361408c565b9150826002028217905092915050565b6140cc82613110565b67ffffffffffffffff8111156140e5576140e4613254565b5b6140ef8254613dc6565b6140fa82828561403a565b5f60209050601f83116001811461412b575f8415614119578287015190505b61412385826140a8565b86555061418a565b601f19841661413986613f26565b5f5b828110156141605784890151825560018201915060208501945060208101905061413b565b8683101561417d5784890151614179601f89168261408c565b8355505b6001600288020188555050505b505050505050565b7f4465616c20646f6573206e6f74206578697374000000000000000000000000005f82015250565b5f6141c6601383613df6565b91506141d182614192565b602082019050919050565b5f6020820190508181035f8301526141f3816141ba565b9050919050565b7f4a432068617320616c72656164792061677265656400000000000000000000005f82015250565b5f61422e601583613df6565b9150614239826141fa565b602082019050919050565b5f6020820190508181035f83015261425b81614222565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f614299826133f2565b91506142a4836133f2565b92508282026142b2816133f2565b915082820484148315176142c9576142c8614262565b5b5092915050565b7f4465616c4e65676f74696174696e6700000000000000000000000000000000005f82015250565b5f614304600f83613df6565b915061430f826142d0565b602082019050919050565b5f6020820190508181035f830152614331816142f8565b9050919050565b7f526573756c7473436865636b65640000000000000000000000000000000000005f82015250565b5f61436c600e83613df6565b915061437782614338565b602082019050919050565b5f6020820190508181035f83015261439981614360565b9050919050565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c7265615f8201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b5f6143fa602e83613df6565b9150614405826143a0565b604082019050919050565b5f6020820190508181035f830152614427816143ee565b9050919050565b5f819050919050565b5f60ff82169050919050565b5f61445d6144586144538461442e565b613fa4565b614437565b9050919050565b61446d81614443565b82525050565b5f6020820190506144865f830184614464565b92915050565b7f52502068617320616c72656164792061677265656400000000000000000000005f82015250565b5f6144c0601583613df6565b91506144cb8261448c565b602082019050919050565b5f6020820190508181035f8301526144ed816144b4565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f20615f8201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b5f61454e602683613df6565b9150614559826144f4565b604082019050919050565b5f6020820190508181035f83015261457b81614542565b9050919050565b7f436f6e74726f6c6c65724f776e61626c653a20436f6e74726f6c6c65722061645f8201527f6472657373206d75737420626520646566696e65640000000000000000000000602082015250565b5f6145dc603583613df6565b91506145e782614582565b604082019050919050565b5f6020820190508181035f830152614609816145d0565b9050919050565b7f436f6e74726f6c6c65724f776e61626c653a2063616e4368616e6765436f6e745f8201527f726f6c6c6572416464726573732069732064697361626c656400000000000000602082015250565b5f61466a603983613df6565b915061467582614610565b604082019050919050565b5f6020820190508181035f8301526146978161465e565b9050919050565b7f436f6e74726f6c6c65724f776e61626c653a204f6e6c792074686520636f6e745f8201527f726f6c6c65722063616e2063616c6c2074686973206d6574686f640000000000602082015250565b5f6146f8603b83613df6565b91506147038261469e565b604082019050919050565b5f6020820190508181035f830152614725816146ec565b9050919050565b5f61473682613110565b6147408185613df6565b935061475081856020860161312a565b61475981613152565b840191505092915050565b61476d816135cd565b82525050565b5f6040820190508181035f83015261478b818561472c565b905061479a6020830184614764565b9392505050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725f82015250565b5f6147d5602083613df6565b91506147e0826147a1565b602082019050919050565b5f6020820190508181035f830152614802816147c9565b9050919050565b7f5250206d697373696e67000000000000000000000000000000000000000000005f82015250565b5f61483d600a83613df6565b915061484882614809565b602082019050919050565b5f6020820190508181035f83015261486a81614831565b9050919050565b7f4a43206d697373696e67000000000000000000000000000000000000000000005f82015250565b5f6148a5600a83613df6565b91506148b082614871565b602082019050919050565b5f6020820190508181035f8301526148d281614899565b9050919050565b7f536f6c766572206d697373696e670000000000000000000000000000000000005f82015250565b5f61490d600e83613df6565b9150614918826148d9565b602082019050919050565b5f6020820190508181035f83015261493a81614901565b9050919050565b7f4d65646961746f7273203c3d20300000000000000000000000000000000000005f82015250565b5f614975600e83613df6565b915061498082614941565b602082019050919050565b5f6020820190508181035f8301526149a281614969565b9050919050565b7f5250202f204a432073616d6500000000000000000000000000000000000000005f82015250565b5f6149dd600c83613df6565b91506149e8826149a9565b602082019050919050565b5f6020820190508181035f830152614a0a816149d1565b9050919050565b7f4167726565206465706f736974206d75737420626520300000000000000000005f82015250565b5f614a45601783613df6565b9150614a5082614a11565b602082019050919050565b5f6020820190508181035f830152614a7281614a39565b9050919050565b7f4d656469617465206465706f736974206d7573742062652030000000000000005f82015250565b5f614aad601983613df6565b9150614ab882614a79565b602082019050919050565b5f6020820190508181035f830152614ada81614aa1565b9050919050565b7f52500000000000000000000000000000000000000000000000000000000000005f82015250565b5f614b15600283613df6565b9150614b2082614ae1565b602082019050919050565b5f6020820190508181035f830152614b4281614b09565b9050919050565b7f4a430000000000000000000000000000000000000000000000000000000000005f82015250565b5f614b7d600283613df6565b9150614b8882614b49565b602082019050919050565b5f6020820190508181035f830152614baa81614b71565b9050919050565b7f536f6c76657200000000000000000000000000000000000000000000000000005f82015250565b5f614be5600683613df6565b9150614bf082614bb1565b602082019050919050565b5f6020820190508181035f830152614c1281614bd9565b9050919050565b7f4d65646961746f727300000000000000000000000000000000000000000000005f82015250565b5f614c4d600983613df6565b9150614c5882614c19565b602082019050919050565b5f6020820190508181035f830152614c7a81614c41565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b7f4d65646961746f720000000000000000000000000000000000000000000000005f82015250565b5f614ce2600883613df6565b9150614ced82614cae565b602082019050919050565b5f6020820190508181035f830152614d0f81614cd6565b9050919050565b5f614d20826133f2565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203614d5257614d51614262565b5b600182019050919050565b7f50726963650000000000000000000000000000000000000000000000000000005f82015250565b5f614d91600583613df6565b9150614d9c82614d5d565b602082019050919050565b5f6020820190508181035f830152614dbe81614d85565b9050919050565b7f5061796d656e74000000000000000000000000000000000000000000000000005f82015250565b5f614df9600783613df6565b9150614e0482614dc5565b602082019050919050565b5f6020820190508181035f830152614e2681614ded565b9050919050565b7f526573756c7473000000000000000000000000000000000000000000000000005f82015250565b5f614e61600783613df6565b9150614e6c82614e2d565b602082019050919050565b5f6020820190508181035f830152614e8e81614e55565b9050919050565b7f4d6564696174696f6e00000000000000000000000000000000000000000000005f82015250565b5f614ec9600983613df6565b9150614ed482614e95565b602082019050919050565b5f6020820190508181035f830152614ef681614ebd565b9050919050565b7f54696d656f7574000000000000000000000000000000000000000000000000005f82015250565b5f614f31600783613df6565b9150614f3c82614efd565b602082019050919050565b5f6020820190508181035f830152614f5e81614f25565b9050919050565b7f436f6c6c61746572616c000000000000000000000000000000000000000000005f82015250565b5f614f99600a83613df6565b9150614fa482614f65565b602082019050919050565b5f6020820190508181035f830152614fc681614f8d565b905091905056fea26469706673582212208a4ece8015b739b867606d7c639d41d2e97c699769bc0be4f3dd82bd24a8824664736f6c63430008150033", + "deployedBytecode": "0x608060405234801561000f575f80fd5b50600436106101a7575f3560e01c80638224ce5f116100f7578063cdd82d1d11610095578063e850be371161006f578063e850be37146104d9578063ec95b967146104f5578063f2fde38b14610525578063f3d3d44814610541576101a7565b8063cdd82d1d1461045d578063e70791801461048d578063e7b957d1146104bd576101a7565b8063a4702958116100d1578063a4702958146103d5578063a6370b0e146103df578063b050e74b1461040f578063c57380a21461043f576101a7565b80638224ce5f1461036b578063824518aa1461039b5780638da5cb5b146103b7576101a7565b8063498cc70d1161016457806373db5c6a1161013e57806373db5c6a146102f9578063795f9abf1461032957806380ffdfe0146103455780638129fc1c14610361576101a7565b8063498cc70d146102a3578063511a9f68146102d3578063715018a6146102ef576101a7565b806311d5af33146101ab5780632244ad2b146101db578063297f9e551461020b5780633955548e146102275780633c4135da1461025757806346834d1e14610287575b5f80fd5b6101c560048036038101906101c091906130bc565b61055d565b6040516101d2919061322c565b60405180910390f35b6101f560048036038101906101f09190613378565b61066e565b60405161020291906133d9565b60405180910390f35b61022560048036038101906102209190613378565b610685565b005b610241600480360381019061023c9190613425565b61070c565b60405161024e919061355a565b60405180910390f35b610271600480360381019061026c9190613378565b610a10565b60405161027e919061370b565b60405180910390f35b6102a1600480360381019061029c9190613378565b610be7565b005b6102bd60048036038101906102b89190613378565b610c6e565b6040516102ca919061355a565b60405180910390f35b6102ed60048036038101906102e89190613378565b610e5f565b005b6102f7610ee6565b005b610313600480360381019061030e9190613378565b610ef9565b6040516103209190613734565b60405180910390f35b610343600480360381019061033e9190613378565b610f51565b005b61035f600480360381019061035a9190613378565b610fd7565b005b61036961105e565b005b61038560048036038101906103809190613378565b611195565b6040516103929190613734565b60405180910390f35b6103b560048036038101906103b09190613378565b6111d5565b005b6103bf61125c565b6040516103cc919061375c565b60405180910390f35b6103dd611283565b005b6103f960048036038101906103f49190613a0a565b6112a7565b6040516104069190613cfc565b60405180910390f35b61042960048036038101906104249190613d3f565b611985565b60405161043691906133d9565b60405180910390f35b610447611a1d565b604051610454919061375c565b60405180910390f35b61047760048036038101906104729190613378565b611a45565b604051610484919061370b565b60405180910390f35b6104a760048036038101906104a29190613378565b611b39565b6040516104b49190613cfc565b60405180910390f35b6104d760048036038101906104d29190613378565b611e87565b005b6104f360048036038101906104ee9190613378565b611f0e565b005b61050f600480360381019061050a9190613378565b611f95565b60405161051c919061370b565b60405180910390f35b61053f600480360381019061053a91906130bc565b61216c565b005b61055b600480360381019061055691906130bc565b6121ee565b005b606060045f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20805480602002602001604051908101604052809291908181526020015f905b82821015610663578382905f5260205f200180546105d890613dc6565b80601f016020809104026020016040519081016040528092919081815260200182805461060490613dc6565b801561064f5780601f106106265761010080835404028352916020019161064f565b820191905f5260205f20905b81548152906001019060200180831161063257829003601f168201915b5050505050815260200190600101906105bb565b505050509050919050565b5f8061067983611b39565b5f015151119050919050565b61068d6122f6565b50610699816002611985565b6106d8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106cf90613e50565b60405180910390fd5b426005826040516106e99190613ea8565b908152602001604051809103902060060181905550610709816003612423565b50565b610714612df8565b61071c6122f6565b50610728856001611985565b610767576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161075e90613f08565b60405180910390fd5b426005866040516107789190613ea8565b908152602001604051809103902060050181905550610798856002612423565b6040518060800160405280868152602001858152602001848152602001838152506006866040516107c99190613ea8565b90815260200160405180910390205f820151815f0190816107ea91906140c3565b50602082015181600101908161080091906140c3565b50604082015181600201908161081691906140c3565b50606082015181600301559050506006856040516108349190613ea8565b90815260200160405180910390206040518060800160405290815f8201805461085c90613dc6565b80601f016020809104026020016040519081016040528092919081815260200182805461088890613dc6565b80156108d35780601f106108aa576101008083540402835291602001916108d3565b820191905f5260205f20905b8154815290600101906020018083116108b657829003601f168201915b505050505081526020016001820180546108ec90613dc6565b80601f016020809104026020016040519081016040528092919081815260200182805461091890613dc6565b80156109635780601f1061093a57610100808354040283529160200191610963565b820191905f5260205f20905b81548152906001019060200180831161094657829003601f168201915b5050505050815260200160028201805461097c90613dc6565b80601f01602080910402602001604051908101604052809291908181526020018280546109a890613dc6565b80156109f35780601f106109ca576101008083540402835291602001916109f3565b820191905f5260205f20905b8154815290600101906020018083116109d657829003601f168201915b505050505081526020016003820154815250509050949350505050565b610a18612e1f565b610a206122f6565b50610a2a8261066e565b610a69576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a60906141dc565b60405180910390fd5b5f600583604051610a7a9190613ea8565b90815260200160405180910390206002015414610acc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ac390614244565b60405180910390fd5b42600583604051610add9190613ea8565b908152602001604051809103902060020181905550610afb826124a7565b600582604051610b0b9190613ea8565b9081526020016040518091039020604051806101c00160405290815f82015f9054906101000a900460ff16600a811115610b4857610b4761357a565b5b600a811115610b5a57610b5961357a565b5b8152602001600182015481526020016002820154815260200160038201548152602001600482015481526020016005820154815260200160068201548152602001600782015481526020016008820154815260200160098201548152602001600a8201548152602001600b8201548152602001600c8201548152602001600d820154815250509050919050565b610bef6122f6565b50610bfb816002611985565b610c3a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c3190613e50565b60405180910390fd5b42600582604051610c4b9190613ea8565b908152602001604051809103902060070181905550610c6b816004612423565b50565b610c76612df8565b600682604051610c869190613ea8565b90815260200160405180910390206040518060800160405290815f82018054610cae90613dc6565b80601f0160208091040260200160405190810160405280929190818152602001828054610cda90613dc6565b8015610d255780601f10610cfc57610100808354040283529160200191610d25565b820191905f5260205f20905b815481529060010190602001808311610d0857829003601f168201915b50505050508152602001600182018054610d3e90613dc6565b80601f0160208091040260200160405190810160405280929190818152602001828054610d6a90613dc6565b8015610db55780601f10610d8c57610100808354040283529160200191610db5565b820191905f5260205f20905b815481529060010190602001808311610d9857829003601f168201915b50505050508152602001600282018054610dce90613dc6565b80601f0160208091040260200160405190810160405280929190818152602001828054610dfa90613dc6565b8015610e455780601f10610e1c57610100808354040283529160200191610e45565b820191905f5260205f20905b815481529060010190602001808311610e2857829003601f168201915b505050505081526020016003820154815250509050919050565b610e676122f6565b50610e73816001611985565b610eb2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ea990613f08565b60405180910390fd5b42600582604051610ec39190613ea8565b9081526020016040518091039020600b0181905550610ee3816008612423565b50565b610eee61255e565b610ef75f6125dc565b565b5f600682604051610f0a9190613ea8565b908152602001604051809103902060030154600383604051610f2c9190613ea8565b9081526020016040518091039020600d015f0154610f4a919061428f565b9050919050565b610f596122f6565b50610f64815f611985565b610fa3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f9a9061431a565b60405180910390fd5b42600582604051610fb49190613ea8565b9081526020016040518091039020600a0181905550610fd4816007612423565b50565b610fdf6122f6565b50610feb816004611985565b61102a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161102190614382565b60405180910390fd5b4260058260405161103b9190613ea8565b90815260200160405180910390206009018190555061105b816006612423565b50565b5f600160169054906101000a900460ff16159050808015611090575060018060159054906101000a900460ff1660ff16105b806110be575061109f3061269d565b1580156110bd575060018060159054906101000a900460ff1660ff16145b5b6110fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110f490614410565b60405180910390fd5b60018060156101000a81548160ff021916908360ff16021790555080156111395760018060166101000a81548160ff0219169083151502179055505b8015611192575f600160166101000a81548160ff0219169083151502179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249860016040516111899190614473565b60405180910390a15b50565b5f61119f82610ef9565b6003836040516111af9190613ea8565b9081526020016040518091039020600d01600201546111ce919061428f565b9050919050565b6111dd6122f6565b506111e9816004611985565b611228576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161121f90614382565b60405180910390fd5b426005826040516112399190613ea8565b908152602001604051809103902060080181905550611259816005612423565b50565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b61128b61255e565b5f600160146101000a81548160ff021916908315150217905550565b6112af612e92565b6112b76122f6565b506112c2855f611985565b611301576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112f89061431a565b60405180910390fd5b61130a846126bf565b611313836128d4565b61131c8561066e565b1561135d575f61132b86611b39565b905061133b81602001518661296a565b611349816040015185612be7565b611357816060015184612c31565b5061163c565b60405180608001604052808681526020018581526020018481526020018381525060038660405161138e9190613ea8565b90815260200160405180910390205f820151815f0190816113af91906140c3565b506020820151816001015f820151815f015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506020820151816001015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506040820151816002015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060608201518160030190805190602001906114a5929190612ecc565b5050506040820151816005015f820151815f015f820151815f01556020820151816001015550506020820151816002015f820151815f01556020820151816001015550506040820151816004015f820151815f01556020820151816001015550506060820151816006015f820151815f01556020820151816001015550505050606082015181600d015f820151815f0155602082015181600101556040820151816002015560608201518160030155505090505060045f856040015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2085908060018154018082558091505060019003905f5260205f20015f9091909190915090816115c991906140c3565b5060045f856020015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2085908060018154018082558091505060019003905f5260205f20015f90919091909150908161163a91906140c3565b505b60038560405161164c9190613ea8565b90815260200160405180910390206040518060800160405290815f8201805461167490613dc6565b80601f01602080910402602001604051908101604052809291908181526020018280546116a090613dc6565b80156116eb5780601f106116c2576101008083540402835291602001916116eb565b820191905f5260205f20905b8154815290600101906020018083116116ce57829003601f168201915b50505050508152602001600182016040518060800160405290815f82015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600182015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600282015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016003820180548060200260200160405190810160405280929190818152602001828054801561188457602002820191905f5260205f20905b815f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001906001019080831161183b575b5050505050815250508152602001600582016040518060800160405290815f82016040518060400160405290815f82015481526020016001820154815250508152602001600282016040518060400160405290815f82015481526020016001820154815250508152602001600482016040518060400160405290815f82015481526020016001820154815250508152602001600682016040518060400160405290815f8201548152602001600182015481525050815250508152602001600d82016040518060800160405290815f82015481526020016001820154815260200160028201548152602001600382015481525050815250509050949350505050565b5f61198f8361066e565b6119c1575f600a8111156119a6576119a561357a565b5b82600a8111156119b9576119b861357a565b5b149050611a17565b81600a8111156119d4576119d361357a565b5b6005846040516119e49190613ea8565b90815260200160405180910390205f015f9054906101000a900460ff16600a811115611a1357611a1261357a565b5b1490505b92915050565b5f60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b611a4d612e1f565b600582604051611a5d9190613ea8565b9081526020016040518091039020604051806101c00160405290815f82015f9054906101000a900460ff16600a811115611a9a57611a9961357a565b5b600a811115611aac57611aab61357a565b5b8152602001600182015481526020016002820154815260200160038201548152602001600482015481526020016005820154815260200160068201548152602001600782015481526020016008820154815260200160098201548152602001600a8201548152602001600b8201548152602001600c8201548152602001600d820154815250509050919050565b611b41612e92565b600382604051611b519190613ea8565b90815260200160405180910390206040518060800160405290815f82018054611b7990613dc6565b80601f0160208091040260200160405190810160405280929190818152602001828054611ba590613dc6565b8015611bf05780601f10611bc757610100808354040283529160200191611bf0565b820191905f5260205f20905b815481529060010190602001808311611bd357829003601f168201915b50505050508152602001600182016040518060800160405290815f82015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600182015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600282015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160038201805480602002602001604051908101604052809291908181526020018280548015611d8957602002820191905f5260205f20905b815f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311611d40575b5050505050815250508152602001600582016040518060800160405290815f82016040518060400160405290815f82015481526020016001820154815250508152602001600282016040518060400160405290815f82015481526020016001820154815250508152602001600482016040518060400160405290815f82015481526020016001820154815250508152602001600682016040518060400160405290815f8201548152602001600182015481525050815250508152602001600d82016040518060800160405290815f82015481526020016001820154815260200160028201548152602001600382015481525050815250509050919050565b611e8f6122f6565b50611e9b816004611985565b611eda576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ed190614382565b60405180910390fd5b42600582604051611eeb9190613ea8565b9081526020016040518091039020600d0181905550611f0b81600a612423565b50565b611f166122f6565b50611f22816002611985565b611f61576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f5890613e50565b60405180910390fd5b42600582604051611f729190613ea8565b9081526020016040518091039020600c0181905550611f92816009612423565b50565b611f9d612e1f565b611fa56122f6565b50611faf8261066e565b611fee576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611fe5906141dc565b60405180910390fd5b5f600583604051611fff9190613ea8565b90815260200160405180910390206001015414612051576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612048906144d6565b60405180910390fd5b426005836040516120629190613ea8565b908152602001604051809103902060010181905550612080826124a7565b6005826040516120909190613ea8565b9081526020016040518091039020604051806101c00160405290815f82015f9054906101000a900460ff16600a8111156120cd576120cc61357a565b5b600a8111156120df576120de61357a565b5b8152602001600182015481526020016002820154815260200160038201548152602001600482015481526020016005820154815260200160068201548152602001600782015481526020016008820154815260200160098201548152602001600a8201548152602001600b8201548152602001600c8201548152602001600d820154815250509050919050565b61217461255e565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036121e2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121d990614564565b60405180910390fd5b6121eb816125dc565b50565b6121f661255e565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603612264576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161225b906145f2565b60405180910390fd5b600160149054906101000a900460ff166122b3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122aa90614680565b60405180910390fd5b8060015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b5f8073ffffffffffffffffffffffffffffffffffffffff1660015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603612386576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161237d906145f2565b60405180910390fd5b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166123c6612d5b565b73ffffffffffffffffffffffffffffffffffffffff161461241c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124139061470e565b60405180910390fd5b6001905090565b806005836040516124349190613ea8565b90815260200160405180910390205f015f6101000a81548160ff0219169083600a8111156124655761246461357a565b5b02179055507f10ca3d89184491f5d8de422bd36534abe6eb4b4aa1429a261bdb5ff1dd9ac386828260405161249b929190614773565b60405180910390a15050565b5f6005826040516124b89190613ea8565b908152602001604051809103902060010154141580156124f957505f6005826040516124e49190613ea8565b90815260200160405180910390206002015414155b15612534574260058260405161250f9190613ea8565b90815260200160405180910390206004018190555061252f816001612423565b61255b565b426005826040516125459190613ea8565b9081526020016040518091039020600301819055505b50565b612566612d5b565b73ffffffffffffffffffffffffffffffffffffffff1661258461125c565b73ffffffffffffffffffffffffffffffffffffffff16146125da576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125d1906147eb565b60405180910390fd5b565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b5f73ffffffffffffffffffffffffffffffffffffffff16816040015173ffffffffffffffffffffffffffffffffffffffff1603612731576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161272890614853565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff16816020015173ffffffffffffffffffffffffffffffffffffffff16036127a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161279a906148bb565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff16815f015173ffffffffffffffffffffffffffffffffffffffff1603612814576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161280b90614923565b60405180910390fd5b5f8160600151511161285b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128529061498b565b60405180910390fd5b806020015173ffffffffffffffffffffffffffffffffffffffff16816040015173ffffffffffffffffffffffffffffffffffffffff16036128d1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128c8906149f3565b60405180910390fd5b50565b5f815f0151602001511461291d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161291490614a5b565b60405180910390fd5b5f81606001516020015114612967576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161295e90614ac3565b60405180910390fd5b50565b806040015173ffffffffffffffffffffffffffffffffffffffff16826040015173ffffffffffffffffffffffffffffffffffffffff16146129e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016129d790614b2b565b60405180910390fd5b806020015173ffffffffffffffffffffffffffffffffffffffff16826020015173ffffffffffffffffffffffffffffffffffffffff1614612a56576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a4d90614b93565b60405180910390fd5b805f015173ffffffffffffffffffffffffffffffffffffffff16825f015173ffffffffffffffffffffffffffffffffffffffff1614612aca576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612ac190614bfb565b60405180910390fd5b80606001515182606001515114612b16576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612b0d90614c63565b60405180910390fd5b5f5b826060015151811015612be25781606001518181518110612b3c57612b3b614c81565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1683606001518281518110612b7157612b70614c81565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614612bcf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612bc690614cf8565b60405180910390fd5b8080612bda90614d16565b915050612b18565b505050565b612bf7825f0151825f0151612d62565b612c0982602001518260200151612d62565b612c1b82604001518260400151612d62565b612c2d82606001518260600151612d62565b5050565b805f0151825f015114612c79576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612c7090614da7565b60405180910390fd5b8060200151826020015114612cc3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612cba90614e0f565b60405180910390fd5b8060400151826040015114612d0d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612d0490614e77565b60405180910390fd5b8060600151826060015114612d57576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612d4e90614edf565b60405180910390fd5b5050565b5f33905090565b805f0151825f015114612daa576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612da190614f47565b60405180910390fd5b8060200151826020015114612df4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612deb90614faf565b60405180910390fd5b5050565b60405180608001604052806060815260200160608152602001606081526020015f81525090565b604051806101c001604052805f600a811115612e3e57612e3d61357a565b5b81526020015f81526020015f81526020015f81526020015f81526020015f81526020015f81526020015f81526020015f81526020015f81526020015f81526020015f81526020015f81526020015f81525090565b604051806080016040528060608152602001612eac612f53565b8152602001612eb9612fba565b8152602001612ec6612ffa565b81525090565b828054828255905f5260205f20908101928215612f42579160200282015b82811115612f41578251825f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555091602001919060010190612eea565b5b509050612f4f919061301e565b5090565b60405180608001604052805f73ffffffffffffffffffffffffffffffffffffffff1681526020015f73ffffffffffffffffffffffffffffffffffffffff1681526020015f73ffffffffffffffffffffffffffffffffffffffff168152602001606081525090565b6040518060800160405280612fcd613039565b8152602001612fda613039565b8152602001612fe7613039565b8152602001612ff4613039565b81525090565b60405180608001604052805f81526020015f81526020015f81526020015f81525090565b5b80821115613035575f815f90555060010161301f565b5090565b60405180604001604052805f81526020015f81525090565b5f604051905090565b5f80fd5b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61308b82613062565b9050919050565b61309b81613081565b81146130a5575f80fd5b50565b5f813590506130b681613092565b92915050565b5f602082840312156130d1576130d061305a565b5b5f6130de848285016130a8565b91505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b5f81519050919050565b5f82825260208201905092915050565b5f5b8381101561314757808201518184015260208101905061312c565b5f8484015250505050565b5f601f19601f8301169050919050565b5f61316c82613110565b613176818561311a565b935061318681856020860161312a565b61318f81613152565b840191505092915050565b5f6131a58383613162565b905092915050565b5f602082019050919050565b5f6131c3826130e7565b6131cd81856130f1565b9350836020820285016131df85613101565b805f5b8581101561321a57848403895281516131fb858261319a565b9450613206836131ad565b925060208a019950506001810190506131e2565b50829750879550505050505092915050565b5f6020820190508181035f83015261324481846131b9565b905092915050565b5f80fd5b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b61328a82613152565b810181811067ffffffffffffffff821117156132a9576132a8613254565b5b80604052505050565b5f6132bb613051565b90506132c78282613281565b919050565b5f67ffffffffffffffff8211156132e6576132e5613254565b5b6132ef82613152565b9050602081019050919050565b828183375f83830152505050565b5f61331c613317846132cc565b6132b2565b90508281526020810184848401111561333857613337613250565b5b6133438482856132fc565b509392505050565b5f82601f83011261335f5761335e61324c565b5b813561336f84826020860161330a565b91505092915050565b5f6020828403121561338d5761338c61305a565b5b5f82013567ffffffffffffffff8111156133aa576133a961305e565b5b6133b68482850161334b565b91505092915050565b5f8115159050919050565b6133d3816133bf565b82525050565b5f6020820190506133ec5f8301846133ca565b92915050565b5f819050919050565b613404816133f2565b811461340e575f80fd5b50565b5f8135905061341f816133fb565b92915050565b5f805f806080858703121561343d5761343c61305a565b5b5f85013567ffffffffffffffff81111561345a5761345961305e565b5b6134668782880161334b565b945050602085013567ffffffffffffffff8111156134875761348661305e565b5b6134938782880161334b565b935050604085013567ffffffffffffffff8111156134b4576134b361305e565b5b6134c08782880161334b565b92505060606134d187828801613411565b91505092959194509250565b6134e6816133f2565b82525050565b5f608083015f8301518482035f8601526135068282613162565b915050602083015184820360208601526135208282613162565b9150506040830151848203604086015261353a8282613162565b915050606083015161354f60608601826134dd565b508091505092915050565b5f6020820190508181035f83015261357281846134ec565b905092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b600b81106135b8576135b761357a565b5b50565b5f8190506135c8826135a7565b919050565b5f6135d7826135bb565b9050919050565b6135e7816135cd565b82525050565b6101c082015f8201516136025f8501826135de565b50602082015161361560208501826134dd565b50604082015161362860408501826134dd565b50606082015161363b60608501826134dd565b50608082015161364e60808501826134dd565b5060a082015161366160a08501826134dd565b5060c082015161367460c08501826134dd565b5060e082015161368760e08501826134dd565b5061010082015161369c6101008501826134dd565b506101208201516136b16101208501826134dd565b506101408201516136c66101408501826134dd565b506101608201516136db6101608501826134dd565b506101808201516136f06101808501826134dd565b506101a08201516137056101a08501826134dd565b50505050565b5f6101c08201905061371f5f8301846135ed565b92915050565b61372e816133f2565b82525050565b5f6020820190506137475f830184613725565b92915050565b61375681613081565b82525050565b5f60208201905061376f5f83018461374d565b92915050565b5f80fd5b5f80fd5b5f67ffffffffffffffff82111561379757613796613254565b5b602082029050602081019050919050565b5f80fd5b5f6137be6137b98461377d565b6132b2565b905080838252602082019050602084028301858111156137e1576137e06137a8565b5b835b8181101561380a57806137f688826130a8565b8452602084019350506020810190506137e3565b5050509392505050565b5f82601f8301126138285761382761324c565b5b81356138388482602086016137ac565b91505092915050565b5f6080828403121561385657613855613775565b5b61386060806132b2565b90505f61386f848285016130a8565b5f830152506020613882848285016130a8565b6020830152506040613896848285016130a8565b604083015250606082013567ffffffffffffffff8111156138ba576138b9613779565b5b6138c684828501613814565b60608301525092915050565b5f604082840312156138e7576138e6613775565b5b6138f160406132b2565b90505f61390084828501613411565b5f83015250602061391384828501613411565b60208301525092915050565b5f610100828403121561393557613934613775565b5b61393f60806132b2565b90505f61394e848285016138d2565b5f830152506040613961848285016138d2565b6020830152506080613975848285016138d2565b60408301525060c0613989848285016138d2565b60608301525092915050565b5f608082840312156139aa576139a9613775565b5b6139b460806132b2565b90505f6139c384828501613411565b5f8301525060206139d684828501613411565b60208301525060406139ea84828501613411565b60408301525060606139fe84828501613411565b60608301525092915050565b5f805f806101c08587031215613a2357613a2261305a565b5b5f85013567ffffffffffffffff811115613a4057613a3f61305e565b5b613a4c8782880161334b565b945050602085013567ffffffffffffffff811115613a6d57613a6c61305e565b5b613a7987828801613841565b9350506040613a8a8782880161391f565b925050610140613a9c87828801613995565b91505092959194509250565b613ab181613081565b82525050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b5f613aeb8383613aa8565b60208301905092915050565b5f602082019050919050565b5f613b0d82613ab7565b613b178185613ac1565b9350613b2283613ad1565b805f5b83811015613b52578151613b398882613ae0565b9750613b4483613af7565b925050600181019050613b25565b5085935050505092915050565b5f608083015f830151613b745f860182613aa8565b506020830151613b876020860182613aa8565b506040830151613b9a6040860182613aa8565b5060608301518482036060860152613bb28282613b03565b9150508091505092915050565b604082015f820151613bd35f8501826134dd565b506020820151613be660208501826134dd565b50505050565b61010082015f820151613c015f850182613bbf565b506020820151613c146040850182613bbf565b506040820151613c276080850182613bbf565b506060820151613c3a60c0850182613bbf565b50505050565b608082015f820151613c545f8501826134dd565b506020820151613c6760208501826134dd565b506040820151613c7a60408501826134dd565b506060820151613c8d60608501826134dd565b50505050565b5f6101c083015f8301518482035f860152613cae8282613162565b91505060208301518482036020860152613cc88282613b5f565b9150506040830151613cdd6040860182613bec565b506060830151613cf1610140860182613c40565b508091505092915050565b5f6020820190508181035f830152613d148184613c93565b905092915050565b600b8110613d28575f80fd5b50565b5f81359050613d3981613d1c565b92915050565b5f8060408385031215613d5557613d5461305a565b5b5f83013567ffffffffffffffff811115613d7257613d7161305e565b5b613d7e8582860161334b565b9250506020613d8f85828601613d2b565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f6002820490506001821680613ddd57607f821691505b602082108103613df057613def613d99565b5b50919050565b5f82825260208201905092915050565b7f526573756c74735375626d6974746564000000000000000000000000000000005f82015250565b5f613e3a601083613df6565b9150613e4582613e06565b602082019050919050565b5f6020820190508181035f830152613e6781613e2e565b9050919050565b5f81905092915050565b5f613e8282613110565b613e8c8185613e6e565b9350613e9c81856020860161312a565b80840191505092915050565b5f613eb38284613e78565b915081905092915050565b7f4465616c416772656564000000000000000000000000000000000000000000005f82015250565b5f613ef2600a83613df6565b9150613efd82613ebe565b602082019050919050565b5f6020820190508181035f830152613f1f81613ee6565b9050919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f60088302613f827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82613f47565b613f8c8683613f47565b95508019841693508086168417925050509392505050565b5f819050919050565b5f613fc7613fc2613fbd846133f2565b613fa4565b6133f2565b9050919050565b5f819050919050565b613fe083613fad565b613ff4613fec82613fce565b848454613f53565b825550505050565b5f90565b614008613ffc565b614013818484613fd7565b505050565b5b818110156140365761402b5f82614000565b600181019050614019565b5050565b601f82111561407b5761404c81613f26565b61405584613f38565b81016020851015614064578190505b61407861407085613f38565b830182614018565b50505b505050565b5f82821c905092915050565b5f61409b5f1984600802614080565b1980831691505092915050565b5f6140b3838361408c565b9150826002028217905092915050565b6140cc82613110565b67ffffffffffffffff8111156140e5576140e4613254565b5b6140ef8254613dc6565b6140fa82828561403a565b5f60209050601f83116001811461412b575f8415614119578287015190505b61412385826140a8565b86555061418a565b601f19841661413986613f26565b5f5b828110156141605784890151825560018201915060208501945060208101905061413b565b8683101561417d5784890151614179601f89168261408c565b8355505b6001600288020188555050505b505050505050565b7f4465616c20646f6573206e6f74206578697374000000000000000000000000005f82015250565b5f6141c6601383613df6565b91506141d182614192565b602082019050919050565b5f6020820190508181035f8301526141f3816141ba565b9050919050565b7f4a432068617320616c72656164792061677265656400000000000000000000005f82015250565b5f61422e601583613df6565b9150614239826141fa565b602082019050919050565b5f6020820190508181035f83015261425b81614222565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f614299826133f2565b91506142a4836133f2565b92508282026142b2816133f2565b915082820484148315176142c9576142c8614262565b5b5092915050565b7f4465616c4e65676f74696174696e6700000000000000000000000000000000005f82015250565b5f614304600f83613df6565b915061430f826142d0565b602082019050919050565b5f6020820190508181035f830152614331816142f8565b9050919050565b7f526573756c7473436865636b65640000000000000000000000000000000000005f82015250565b5f61436c600e83613df6565b915061437782614338565b602082019050919050565b5f6020820190508181035f83015261439981614360565b9050919050565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c7265615f8201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b5f6143fa602e83613df6565b9150614405826143a0565b604082019050919050565b5f6020820190508181035f830152614427816143ee565b9050919050565b5f819050919050565b5f60ff82169050919050565b5f61445d6144586144538461442e565b613fa4565b614437565b9050919050565b61446d81614443565b82525050565b5f6020820190506144865f830184614464565b92915050565b7f52502068617320616c72656164792061677265656400000000000000000000005f82015250565b5f6144c0601583613df6565b91506144cb8261448c565b602082019050919050565b5f6020820190508181035f8301526144ed816144b4565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f20615f8201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b5f61454e602683613df6565b9150614559826144f4565b604082019050919050565b5f6020820190508181035f83015261457b81614542565b9050919050565b7f436f6e74726f6c6c65724f776e61626c653a20436f6e74726f6c6c65722061645f8201527f6472657373206d75737420626520646566696e65640000000000000000000000602082015250565b5f6145dc603583613df6565b91506145e782614582565b604082019050919050565b5f6020820190508181035f830152614609816145d0565b9050919050565b7f436f6e74726f6c6c65724f776e61626c653a2063616e4368616e6765436f6e745f8201527f726f6c6c6572416464726573732069732064697361626c656400000000000000602082015250565b5f61466a603983613df6565b915061467582614610565b604082019050919050565b5f6020820190508181035f8301526146978161465e565b9050919050565b7f436f6e74726f6c6c65724f776e61626c653a204f6e6c792074686520636f6e745f8201527f726f6c6c65722063616e2063616c6c2074686973206d6574686f640000000000602082015250565b5f6146f8603b83613df6565b91506147038261469e565b604082019050919050565b5f6020820190508181035f830152614725816146ec565b9050919050565b5f61473682613110565b6147408185613df6565b935061475081856020860161312a565b61475981613152565b840191505092915050565b61476d816135cd565b82525050565b5f6040820190508181035f83015261478b818561472c565b905061479a6020830184614764565b9392505050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725f82015250565b5f6147d5602083613df6565b91506147e0826147a1565b602082019050919050565b5f6020820190508181035f830152614802816147c9565b9050919050565b7f5250206d697373696e67000000000000000000000000000000000000000000005f82015250565b5f61483d600a83613df6565b915061484882614809565b602082019050919050565b5f6020820190508181035f83015261486a81614831565b9050919050565b7f4a43206d697373696e67000000000000000000000000000000000000000000005f82015250565b5f6148a5600a83613df6565b91506148b082614871565b602082019050919050565b5f6020820190508181035f8301526148d281614899565b9050919050565b7f536f6c766572206d697373696e670000000000000000000000000000000000005f82015250565b5f61490d600e83613df6565b9150614918826148d9565b602082019050919050565b5f6020820190508181035f83015261493a81614901565b9050919050565b7f4d65646961746f7273203c3d20300000000000000000000000000000000000005f82015250565b5f614975600e83613df6565b915061498082614941565b602082019050919050565b5f6020820190508181035f8301526149a281614969565b9050919050565b7f5250202f204a432073616d6500000000000000000000000000000000000000005f82015250565b5f6149dd600c83613df6565b91506149e8826149a9565b602082019050919050565b5f6020820190508181035f830152614a0a816149d1565b9050919050565b7f4167726565206465706f736974206d75737420626520300000000000000000005f82015250565b5f614a45601783613df6565b9150614a5082614a11565b602082019050919050565b5f6020820190508181035f830152614a7281614a39565b9050919050565b7f4d656469617465206465706f736974206d7573742062652030000000000000005f82015250565b5f614aad601983613df6565b9150614ab882614a79565b602082019050919050565b5f6020820190508181035f830152614ada81614aa1565b9050919050565b7f52500000000000000000000000000000000000000000000000000000000000005f82015250565b5f614b15600283613df6565b9150614b2082614ae1565b602082019050919050565b5f6020820190508181035f830152614b4281614b09565b9050919050565b7f4a430000000000000000000000000000000000000000000000000000000000005f82015250565b5f614b7d600283613df6565b9150614b8882614b49565b602082019050919050565b5f6020820190508181035f830152614baa81614b71565b9050919050565b7f536f6c76657200000000000000000000000000000000000000000000000000005f82015250565b5f614be5600683613df6565b9150614bf082614bb1565b602082019050919050565b5f6020820190508181035f830152614c1281614bd9565b9050919050565b7f4d65646961746f727300000000000000000000000000000000000000000000005f82015250565b5f614c4d600983613df6565b9150614c5882614c19565b602082019050919050565b5f6020820190508181035f830152614c7a81614c41565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b7f4d65646961746f720000000000000000000000000000000000000000000000005f82015250565b5f614ce2600883613df6565b9150614ced82614cae565b602082019050919050565b5f6020820190508181035f830152614d0f81614cd6565b9050919050565b5f614d20826133f2565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203614d5257614d51614262565b5b600182019050919050565b7f50726963650000000000000000000000000000000000000000000000000000005f82015250565b5f614d91600583613df6565b9150614d9c82614d5d565b602082019050919050565b5f6020820190508181035f830152614dbe81614d85565b9050919050565b7f5061796d656e74000000000000000000000000000000000000000000000000005f82015250565b5f614df9600783613df6565b9150614e0482614dc5565b602082019050919050565b5f6020820190508181035f830152614e2681614ded565b9050919050565b7f526573756c7473000000000000000000000000000000000000000000000000005f82015250565b5f614e61600783613df6565b9150614e6c82614e2d565b602082019050919050565b5f6020820190508181035f830152614e8e81614e55565b9050919050565b7f4d6564696174696f6e00000000000000000000000000000000000000000000005f82015250565b5f614ec9600983613df6565b9150614ed482614e95565b602082019050919050565b5f6020820190508181035f830152614ef681614ebd565b9050919050565b7f54696d656f7574000000000000000000000000000000000000000000000000005f82015250565b5f614f31600783613df6565b9150614f3c82614efd565b602082019050919050565b5f6020820190508181035f830152614f5e81614f25565b9050919050565b7f436f6c6c61746572616c000000000000000000000000000000000000000000005f82015250565b5f614f99600a83613df6565b9150614fa482614f65565b602082019050919050565b5f6020820190508181035f830152614fc681614f8d565b905091905056fea26469706673582212208a4ece8015b739b867606d7c639d41d2e97c699769bc0be4f3dd82bd24a8824664736f6c63430008150033", + "devdoc": { + "events": { + "Initialized(uint8)": { + "details": "Triggered when the contract has been initialized or reinitialized." + } + }, + "kind": "dev", + "methods": { + "owner()": { + "details": "Returns the address of the current owner." + }, + "renounceOwnership()": { + "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner." + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "acceptResult(string)": { + "notice": "Judge Results" + }, + "getAgreement(string)": { + "notice": "Agreements" + }, + "getDeal(string)": { + "notice": "Deals" + }, + "getJobCost(string)": { + "notice": "Costings" + }, + "getResult(string)": { + "notice": "Post Results" + }, + "hasDeal(string)": { + "notice": "Checkers" + }, + "initialize()": { + "notice": "Init" + }, + "mediationAcceptResult(string)": { + "notice": "Mediati:" + }, + "timeoutAgree(string)": { + "notice": "Timeouts" + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 680, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "_owner", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 1649, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "controllerAddress", + "offset": 0, + "slot": "1", + "type": "t_address" + }, + { + "astId": 1652, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "canChangeControllerAddress", + "offset": 20, + "slot": "1", + "type": "t_bool" + }, + { + "astId": 138, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "_initialized", + "offset": 21, + "slot": "1", + "type": "t_uint8" + }, + { + "astId": 141, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "_initializing", + "offset": 22, + "slot": "1", + "type": "t_bool" + }, + { + "astId": 5236, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "controllerAddress", + "offset": 0, + "slot": "2", + "type": "t_address" + }, + { + "astId": 5239, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "canChangeControllerAddress", + "offset": 20, + "slot": "2", + "type": "t_bool" + }, + { + "astId": 5244, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "deals", + "offset": 0, + "slot": "3", + "type": "t_mapping(t_string_memory_ptr,t_struct(Deal)6966_storage)" + }, + { + "astId": 5249, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "dealsForParty", + "offset": 0, + "slot": "4", + "type": "t_mapping(t_address,t_array(t_string_storage)dyn_storage)" + }, + { + "astId": 5254, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "agreements", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_string_memory_ptr,t_struct(Agreement)7005_storage)" + }, + { + "astId": 5259, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "results", + "offset": 0, + "slot": "6", + "type": "t_mapping(t_string_memory_ptr,t_struct(Result)6975_storage)" + }, + { + "astId": 5264, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "mediations", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_string_memory_ptr,t_struct(Result)6975_storage)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_address)dyn_storage": { + "base": "t_address", + "encoding": "dynamic_array", + "label": "address[]", + "numberOfBytes": "32" + }, + "t_array(t_string_storage)dyn_storage": { + "base": "t_string_storage", + "encoding": "dynamic_array", + "label": "string[]", + "numberOfBytes": "32" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_enum(AgreementState)6906": { + "encoding": "inplace", + "label": "enum SharedStructs.AgreementState", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_array(t_string_storage)dyn_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => string[])", + "numberOfBytes": "32", + "value": "t_array(t_string_storage)dyn_storage" + }, + "t_mapping(t_string_memory_ptr,t_struct(Agreement)7005_storage)": { + "encoding": "mapping", + "key": "t_string_memory_ptr", + "label": "mapping(string => struct SharedStructs.Agreement)", + "numberOfBytes": "32", + "value": "t_struct(Agreement)7005_storage" + }, + "t_mapping(t_string_memory_ptr,t_struct(Deal)6966_storage)": { + "encoding": "mapping", + "key": "t_string_memory_ptr", + "label": "mapping(string => struct SharedStructs.Deal)", + "numberOfBytes": "32", + "value": "t_struct(Deal)6966_storage" + }, + "t_mapping(t_string_memory_ptr,t_struct(Result)6975_storage)": { + "encoding": "mapping", + "key": "t_string_memory_ptr", + "label": "mapping(string => struct SharedStructs.Result)", + "numberOfBytes": "32", + "value": "t_struct(Result)6975_storage" + }, + "t_string_memory_ptr": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(Agreement)7005_storage": { + "encoding": "inplace", + "label": "struct SharedStructs.Agreement", + "members": [ + { + "astId": 6978, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "state", + "offset": 0, + "slot": "0", + "type": "t_enum(AgreementState)6906" + }, + { + "astId": 6980, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "resourceProviderAgreedAt", + "offset": 0, + "slot": "1", + "type": "t_uint256" + }, + { + "astId": 6982, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "jobCreatorAgreedAt", + "offset": 0, + "slot": "2", + "type": "t_uint256" + }, + { + "astId": 6984, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "dealCreatedAt", + "offset": 0, + "slot": "3", + "type": "t_uint256" + }, + { + "astId": 6986, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "dealAgreedAt", + "offset": 0, + "slot": "4", + "type": "t_uint256" + }, + { + "astId": 6988, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "resultsSubmittedAt", + "offset": 0, + "slot": "5", + "type": "t_uint256" + }, + { + "astId": 6990, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "resultsAcceptedAt", + "offset": 0, + "slot": "6", + "type": "t_uint256" + }, + { + "astId": 6992, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "resultsCheckedAt", + "offset": 0, + "slot": "7", + "type": "t_uint256" + }, + { + "astId": 6994, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "mediationAcceptedAt", + "offset": 0, + "slot": "8", + "type": "t_uint256" + }, + { + "astId": 6996, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "mediationRejectedAt", + "offset": 0, + "slot": "9", + "type": "t_uint256" + }, + { + "astId": 6998, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "timeoutAgreeAt", + "offset": 0, + "slot": "10", + "type": "t_uint256" + }, + { + "astId": 7000, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "timeoutSubmitResultsAt", + "offset": 0, + "slot": "11", + "type": "t_uint256" + }, + { + "astId": 7002, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "timeoutJudgeResultsAt", + "offset": 0, + "slot": "12", + "type": "t_uint256" + }, + { + "astId": 7004, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "timeoutMediateResultsAt", + "offset": 0, + "slot": "13", + "type": "t_uint256" + } + ], + "numberOfBytes": "448" + }, + "t_struct(Deal)6966_storage": { + "encoding": "inplace", + "label": "struct SharedStructs.Deal", + "members": [ + { + "astId": 6956, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "dealId", + "offset": 0, + "slot": "0", + "type": "t_string_storage" + }, + { + "astId": 6959, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "members", + "offset": 0, + "slot": "1", + "type": "t_struct(DealMembers)6927_storage" + }, + { + "astId": 6962, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "timeouts", + "offset": 0, + "slot": "5", + "type": "t_struct(DealTimeouts)6945_storage" + }, + { + "astId": 6965, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "pricing", + "offset": 0, + "slot": "13", + "type": "t_struct(DealPricing)6954_storage" + } + ], + "numberOfBytes": "544" + }, + "t_struct(DealMembers)6927_storage": { + "encoding": "inplace", + "label": "struct SharedStructs.DealMembers", + "members": [ + { + "astId": 6919, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "solver", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 6921, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "jobCreator", + "offset": 0, + "slot": "1", + "type": "t_address" + }, + { + "astId": 6923, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "resourceProvider", + "offset": 0, + "slot": "2", + "type": "t_address" + }, + { + "astId": 6926, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "mediators", + "offset": 0, + "slot": "3", + "type": "t_array(t_address)dyn_storage" + } + ], + "numberOfBytes": "128" + }, + "t_struct(DealPricing)6954_storage": { + "encoding": "inplace", + "label": "struct SharedStructs.DealPricing", + "members": [ + { + "astId": 6947, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "instructionPrice", + "offset": 0, + "slot": "0", + "type": "t_uint256" + }, + { + "astId": 6949, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "paymentCollateral", + "offset": 0, + "slot": "1", + "type": "t_uint256" + }, + { + "astId": 6951, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "resultsCollateralMultiple", + "offset": 0, + "slot": "2", + "type": "t_uint256" + }, + { + "astId": 6953, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "mediationFee", + "offset": 0, + "slot": "3", + "type": "t_uint256" + } + ], + "numberOfBytes": "128" + }, + "t_struct(DealTimeout)6932_storage": { + "encoding": "inplace", + "label": "struct SharedStructs.DealTimeout", + "members": [ + { + "astId": 6929, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "timeout", + "offset": 0, + "slot": "0", + "type": "t_uint256" + }, + { + "astId": 6931, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "collateral", + "offset": 0, + "slot": "1", + "type": "t_uint256" + } + ], + "numberOfBytes": "64" + }, + "t_struct(DealTimeouts)6945_storage": { + "encoding": "inplace", + "label": "struct SharedStructs.DealTimeouts", + "members": [ + { + "astId": 6935, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "agree", + "offset": 0, + "slot": "0", + "type": "t_struct(DealTimeout)6932_storage" + }, + { + "astId": 6938, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "submitResults", + "offset": 0, + "slot": "2", + "type": "t_struct(DealTimeout)6932_storage" + }, + { + "astId": 6941, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "judgeResults", + "offset": 0, + "slot": "4", + "type": "t_struct(DealTimeout)6932_storage" + }, + { + "astId": 6944, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "mediateResults", + "offset": 0, + "slot": "6", + "type": "t_struct(DealTimeout)6932_storage" + } + ], + "numberOfBytes": "256" + }, + "t_struct(Result)6975_storage": { + "encoding": "inplace", + "label": "struct SharedStructs.Result", + "members": [ + { + "astId": 6968, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "dealId", + "offset": 0, + "slot": "0", + "type": "t_string_storage" + }, + { + "astId": 6970, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "resultsId", + "offset": 0, + "slot": "1", + "type": "t_string_storage" + }, + { + "astId": 6972, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "dataId", + "offset": 0, + "slot": "2", + "type": "t_string_storage" + }, + { + "astId": 6974, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "instructionCount", + "offset": 0, + "slot": "3", + "type": "t_uint256" + } + ], + "numberOfBytes": "128" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + } + } + } +} \ No newline at end of file diff --git a/hardhat/deployments/orbit/LilypadToken.json b/hardhat/deployments/orbit/LilypadToken.json new file mode 100644 index 00000000..5b7cef40 --- /dev/null +++ b/hardhat/deployments/orbit/LilypadToken.json @@ -0,0 +1,794 @@ +{ + "address": "0xa513E6E4b8f2a923D98304ec87F64353C4D5C853", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol", + "type": "string" + }, + { + "internalType": "uint256", + "name": "initialSupply", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "disableChangeControllerAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_address", + "type": "address" + } + ], + "name": "escrowBalanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getControllerAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "payEscrow", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "fromAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "toAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "payJob", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "toAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "refundEscrow", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_controllerAddress", + "type": "address" + } + ], + "name": "setControllerAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "slashedAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "slashEscrow", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x92ed4e0547eacbf4eaedaa0369e42986e098134135ab69e8a9d783436f2d4f56", + "receipt": { + "to": null, + "from": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266", + "contractAddress": "0xa513E6E4b8f2a923D98304ec87F64353C4D5C853", + "transactionIndex": 1, + "gasUsed": "2325643", + "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000001000010000000010000000000000000000000020000000000000100000800000000000000000000000010000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000200000000000000000000000002000000000000000000020000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x955e20bff441d62f5d51c960ab15a03347446799bfe79a41ac05b31855e45b2c", + "transactionHash": "0x92ed4e0547eacbf4eaedaa0369e42986e098134135ab69e8a9d783436f2d4f56", + "logs": [ + { + "transactionIndex": 1, + "blockNumber": 27, + "transactionHash": "0x92ed4e0547eacbf4eaedaa0369e42986e098134135ab69e8a9d783436f2d4f56", + "address": "0xa513E6E4b8f2a923D98304ec87F64353C4D5C853", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x955e20bff441d62f5d51c960ab15a03347446799bfe79a41ac05b31855e45b2c" + }, + { + "transactionIndex": 1, + "blockNumber": 27, + "transactionHash": "0x92ed4e0547eacbf4eaedaa0369e42986e098134135ab69e8a9d783436f2d4f56", + "address": "0xa513E6E4b8f2a923D98304ec87F64353C4D5C853", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266" + ], + "data": "0x0000000000000000000000000000000000000000033b2e3c9fd0803ce8000000", + "logIndex": 1, + "blockHash": "0x955e20bff441d62f5d51c960ab15a03347446799bfe79a41ac05b31855e45b2c" + } + ], + "blockNumber": 27, + "cumulativeGasUsed": "2325643", + "status": 1, + "byzantium": true + }, + "args": [ + "Lilypad Token", + "LP", + "1000000000000000000000000000" + ], + "numDeployments": 1, + "solcInputHash": "06e78eaee1ee101e9b46d15f399432ba", + "metadata": "{\"compiler\":{\"version\":\"0.8.21+commit.d9974bed\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"initialSupply\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"disableChangeControllerAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"escrowBalanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getControllerAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"payEscrow\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"fromAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"toAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"payJob\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"toAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"refundEscrow\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_controllerAddress\",\"type\":\"address\"}],\"name\":\"setControllerAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"slashedAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"slashEscrow\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"Approval(address,address,uint256)\":{\"details\":\"Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance.\"},\"Paused(address)\":{\"details\":\"Emitted when the pause is triggered by `account`.\"},\"Transfer(address,address,uint256)\":{\"details\":\"Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero.\"},\"Unpaused(address)\":{\"details\":\"Emitted when the pause is lifted by `account`.\"}},\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the default value returned by this function, unless it's overridden. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"name()\":{\"details\":\"Returns the name of the token.\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `amount`. - the caller must have allowance for ``from``'s tokens of at least `amount`.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/LilypadToken.sol\":\"LilypadToken\"},\"evmVersion\":\"shanghai\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor() {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby disabling any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xba43b97fba0d32eb4254f6a5a297b39a19a247082a02d6e69349e071e2946218\",\"license\":\"MIT\"},\"@openzeppelin/contracts/security/Pausable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which allows children to implement an emergency stop\\n * mechanism that can be triggered by an authorized account.\\n *\\n * This module is used through inheritance. It will make available the\\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\\n * the functions of your contract. Note that they will not be pausable by\\n * simply including this module, only once the modifiers are put in place.\\n */\\nabstract contract Pausable is Context {\\n /**\\n * @dev Emitted when the pause is triggered by `account`.\\n */\\n event Paused(address account);\\n\\n /**\\n * @dev Emitted when the pause is lifted by `account`.\\n */\\n event Unpaused(address account);\\n\\n bool private _paused;\\n\\n /**\\n * @dev Initializes the contract in unpaused state.\\n */\\n constructor() {\\n _paused = false;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is not paused.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n modifier whenNotPaused() {\\n _requireNotPaused();\\n _;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is paused.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n modifier whenPaused() {\\n _requirePaused();\\n _;\\n }\\n\\n /**\\n * @dev Returns true if the contract is paused, and false otherwise.\\n */\\n function paused() public view virtual returns (bool) {\\n return _paused;\\n }\\n\\n /**\\n * @dev Throws if the contract is paused.\\n */\\n function _requireNotPaused() internal view virtual {\\n require(!paused(), \\\"Pausable: paused\\\");\\n }\\n\\n /**\\n * @dev Throws if the contract is not paused.\\n */\\n function _requirePaused() internal view virtual {\\n require(paused(), \\\"Pausable: not paused\\\");\\n }\\n\\n /**\\n * @dev Triggers stopped state.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n function _pause() internal virtual whenNotPaused {\\n _paused = true;\\n emit Paused(_msgSender());\\n }\\n\\n /**\\n * @dev Returns to normal state.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n function _unpause() internal virtual whenPaused {\\n _paused = false;\\n emit Unpaused(_msgSender());\\n }\\n}\\n\",\"keccak256\":\"0x0849d93b16c9940beb286a7864ed02724b248b93e0d80ef6355af5ef15c64773\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"./extensions/IERC20Metadata.sol\\\";\\nimport \\\"../../utils/Context.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * The default value of {decimals} is 18. To change this, you should override\\n * this function so it returns a different value.\\n *\\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\\n * instead returning `false` on failure. This behavior is nonetheless\\n * conventional and does not conflict with the expectations of ERC20\\n * applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20 is Context, IERC20, IERC20Metadata {\\n mapping(address => uint256) private _balances;\\n\\n mapping(address => mapping(address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}.\\n *\\n * All two of these values are immutable: they can only be set once during\\n * construction.\\n */\\n constructor(string memory name_, string memory symbol_) {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the default value returned by this function, unless\\n * it's overridden.\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual override returns (uint8) {\\n return 18;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address to, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _transfer(owner, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\\n * `transferFrom`. This is semantically equivalent to an infinite approval.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * NOTE: Does not update the allowance if the current allowance\\n * is the maximum `uint256`.\\n *\\n * Requirements:\\n *\\n * - `from` and `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``from``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) {\\n address spender = _msgSender();\\n _spendAllowance(from, spender, amount);\\n _transfer(from, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, allowance(owner, spender) + addedValue);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n uint256 currentAllowance = allowance(owner, spender);\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - subtractedValue);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves `amount` of tokens from `from` to `to`.\\n *\\n * This internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n */\\n function _transfer(address from, address to, uint256 amount) internal virtual {\\n require(from != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(to != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(from, to, amount);\\n\\n uint256 fromBalance = _balances[from];\\n require(fromBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n unchecked {\\n _balances[from] = fromBalance - amount;\\n // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by\\n // decrementing then incrementing.\\n _balances[to] += amount;\\n }\\n\\n emit Transfer(from, to, amount);\\n\\n _afterTokenTransfer(from, to, amount);\\n }\\n\\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n * the total supply.\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function _mint(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n\\n _beforeTokenTransfer(address(0), account, amount);\\n\\n _totalSupply += amount;\\n unchecked {\\n // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.\\n _balances[account] += amount;\\n }\\n emit Transfer(address(0), account, amount);\\n\\n _afterTokenTransfer(address(0), account, amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, reducing the\\n * total supply.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n * - `account` must have at least `amount` tokens.\\n */\\n function _burn(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n uint256 accountBalance = _balances[account];\\n require(accountBalance >= amount, \\\"ERC20: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[account] = accountBalance - amount;\\n // Overflow not possible: amount <= accountBalance <= totalSupply.\\n _totalSupply -= amount;\\n }\\n\\n emit Transfer(account, address(0), amount);\\n\\n _afterTokenTransfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Updates `owner` s allowance for `spender` based on spent `amount`.\\n *\\n * Does not update the allowance amount in case of infinite allowance.\\n * Revert if not enough allowance is available.\\n *\\n * Might emit an {Approval} event.\\n */\\n function _spendAllowance(address owner, address spender, uint256 amount) internal virtual {\\n uint256 currentAllowance = allowance(owner, spender);\\n if (currentAllowance != type(uint256).max) {\\n require(currentAllowance >= amount, \\\"ERC20: insufficient allowance\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - amount);\\n }\\n }\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * has been transferred to `to`.\\n * - when `from` is zero, `amount` tokens have been minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {}\\n}\\n\",\"keccak256\":\"0xa56ca923f70c1748830700250b19c61b70db9a683516dc5e216694a50445d99c\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/ERC20Pausable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/ERC20Pausable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC20.sol\\\";\\nimport \\\"../../../security/Pausable.sol\\\";\\n\\n/**\\n * @dev ERC20 token with pausable token transfers, minting and burning.\\n *\\n * Useful for scenarios such as preventing trades until the end of an evaluation\\n * period, or having an emergency switch for freezing all token transfers in the\\n * event of a large bug.\\n *\\n * IMPORTANT: This contract does not include public pause and unpause functions. In\\n * addition to inheriting this contract, you must define both functions, invoking the\\n * {Pausable-_pause} and {Pausable-_unpause} internal functions, with appropriate\\n * access control, e.g. using {AccessControl} or {Ownable}. Not doing so will\\n * make the contract unpausable.\\n */\\nabstract contract ERC20Pausable is ERC20, Pausable {\\n /**\\n * @dev See {ERC20-_beforeTokenTransfer}.\\n *\\n * Requirements:\\n *\\n * - the contract must not be paused.\\n */\\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual override {\\n super._beforeTokenTransfer(from, to, amount);\\n\\n require(!paused(), \\\"ERC20Pausable: token transfer while paused\\\");\\n }\\n}\\n\",\"keccak256\":\"0x180079d8b66f41427ac8ba376d9b60da8161eb327827d3085623798305d4658b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC20 standard.\\n *\\n * _Available since v4.1._\\n */\\ninterface IERC20Metadata is IERC20 {\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the symbol of the token.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the decimals places of the token.\\n */\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x8de418a5503946cabe331f35fe242d3201a73f67f77aaeb7110acb1f30423aca\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"contracts/ControllerOwnable.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\npragma solidity ^0.8.6;\\n\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\n\\n// as well as being ownable (i.e. our admin wallet)\\n// this contract has a modifier called onlyController\\n// it works the same way as Ownable but only the Owner\\n// can change the controller address so it gives us a way of\\n// re-pointing contracts if needed\\ncontract ControllerOwnable is Ownable {\\n\\n // the address of the controller that is allowed to call functions\\n address private controllerAddress;\\n\\n // used to \\\"freeze\\\" the controller address - even the admin cannot\\n // change it from this point onwards\\n bool private canChangeControllerAddress = true;\\n\\n modifier onlyController() {\\n _checkControllerAccess();\\n _;\\n }\\n\\n function _checkControllerAccess() internal view virtual returns (bool) {\\n require(controllerAddress != address(0), \\\"ControllerOwnable: Controller address must be defined\\\");\\n require(_msgSender() == controllerAddress, \\\"ControllerOwnable: Only the controller can call this method\\\");\\n return true;\\n }\\n\\n function setControllerAddress(address _controllerAddress) public onlyOwner {\\n require(_controllerAddress != address(0), \\\"ControllerOwnable: Controller address must be defined\\\");\\n require(canChangeControllerAddress, \\\"ControllerOwnable: canChangeControllerAddress is disabled\\\");\\n controllerAddress = _controllerAddress;\\n }\\n\\n function getControllerAddress() public view returns (address) {\\n return controllerAddress;\\n }\\n\\n function disableChangeControllerAddress() public onlyOwner {\\n canChangeControllerAddress = false;\\n }\\n}\\n\",\"keccak256\":\"0xecfd8b0beb12340f51cefee5e121932fa7aee0a41fb7d0233966419d153ef429\",\"license\":\"Apache-2.0\"},\"contracts/LilypadToken.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\npragma solidity ^0.8.6;\\n\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC20/ERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC20/extensions/ERC20Pausable.sol\\\";\\nimport \\\"./ControllerOwnable.sol\\\";\\n\\n/*\\n standard ERC20 token but with some additional features:\\n\\n * ControllerOwnable\\n * for paying in, we use tx.origin so the actual payee must call the contract\\n * for paying out - we use the Controller Ownable feature so only the payments contract\\n can pay out from the escrow account\\n * escrowBalanceOf\\n * get the current escrow balance for an address\\n * payEscrow\\n * pay into the escrow account\\n * refundEscrow\\n * get refunded from the escrow account\\n * payJob\\n * reduce the \\\"from\\\" account by X amount\\n * actually pay that amount to the \\\"to\\\" address\\n * slashEscrow\\n * reduce the \\\"slashed\\\" account by X amount\\n\\n the escrow functions are designed to be called by the payments contract\\n\\n * deploy this contract as admin\\n * deploy the payments contract as admin and pass this address to it\\n * update the ControllerOwnable address of this contract to be the payments contract\\n \\n now, only the payments contract can call the escrow functions that pay out\\n\\n */\\ncontract LilypadToken is ControllerOwnable, ERC20, ERC20Pausable {\\n\\n // keep track of the current escrow balance for each address\\n mapping(address => uint256) private escrowBalances;\\n\\n constructor(\\n string memory name,\\n string memory symbol,\\n uint256 initialSupply\\n ) ERC20(name, symbol) {\\n _mint(msg.sender, initialSupply);\\n }\\n\\n function escrowBalanceOf(\\n address _address\\n ) public view returns (uint256) {\\n return escrowBalances[_address];\\n }\\n\\n // money being paid into the escrow account\\n function payEscrow(\\n uint256 amount\\n ) public returns (bool) {\\n // it's important we use tx.origin and not msg.sender here\\n // msg.sender will be the payments contract\\n // tx.origin will be the user who called the controller -> payments -> token\\n // i.e. the account that is actually paying into the escrow address\\n _transfer(tx.origin, address(this), amount);\\n escrowBalances[tx.origin] += amount;\\n return true;\\n }\\n\\n // money being paid back from the escrow account\\n function refundEscrow(\\n address toAddress,\\n uint256 amount\\n ) public onlyController returns (bool) {\\n require(toAddress != address(0), \\\"LilypadToken: toAddress cannot be zero address\\\");\\n require(escrowBalances[toAddress] >= amount, \\\"LilypadToken: not enough funds in escrow\\\");\\n escrowBalances[toAddress] -= amount;\\n _transfer(address(this), toAddress, amount);\\n return true;\\n }\\n\\n // pay the RP account from the JC escrow account\\n function payJob(\\n address fromAddress,\\n address toAddress,\\n uint256 amount\\n ) public onlyController returns (bool) {\\n require(escrowBalances[fromAddress] >= amount, \\\"LilypadToken: not enough funds in escrow\\\");\\n escrowBalances[fromAddress] -= amount;\\n _transfer(address(this), toAddress, amount);\\n return true;\\n }\\n\\n // the given party has been slashed so the money stays in the contract\\n // TODO: what should happen to slashed funds?\\n // at the moment we move them to the owner address so they are not locked\\n function slashEscrow(\\n address slashedAddress,\\n uint256 amount\\n ) public onlyController returns (bool) {\\n require(escrowBalances[slashedAddress] >= amount, \\\"LilypadToken: not enough funds in escrow\\\");\\n escrowBalances[slashedAddress] -= amount;\\n _transfer(address(this), owner(), amount);\\n return true;\\n }\\n\\n function pause() public onlyOwner {\\n _pause();\\n }\\n\\n function unpause() public onlyOwner {\\n _unpause();\\n }\\n\\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal override(ERC20, ERC20Pausable) {\\n super._beforeTokenTransfer(from, to, amount);\\n }\\n}\\n\",\"keccak256\":\"0xb9c559cdc356a5acb42dd33475982cebb8aefd282e79f4dc7f928f24967b162a\",\"license\":\"Apache-2.0\"}},\"version\":1}", + "bytecode": "0x608060405260018060146101000a81548160ff0219169083151502179055503480156200002a575f80fd5b5060405162002efd38038062002efd833981810160405281019062000050919062000559565b82826200007262000066620000cc60201b60201c565b620000d360201b60201c565b81600590816200008391906200081e565b5080600690816200009591906200081e565b5050505f60075f6101000a81548160ff021916908315150217905550620000c333826200019460201b60201c565b50505062000aa7565b5f33905090565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160362000205576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620001fc9062000960565b60405180910390fd5b620002185f8383620002fa60201b60201c565b8060045f8282546200022b9190620009ad565b925050819055508060025f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508173ffffffffffffffffffffffffffffffffffffffff165f73ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051620002db9190620009f8565b60405180910390a3620002f65f83836200031260201b60201c565b5050565b6200030d8383836200031760201b60201c565b505050565b505050565b6200032a8383836200038260201b60201c565b6200033a6200038760201b60201c565b156200037d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620003749062000a87565b60405180910390fd5b505050565b505050565b5f60075f9054906101000a900460ff16905090565b5f604051905090565b5f80fd5b5f80fd5b5f80fd5b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b620003fd82620003b5565b810181811067ffffffffffffffff821117156200041f576200041e620003c5565b5b80604052505050565b5f620004336200039c565b9050620004418282620003f2565b919050565b5f67ffffffffffffffff821115620004635762000462620003c5565b5b6200046e82620003b5565b9050602081019050919050565b5f5b838110156200049a5780820151818401526020810190506200047d565b5f8484015250505050565b5f620004bb620004b58462000446565b62000428565b905082815260208101848484011115620004da57620004d9620003b1565b5b620004e78482856200047b565b509392505050565b5f82601f830112620005065762000505620003ad565b5b815162000518848260208601620004a5565b91505092915050565b5f819050919050565b620005358162000521565b811462000540575f80fd5b50565b5f8151905062000553816200052a565b92915050565b5f805f60608486031215620005735762000572620003a5565b5b5f84015167ffffffffffffffff811115620005935762000592620003a9565b5b620005a186828701620004ef565b935050602084015167ffffffffffffffff811115620005c557620005c4620003a9565b5b620005d386828701620004ef565b9250506040620005e68682870162000543565b9150509250925092565b5f81519050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f60028204905060018216806200063f57607f821691505b602082108103620006555762000654620005fa565b5b50919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f60088302620006b97fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826200067c565b620006c586836200067c565b95508019841693508086168417925050509392505050565b5f819050919050565b5f6200070662000700620006fa8462000521565b620006dd565b62000521565b9050919050565b5f819050919050565b6200072183620006e6565b6200073962000730826200070d565b84845462000688565b825550505050565b5f90565b6200074f62000741565b6200075c81848462000716565b505050565b5b818110156200078357620007775f8262000745565b60018101905062000762565b5050565b601f821115620007d2576200079c816200065b565b620007a7846200066d565b81016020851015620007b7578190505b620007cf620007c6856200066d565b83018262000761565b50505b505050565b5f82821c905092915050565b5f620007f45f1984600802620007d7565b1980831691505092915050565b5f6200080e8383620007e3565b9150826002028217905092915050565b6200082982620005f0565b67ffffffffffffffff811115620008455762000844620003c5565b5b62000851825462000627565b6200085e82828562000787565b5f60209050601f83116001811462000894575f84156200087f578287015190505b6200088b858262000801565b865550620008fa565b601f198416620008a4866200065b565b5f5b82811015620008cd57848901518255600182019150602085019450602081019050620008a6565b86831015620008ed5784890151620008e9601f891682620007e3565b8355505b6001600288020188555050505b505050505050565b5f82825260208201905092915050565b7f45524332303a206d696e7420746f20746865207a65726f2061646472657373005f82015250565b5f62000948601f8362000902565b9150620009558262000912565b602082019050919050565b5f6020820190508181035f83015262000979816200093a565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f620009b98262000521565b9150620009c68362000521565b9250828201905080821115620009e157620009e062000980565b5b92915050565b620009f28162000521565b82525050565b5f60208201905062000a0d5f830184620009e7565b92915050565b7f45524332305061757361626c653a20746f6b656e207472616e736665722077685f8201527f696c652070617573656400000000000000000000000000000000000000000000602082015250565b5f62000a6f602a8362000902565b915062000a7c8262000a13565b604082019050919050565b5f6020820190508181035f83015262000aa08162000a61565b9050919050565b6124488062000ab55f395ff3fe608060405234801561000f575f80fd5b5060043610610171575f3560e01c8063715018a6116100dc578063a457c2d711610095578063c57380a21161006f578063c57380a214610461578063dd62ed3e1461047f578063f2fde38b146104af578063f3d3d448146104cb57610171565b8063a457c2d7146103f7578063a470295814610427578063a9059cbb1461043157610171565b8063715018a6146103475780638456cb591461035157806388c2bdfe1461035b5780638da5cb5b1461038b57806395d89b41146103a9578063987bf9a7146103c757610171565b8063395093511161012e578063395093511461025f5780633f4ba83a1461028f5780635407e93c14610299578063599efa6b146102c95780635c975abb146102f957806370a082311461031757610171565b8063065e86c81461017557806306fdde03146101a5578063095ea7b3146101c357806318160ddd146101f357806323b872dd14610211578063313ce56714610241575b5f80fd5b61018f600480360381019061018a91906117c9565b6104e7565b60405161019c9190611833565b60405180910390f35b6101ad6105da565b6040516101ba91906118d6565b60405180910390f35b6101dd60048036038101906101d891906118f6565b61066a565b6040516101ea9190611833565b60405180910390f35b6101fb61068c565b6040516102089190611943565b60405180910390f35b61022b600480360381019061022691906117c9565b610695565b6040516102389190611833565b60405180910390f35b6102496106c3565b6040516102569190611977565b60405180910390f35b610279600480360381019061027491906118f6565b6106cb565b6040516102869190611833565b60405180910390f35b610297610701565b005b6102b360048036038101906102ae9190611990565b610713565b6040516102c09190611833565b60405180910390f35b6102e360048036038101906102de91906118f6565b61077b565b6040516102f09190611833565b60405180910390f35b6103016108db565b60405161030e9190611833565b60405180910390f35b610331600480360381019061032c91906119bb565b6108f0565b60405161033e9190611943565b60405180910390f35b61034f610936565b005b610359610949565b005b610375600480360381019061037091906118f6565b61095b565b6040516103829190611833565b60405180910390f35b610393610a54565b6040516103a091906119f5565b60405180910390f35b6103b1610a7b565b6040516103be91906118d6565b60405180910390f35b6103e160048036038101906103dc91906119bb565b610b0b565b6040516103ee9190611943565b60405180910390f35b610411600480360381019061040c91906118f6565b610b51565b60405161041e9190611833565b60405180910390f35b61042f610bc6565b005b61044b600480360381019061044691906118f6565b610bea565b6040516104589190611833565b60405180910390f35b610469610c0c565b60405161047691906119f5565b60405180910390f35b61049960048036038101906104949190611a0e565b610c34565b6040516104a69190611943565b60405180910390f35b6104c960048036038101906104c491906119bb565b610cb6565b005b6104e560048036038101906104e091906119bb565b610d38565b005b5f6104f0610e40565b508160085f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20541015610571576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161056890611abc565b60405180910390fd5b8160085f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8282546105bd9190611b07565b925050819055506105cf308484610f6d565b600190509392505050565b6060600580546105e990611b67565b80601f016020809104026020016040519081016040528092919081815260200182805461061590611b67565b80156106605780601f1061063757610100808354040283529160200191610660565b820191905f5260205f20905b81548152906001019060200180831161064357829003601f168201915b5050505050905090565b5f806106746111dc565b90506106818185856111e3565b600191505092915050565b5f600454905090565b5f8061069f6111dc565b90506106ac8582856113a6565b6106b7858585610f6d565b60019150509392505050565b5f6012905090565b5f806106d56111dc565b90506106f68185856106e78589610c34565b6106f19190611b97565b6111e3565b600191505092915050565b610709611431565b6107116114af565b565b5f61071f323084610f6d565b8160085f3273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825461076b9190611b97565b9250508190555060019050919050565b5f610784610e40565b505f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036107f3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107ea90611c3a565b60405180910390fd5b8160085f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20541015610873576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161086a90611abc565b60405180910390fd5b8160085f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8282546108bf9190611b07565b925050819055506108d1308484610f6d565b6001905092915050565b5f60075f9054906101000a900460ff16905090565b5f60025f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050919050565b61093e611431565b6109475f611510565b565b610951611431565b6109596115d1565b565b5f610964610e40565b508160085f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205410156109e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109dc90611abc565b60405180910390fd5b8160085f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f828254610a319190611b07565b92505081905550610a4a30610a44610a54565b84610f6d565b6001905092915050565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060068054610a8a90611b67565b80601f0160208091040260200160405190810160405280929190818152602001828054610ab690611b67565b8015610b015780601f10610ad857610100808354040283529160200191610b01565b820191905f5260205f20905b815481529060010190602001808311610ae457829003601f168201915b5050505050905090565b5f60085f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050919050565b5f80610b5b6111dc565b90505f610b688286610c34565b905083811015610bad576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ba490611cc8565b60405180910390fd5b610bba82868684036111e3565b60019250505092915050565b610bce611431565b5f600160146101000a81548160ff021916908315150217905550565b5f80610bf46111dc565b9050610c01818585610f6d565b600191505092915050565b5f60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b5f60035f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905092915050565b610cbe611431565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610d2c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d2390611d56565b60405180910390fd5b610d3581611510565b50565b610d40611431565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610dae576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610da590611de4565b60405180910390fd5b600160149054906101000a900460ff16610dfd576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610df490611e72565b60405180910390fd5b8060015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b5f8073ffffffffffffffffffffffffffffffffffffffff1660015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603610ed0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ec790611de4565b60405180910390fd5b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610f106111dc565b73ffffffffffffffffffffffffffffffffffffffff1614610f66576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f5d90611f00565b60405180910390fd5b6001905090565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610fdb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fd290611f8e565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611049576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110409061201c565b60405180910390fd5b611054838383611633565b5f60025f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050818110156110d8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110cf906120aa565b60405180910390fd5b81810360025f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055508160025f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516111c39190611943565b60405180910390a36111d6848484611643565b50505050565b5f33905090565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603611251576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161124890612138565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036112bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112b6906121c6565b60405180910390fd5b8060035f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516113999190611943565b60405180910390a3505050565b5f6113b18484610c34565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff811461142b578181101561141d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114149061222e565b60405180910390fd5b61142a84848484036111e3565b5b50505050565b6114396111dc565b73ffffffffffffffffffffffffffffffffffffffff16611457610a54565b73ffffffffffffffffffffffffffffffffffffffff16146114ad576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114a490612296565b60405180910390fd5b565b6114b7611648565b5f60075f6101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6114f96111dc565b60405161150691906119f5565b60405180910390a1565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6115d9611691565b600160075f6101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861161c6111dc565b60405161162991906119f5565b60405180910390a1565b61163e8383836116db565b505050565b505050565b6116506108db565b61168f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611686906122fe565b60405180910390fd5b565b6116996108db565b156116d9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116d090612366565b60405180910390fd5b565b6116e6838383611733565b6116ee6108db565b1561172e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611725906123f4565b60405180910390fd5b505050565b505050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6117658261173c565b9050919050565b6117758161175b565b811461177f575f80fd5b50565b5f813590506117908161176c565b92915050565b5f819050919050565b6117a881611796565b81146117b2575f80fd5b50565b5f813590506117c38161179f565b92915050565b5f805f606084860312156117e0576117df611738565b5b5f6117ed86828701611782565b93505060206117fe86828701611782565b925050604061180f868287016117b5565b9150509250925092565b5f8115159050919050565b61182d81611819565b82525050565b5f6020820190506118465f830184611824565b92915050565b5f81519050919050565b5f82825260208201905092915050565b5f5b83811015611883578082015181840152602081019050611868565b5f8484015250505050565b5f601f19601f8301169050919050565b5f6118a88261184c565b6118b28185611856565b93506118c2818560208601611866565b6118cb8161188e565b840191505092915050565b5f6020820190508181035f8301526118ee818461189e565b905092915050565b5f806040838503121561190c5761190b611738565b5b5f61191985828601611782565b925050602061192a858286016117b5565b9150509250929050565b61193d81611796565b82525050565b5f6020820190506119565f830184611934565b92915050565b5f60ff82169050919050565b6119718161195c565b82525050565b5f60208201905061198a5f830184611968565b92915050565b5f602082840312156119a5576119a4611738565b5b5f6119b2848285016117b5565b91505092915050565b5f602082840312156119d0576119cf611738565b5b5f6119dd84828501611782565b91505092915050565b6119ef8161175b565b82525050565b5f602082019050611a085f8301846119e6565b92915050565b5f8060408385031215611a2457611a23611738565b5b5f611a3185828601611782565b9250506020611a4285828601611782565b9150509250929050565b7f4c696c79706164546f6b656e3a206e6f7420656e6f7567682066756e647320695f8201527f6e20657363726f77000000000000000000000000000000000000000000000000602082015250565b5f611aa6602883611856565b9150611ab182611a4c565b604082019050919050565b5f6020820190508181035f830152611ad381611a9a565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f611b1182611796565b9150611b1c83611796565b9250828203905081811115611b3457611b33611ada565b5b92915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f6002820490506001821680611b7e57607f821691505b602082108103611b9157611b90611b3a565b5b50919050565b5f611ba182611796565b9150611bac83611796565b9250828201905080821115611bc457611bc3611ada565b5b92915050565b7f4c696c79706164546f6b656e3a20746f416464726573732063616e6e6f7420625f8201527f65207a65726f2061646472657373000000000000000000000000000000000000602082015250565b5f611c24602e83611856565b9150611c2f82611bca565b604082019050919050565b5f6020820190508181035f830152611c5181611c18565b9050919050565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f775f8201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b5f611cb2602583611856565b9150611cbd82611c58565b604082019050919050565b5f6020820190508181035f830152611cdf81611ca6565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f20615f8201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b5f611d40602683611856565b9150611d4b82611ce6565b604082019050919050565b5f6020820190508181035f830152611d6d81611d34565b9050919050565b7f436f6e74726f6c6c65724f776e61626c653a20436f6e74726f6c6c65722061645f8201527f6472657373206d75737420626520646566696e65640000000000000000000000602082015250565b5f611dce603583611856565b9150611dd982611d74565b604082019050919050565b5f6020820190508181035f830152611dfb81611dc2565b9050919050565b7f436f6e74726f6c6c65724f776e61626c653a2063616e4368616e6765436f6e745f8201527f726f6c6c6572416464726573732069732064697361626c656400000000000000602082015250565b5f611e5c603983611856565b9150611e6782611e02565b604082019050919050565b5f6020820190508181035f830152611e8981611e50565b9050919050565b7f436f6e74726f6c6c65724f776e61626c653a204f6e6c792074686520636f6e745f8201527f726f6c6c65722063616e2063616c6c2074686973206d6574686f640000000000602082015250565b5f611eea603b83611856565b9150611ef582611e90565b604082019050919050565b5f6020820190508181035f830152611f1781611ede565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f2061645f8201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b5f611f78602583611856565b9150611f8382611f1e565b604082019050919050565b5f6020820190508181035f830152611fa581611f6c565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f20616464725f8201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b5f612006602383611856565b915061201182611fac565b604082019050919050565b5f6020820190508181035f83015261203381611ffa565b9050919050565b7f45524332303a207472616e7366657220616d6f756e74206578636565647320625f8201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b5f612094602683611856565b915061209f8261203a565b604082019050919050565b5f6020820190508181035f8301526120c181612088565b9050919050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f206164645f8201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b5f612122602483611856565b915061212d826120c8565b604082019050919050565b5f6020820190508181035f83015261214f81612116565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f2061646472655f8201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b5f6121b0602283611856565b91506121bb82612156565b604082019050919050565b5f6020820190508181035f8301526121dd816121a4565b9050919050565b7f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000005f82015250565b5f612218601d83611856565b9150612223826121e4565b602082019050919050565b5f6020820190508181035f8301526122458161220c565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725f82015250565b5f612280602083611856565b915061228b8261224c565b602082019050919050565b5f6020820190508181035f8301526122ad81612274565b9050919050565b7f5061757361626c653a206e6f74207061757365640000000000000000000000005f82015250565b5f6122e8601483611856565b91506122f3826122b4565b602082019050919050565b5f6020820190508181035f830152612315816122dc565b9050919050565b7f5061757361626c653a20706175736564000000000000000000000000000000005f82015250565b5f612350601083611856565b915061235b8261231c565b602082019050919050565b5f6020820190508181035f83015261237d81612344565b9050919050565b7f45524332305061757361626c653a20746f6b656e207472616e736665722077685f8201527f696c652070617573656400000000000000000000000000000000000000000000602082015250565b5f6123de602a83611856565b91506123e982612384565b604082019050919050565b5f6020820190508181035f83015261240b816123d2565b905091905056fea26469706673582212201d8d13bbe4cf01e08b4ea25478b99ae89cdf8b5ea85127299fa37feb146b075164736f6c63430008150033", + "deployedBytecode": "0x608060405234801561000f575f80fd5b5060043610610171575f3560e01c8063715018a6116100dc578063a457c2d711610095578063c57380a21161006f578063c57380a214610461578063dd62ed3e1461047f578063f2fde38b146104af578063f3d3d448146104cb57610171565b8063a457c2d7146103f7578063a470295814610427578063a9059cbb1461043157610171565b8063715018a6146103475780638456cb591461035157806388c2bdfe1461035b5780638da5cb5b1461038b57806395d89b41146103a9578063987bf9a7146103c757610171565b8063395093511161012e578063395093511461025f5780633f4ba83a1461028f5780635407e93c14610299578063599efa6b146102c95780635c975abb146102f957806370a082311461031757610171565b8063065e86c81461017557806306fdde03146101a5578063095ea7b3146101c357806318160ddd146101f357806323b872dd14610211578063313ce56714610241575b5f80fd5b61018f600480360381019061018a91906117c9565b6104e7565b60405161019c9190611833565b60405180910390f35b6101ad6105da565b6040516101ba91906118d6565b60405180910390f35b6101dd60048036038101906101d891906118f6565b61066a565b6040516101ea9190611833565b60405180910390f35b6101fb61068c565b6040516102089190611943565b60405180910390f35b61022b600480360381019061022691906117c9565b610695565b6040516102389190611833565b60405180910390f35b6102496106c3565b6040516102569190611977565b60405180910390f35b610279600480360381019061027491906118f6565b6106cb565b6040516102869190611833565b60405180910390f35b610297610701565b005b6102b360048036038101906102ae9190611990565b610713565b6040516102c09190611833565b60405180910390f35b6102e360048036038101906102de91906118f6565b61077b565b6040516102f09190611833565b60405180910390f35b6103016108db565b60405161030e9190611833565b60405180910390f35b610331600480360381019061032c91906119bb565b6108f0565b60405161033e9190611943565b60405180910390f35b61034f610936565b005b610359610949565b005b610375600480360381019061037091906118f6565b61095b565b6040516103829190611833565b60405180910390f35b610393610a54565b6040516103a091906119f5565b60405180910390f35b6103b1610a7b565b6040516103be91906118d6565b60405180910390f35b6103e160048036038101906103dc91906119bb565b610b0b565b6040516103ee9190611943565b60405180910390f35b610411600480360381019061040c91906118f6565b610b51565b60405161041e9190611833565b60405180910390f35b61042f610bc6565b005b61044b600480360381019061044691906118f6565b610bea565b6040516104589190611833565b60405180910390f35b610469610c0c565b60405161047691906119f5565b60405180910390f35b61049960048036038101906104949190611a0e565b610c34565b6040516104a69190611943565b60405180910390f35b6104c960048036038101906104c491906119bb565b610cb6565b005b6104e560048036038101906104e091906119bb565b610d38565b005b5f6104f0610e40565b508160085f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20541015610571576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161056890611abc565b60405180910390fd5b8160085f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8282546105bd9190611b07565b925050819055506105cf308484610f6d565b600190509392505050565b6060600580546105e990611b67565b80601f016020809104026020016040519081016040528092919081815260200182805461061590611b67565b80156106605780601f1061063757610100808354040283529160200191610660565b820191905f5260205f20905b81548152906001019060200180831161064357829003601f168201915b5050505050905090565b5f806106746111dc565b90506106818185856111e3565b600191505092915050565b5f600454905090565b5f8061069f6111dc565b90506106ac8582856113a6565b6106b7858585610f6d565b60019150509392505050565b5f6012905090565b5f806106d56111dc565b90506106f68185856106e78589610c34565b6106f19190611b97565b6111e3565b600191505092915050565b610709611431565b6107116114af565b565b5f61071f323084610f6d565b8160085f3273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825461076b9190611b97565b9250508190555060019050919050565b5f610784610e40565b505f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036107f3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107ea90611c3a565b60405180910390fd5b8160085f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20541015610873576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161086a90611abc565b60405180910390fd5b8160085f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8282546108bf9190611b07565b925050819055506108d1308484610f6d565b6001905092915050565b5f60075f9054906101000a900460ff16905090565b5f60025f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050919050565b61093e611431565b6109475f611510565b565b610951611431565b6109596115d1565b565b5f610964610e40565b508160085f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205410156109e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109dc90611abc565b60405180910390fd5b8160085f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f828254610a319190611b07565b92505081905550610a4a30610a44610a54565b84610f6d565b6001905092915050565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060068054610a8a90611b67565b80601f0160208091040260200160405190810160405280929190818152602001828054610ab690611b67565b8015610b015780601f10610ad857610100808354040283529160200191610b01565b820191905f5260205f20905b815481529060010190602001808311610ae457829003601f168201915b5050505050905090565b5f60085f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050919050565b5f80610b5b6111dc565b90505f610b688286610c34565b905083811015610bad576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ba490611cc8565b60405180910390fd5b610bba82868684036111e3565b60019250505092915050565b610bce611431565b5f600160146101000a81548160ff021916908315150217905550565b5f80610bf46111dc565b9050610c01818585610f6d565b600191505092915050565b5f60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b5f60035f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905092915050565b610cbe611431565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610d2c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d2390611d56565b60405180910390fd5b610d3581611510565b50565b610d40611431565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610dae576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610da590611de4565b60405180910390fd5b600160149054906101000a900460ff16610dfd576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610df490611e72565b60405180910390fd5b8060015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b5f8073ffffffffffffffffffffffffffffffffffffffff1660015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603610ed0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ec790611de4565b60405180910390fd5b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610f106111dc565b73ffffffffffffffffffffffffffffffffffffffff1614610f66576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f5d90611f00565b60405180910390fd5b6001905090565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610fdb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fd290611f8e565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611049576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110409061201c565b60405180910390fd5b611054838383611633565b5f60025f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050818110156110d8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110cf906120aa565b60405180910390fd5b81810360025f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055508160025f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516111c39190611943565b60405180910390a36111d6848484611643565b50505050565b5f33905090565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603611251576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161124890612138565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036112bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112b6906121c6565b60405180910390fd5b8060035f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516113999190611943565b60405180910390a3505050565b5f6113b18484610c34565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff811461142b578181101561141d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114149061222e565b60405180910390fd5b61142a84848484036111e3565b5b50505050565b6114396111dc565b73ffffffffffffffffffffffffffffffffffffffff16611457610a54565b73ffffffffffffffffffffffffffffffffffffffff16146114ad576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114a490612296565b60405180910390fd5b565b6114b7611648565b5f60075f6101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6114f96111dc565b60405161150691906119f5565b60405180910390a1565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6115d9611691565b600160075f6101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861161c6111dc565b60405161162991906119f5565b60405180910390a1565b61163e8383836116db565b505050565b505050565b6116506108db565b61168f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611686906122fe565b60405180910390fd5b565b6116996108db565b156116d9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116d090612366565b60405180910390fd5b565b6116e6838383611733565b6116ee6108db565b1561172e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611725906123f4565b60405180910390fd5b505050565b505050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6117658261173c565b9050919050565b6117758161175b565b811461177f575f80fd5b50565b5f813590506117908161176c565b92915050565b5f819050919050565b6117a881611796565b81146117b2575f80fd5b50565b5f813590506117c38161179f565b92915050565b5f805f606084860312156117e0576117df611738565b5b5f6117ed86828701611782565b93505060206117fe86828701611782565b925050604061180f868287016117b5565b9150509250925092565b5f8115159050919050565b61182d81611819565b82525050565b5f6020820190506118465f830184611824565b92915050565b5f81519050919050565b5f82825260208201905092915050565b5f5b83811015611883578082015181840152602081019050611868565b5f8484015250505050565b5f601f19601f8301169050919050565b5f6118a88261184c565b6118b28185611856565b93506118c2818560208601611866565b6118cb8161188e565b840191505092915050565b5f6020820190508181035f8301526118ee818461189e565b905092915050565b5f806040838503121561190c5761190b611738565b5b5f61191985828601611782565b925050602061192a858286016117b5565b9150509250929050565b61193d81611796565b82525050565b5f6020820190506119565f830184611934565b92915050565b5f60ff82169050919050565b6119718161195c565b82525050565b5f60208201905061198a5f830184611968565b92915050565b5f602082840312156119a5576119a4611738565b5b5f6119b2848285016117b5565b91505092915050565b5f602082840312156119d0576119cf611738565b5b5f6119dd84828501611782565b91505092915050565b6119ef8161175b565b82525050565b5f602082019050611a085f8301846119e6565b92915050565b5f8060408385031215611a2457611a23611738565b5b5f611a3185828601611782565b9250506020611a4285828601611782565b9150509250929050565b7f4c696c79706164546f6b656e3a206e6f7420656e6f7567682066756e647320695f8201527f6e20657363726f77000000000000000000000000000000000000000000000000602082015250565b5f611aa6602883611856565b9150611ab182611a4c565b604082019050919050565b5f6020820190508181035f830152611ad381611a9a565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f611b1182611796565b9150611b1c83611796565b9250828203905081811115611b3457611b33611ada565b5b92915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f6002820490506001821680611b7e57607f821691505b602082108103611b9157611b90611b3a565b5b50919050565b5f611ba182611796565b9150611bac83611796565b9250828201905080821115611bc457611bc3611ada565b5b92915050565b7f4c696c79706164546f6b656e3a20746f416464726573732063616e6e6f7420625f8201527f65207a65726f2061646472657373000000000000000000000000000000000000602082015250565b5f611c24602e83611856565b9150611c2f82611bca565b604082019050919050565b5f6020820190508181035f830152611c5181611c18565b9050919050565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f775f8201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b5f611cb2602583611856565b9150611cbd82611c58565b604082019050919050565b5f6020820190508181035f830152611cdf81611ca6565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f20615f8201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b5f611d40602683611856565b9150611d4b82611ce6565b604082019050919050565b5f6020820190508181035f830152611d6d81611d34565b9050919050565b7f436f6e74726f6c6c65724f776e61626c653a20436f6e74726f6c6c65722061645f8201527f6472657373206d75737420626520646566696e65640000000000000000000000602082015250565b5f611dce603583611856565b9150611dd982611d74565b604082019050919050565b5f6020820190508181035f830152611dfb81611dc2565b9050919050565b7f436f6e74726f6c6c65724f776e61626c653a2063616e4368616e6765436f6e745f8201527f726f6c6c6572416464726573732069732064697361626c656400000000000000602082015250565b5f611e5c603983611856565b9150611e6782611e02565b604082019050919050565b5f6020820190508181035f830152611e8981611e50565b9050919050565b7f436f6e74726f6c6c65724f776e61626c653a204f6e6c792074686520636f6e745f8201527f726f6c6c65722063616e2063616c6c2074686973206d6574686f640000000000602082015250565b5f611eea603b83611856565b9150611ef582611e90565b604082019050919050565b5f6020820190508181035f830152611f1781611ede565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f2061645f8201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b5f611f78602583611856565b9150611f8382611f1e565b604082019050919050565b5f6020820190508181035f830152611fa581611f6c565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f20616464725f8201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b5f612006602383611856565b915061201182611fac565b604082019050919050565b5f6020820190508181035f83015261203381611ffa565b9050919050565b7f45524332303a207472616e7366657220616d6f756e74206578636565647320625f8201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b5f612094602683611856565b915061209f8261203a565b604082019050919050565b5f6020820190508181035f8301526120c181612088565b9050919050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f206164645f8201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b5f612122602483611856565b915061212d826120c8565b604082019050919050565b5f6020820190508181035f83015261214f81612116565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f2061646472655f8201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b5f6121b0602283611856565b91506121bb82612156565b604082019050919050565b5f6020820190508181035f8301526121dd816121a4565b9050919050565b7f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000005f82015250565b5f612218601d83611856565b9150612223826121e4565b602082019050919050565b5f6020820190508181035f8301526122458161220c565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725f82015250565b5f612280602083611856565b915061228b8261224c565b602082019050919050565b5f6020820190508181035f8301526122ad81612274565b9050919050565b7f5061757361626c653a206e6f74207061757365640000000000000000000000005f82015250565b5f6122e8601483611856565b91506122f3826122b4565b602082019050919050565b5f6020820190508181035f830152612315816122dc565b9050919050565b7f5061757361626c653a20706175736564000000000000000000000000000000005f82015250565b5f612350601083611856565b915061235b8261231c565b602082019050919050565b5f6020820190508181035f83015261237d81612344565b9050919050565b7f45524332305061757361626c653a20746f6b656e207472616e736665722077685f8201527f696c652070617573656400000000000000000000000000000000000000000000602082015250565b5f6123de602a83611856565b91506123e982612384565b604082019050919050565b5f6020820190508181035f83015261240b816123d2565b905091905056fea26469706673582212201d8d13bbe4cf01e08b4ea25478b99ae89cdf8b5ea85127299fa37feb146b075164736f6c63430008150033", + "devdoc": { + "events": { + "Approval(address,address,uint256)": { + "details": "Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance." + }, + "Paused(address)": { + "details": "Emitted when the pause is triggered by `account`." + }, + "Transfer(address,address,uint256)": { + "details": "Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero." + }, + "Unpaused(address)": { + "details": "Emitted when the pause is lifted by `account`." + } + }, + "kind": "dev", + "methods": { + "allowance(address,address)": { + "details": "See {IERC20-allowance}." + }, + "approve(address,uint256)": { + "details": "See {IERC20-approve}. NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address." + }, + "balanceOf(address)": { + "details": "See {IERC20-balanceOf}." + }, + "decimals()": { + "details": "Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the default value returned by this function, unless it's overridden. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}." + }, + "decreaseAllowance(address,uint256)": { + "details": "Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`." + }, + "increaseAllowance(address,uint256)": { + "details": "Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address." + }, + "name()": { + "details": "Returns the name of the token." + }, + "owner()": { + "details": "Returns the address of the current owner." + }, + "paused()": { + "details": "Returns true if the contract is paused, and false otherwise." + }, + "renounceOwnership()": { + "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner." + }, + "symbol()": { + "details": "Returns the symbol of the token, usually a shorter version of the name." + }, + "totalSupply()": { + "details": "See {IERC20-totalSupply}." + }, + "transfer(address,uint256)": { + "details": "See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `amount`." + }, + "transferFrom(address,address,uint256)": { + "details": "See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `amount`. - the caller must have allowance for ``from``'s tokens of at least `amount`." + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 680, + "contract": "contracts/LilypadToken.sol:LilypadToken", + "label": "_owner", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 1649, + "contract": "contracts/LilypadToken.sol:LilypadToken", + "label": "controllerAddress", + "offset": 0, + "slot": "1", + "type": "t_address" + }, + { + "astId": 1652, + "contract": "contracts/LilypadToken.sol:LilypadToken", + "label": "canChangeControllerAddress", + "offset": 20, + "slot": "1", + "type": "t_bool" + }, + { + "astId": 909, + "contract": "contracts/LilypadToken.sol:LilypadToken", + "label": "_balances", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 915, + "contract": "contracts/LilypadToken.sol:LilypadToken", + "label": "_allowances", + "offset": 0, + "slot": "3", + "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" + }, + { + "astId": 917, + "contract": "contracts/LilypadToken.sol:LilypadToken", + "label": "_totalSupply", + "offset": 0, + "slot": "4", + "type": "t_uint256" + }, + { + "astId": 919, + "contract": "contracts/LilypadToken.sol:LilypadToken", + "label": "_name", + "offset": 0, + "slot": "5", + "type": "t_string_storage" + }, + { + "astId": 921, + "contract": "contracts/LilypadToken.sol:LilypadToken", + "label": "_symbol", + "offset": 0, + "slot": "6", + "type": "t_string_storage" + }, + { + "astId": 803, + "contract": "contracts/LilypadToken.sol:LilypadToken", + "label": "_paused", + "offset": 0, + "slot": "7", + "type": "t_bool" + }, + { + "astId": 6306, + "contract": "contracts/LilypadToken.sol:LilypadToken", + "label": "escrowBalances", + "offset": 0, + "slot": "8", + "type": "t_mapping(t_address,t_uint256)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_mapping(t_address,t_uint256))": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => mapping(address => uint256))", + "numberOfBytes": "32", + "value": "t_mapping(t_address,t_uint256)" + }, + "t_mapping(t_address,t_uint256)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/hardhat/deployments/orbit/LilypadUsers.json b/hardhat/deployments/orbit/LilypadUsers.json new file mode 100644 index 00000000..3badc15f --- /dev/null +++ b/hardhat/deployments/orbit/LilypadUsers.json @@ -0,0 +1,419 @@ +{ + "address": "0x0DCd1Bf9A1b36cE34237eEaFef220932846BCD82", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "enum SharedStructs.ServiceType", + "name": "serviceType", + "type": "uint8" + } + ], + "name": "addUserToList", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "userAddress", + "type": "address" + } + ], + "name": "getUser", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "userAddress", + "type": "address" + }, + { + "internalType": "string", + "name": "metadataCID", + "type": "string" + }, + { + "internalType": "string", + "name": "url", + "type": "string" + }, + { + "internalType": "enum SharedStructs.ServiceType[]", + "name": "roles", + "type": "uint8[]" + } + ], + "internalType": "struct SharedStructs.User", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum SharedStructs.ServiceType", + "name": "serviceType", + "type": "uint8" + } + ], + "name": "removeUserFromList", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum SharedStructs.ServiceType", + "name": "serviceType", + "type": "uint8" + } + ], + "name": "showUsersInList", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "metadataCID", + "type": "string" + }, + { + "internalType": "string", + "name": "url", + "type": "string" + }, + { + "internalType": "enum SharedStructs.ServiceType[]", + "name": "roles", + "type": "uint8[]" + } + ], + "name": "updateUser", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "userAddress", + "type": "address" + }, + { + "internalType": "string", + "name": "metadataCID", + "type": "string" + }, + { + "internalType": "string", + "name": "url", + "type": "string" + }, + { + "internalType": "enum SharedStructs.ServiceType[]", + "name": "roles", + "type": "uint8[]" + } + ], + "internalType": "struct SharedStructs.User", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0xbfd4fe38a7876afbc71c2d2bc1f235c1a7f915b07bee36f83beb01673f82aeb8", + "receipt": { + "to": null, + "from": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266", + "contractAddress": "0x0DCd1Bf9A1b36cE34237eEaFef220932846BCD82", + "transactionIndex": 1, + "gasUsed": "1918583", + "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000400000000000020000000000000100000800000000000000000000000000000000400000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000002000000000000000000020000000000000000000000000000000000000000000020000000000000000000000", + "blockHash": "0x62f93f2aaddbc696aa0e8e4b31cc9d248ef50efa308bff436a8cf32795b70357", + "transactionHash": "0xbfd4fe38a7876afbc71c2d2bc1f235c1a7f915b07bee36f83beb01673f82aeb8", + "logs": [ + { + "transactionIndex": 1, + "blockNumber": 33, + "transactionHash": "0xbfd4fe38a7876afbc71c2d2bc1f235c1a7f915b07bee36f83beb01673f82aeb8", + "address": "0x0DCd1Bf9A1b36cE34237eEaFef220932846BCD82", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x62f93f2aaddbc696aa0e8e4b31cc9d248ef50efa308bff436a8cf32795b70357" + } + ], + "blockNumber": 33, + "cumulativeGasUsed": "1918583", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "06e78eaee1ee101e9b46d15f399432ba", + "metadata": "{\"compiler\":{\"version\":\"0.8.21+commit.d9974bed\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"enum SharedStructs.ServiceType\",\"name\":\"serviceType\",\"type\":\"uint8\"}],\"name\":\"addUserToList\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"userAddress\",\"type\":\"address\"}],\"name\":\"getUser\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"userAddress\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"metadataCID\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"url\",\"type\":\"string\"},{\"internalType\":\"enum SharedStructs.ServiceType[]\",\"name\":\"roles\",\"type\":\"uint8[]\"}],\"internalType\":\"struct SharedStructs.User\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum SharedStructs.ServiceType\",\"name\":\"serviceType\",\"type\":\"uint8\"}],\"name\":\"removeUserFromList\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum SharedStructs.ServiceType\",\"name\":\"serviceType\",\"type\":\"uint8\"}],\"name\":\"showUsersInList\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"metadataCID\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"url\",\"type\":\"string\"},{\"internalType\":\"enum SharedStructs.ServiceType[]\",\"name\":\"roles\",\"type\":\"uint8[]\"}],\"name\":\"updateUser\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"userAddress\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"metadataCID\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"url\",\"type\":\"string\"},{\"internalType\":\"enum SharedStructs.ServiceType[]\",\"name\":\"roles\",\"type\":\"uint8[]\"}],\"internalType\":\"struct SharedStructs.User\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"}},\"kind\":\"dev\",\"methods\":{\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"getUser(address)\":{\"notice\":\"Users\"},\"initialize()\":{\"notice\":\"Init\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/LilypadUsers.sol\":\"LilypadUsers\"},\"evmVersion\":\"shanghai\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized != type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x9c80f545915582e63fe206c6ce27cbe85a86fc10b9cd2a0e8c9488fb7c2ee422\",\"license\":\"MIT\"},\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor() {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby disabling any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xba43b97fba0d32eb4254f6a5a297b39a19a247082a02d6e69349e071e2946218\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"contracts/ControllerOwnable.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\npragma solidity ^0.8.6;\\n\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\n\\n// as well as being ownable (i.e. our admin wallet)\\n// this contract has a modifier called onlyController\\n// it works the same way as Ownable but only the Owner\\n// can change the controller address so it gives us a way of\\n// re-pointing contracts if needed\\ncontract ControllerOwnable is Ownable {\\n\\n // the address of the controller that is allowed to call functions\\n address private controllerAddress;\\n\\n // used to \\\"freeze\\\" the controller address - even the admin cannot\\n // change it from this point onwards\\n bool private canChangeControllerAddress = true;\\n\\n modifier onlyController() {\\n _checkControllerAccess();\\n _;\\n }\\n\\n function _checkControllerAccess() internal view virtual returns (bool) {\\n require(controllerAddress != address(0), \\\"ControllerOwnable: Controller address must be defined\\\");\\n require(_msgSender() == controllerAddress, \\\"ControllerOwnable: Only the controller can call this method\\\");\\n return true;\\n }\\n\\n function setControllerAddress(address _controllerAddress) public onlyOwner {\\n require(_controllerAddress != address(0), \\\"ControllerOwnable: Controller address must be defined\\\");\\n require(canChangeControllerAddress, \\\"ControllerOwnable: canChangeControllerAddress is disabled\\\");\\n controllerAddress = _controllerAddress;\\n }\\n\\n function getControllerAddress() public view returns (address) {\\n return controllerAddress;\\n }\\n\\n function disableChangeControllerAddress() public onlyOwner {\\n canChangeControllerAddress = false;\\n }\\n}\\n\",\"keccak256\":\"0xecfd8b0beb12340f51cefee5e121932fa7aee0a41fb7d0233966419d153ef429\",\"license\":\"Apache-2.0\"},\"contracts/LilypadUsers.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\npragma solidity ^0.8.6;\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport \\\"./SharedStructs.sol\\\";\\nimport \\\"./ControllerOwnable.sol\\\";\\n\\ncontract LilypadUsers is Ownable, Initializable {\\n\\n // a map of user address -> user\\n mapping(address => SharedStructs.User) private users;\\n\\n // a map of user type => user address[]\\n mapping(SharedStructs.ServiceType => address[]) private usersByType;\\n\\n /**\\n * Init\\n */\\n\\n // https://docs.openzeppelin.com/upgrades-plugins/1.x/writing-upgradeable\\n function initialize() public initializer {\\n \\n }\\n\\n /**\\n * Users\\n */\\n\\n function getUser(\\n address userAddress\\n ) public view returns (SharedStructs.User memory) {\\n return users[userAddress];\\n }\\n\\n function updateUser(\\n string memory metadataCID,\\n string memory url,\\n SharedStructs.ServiceType[] memory roles\\n ) public returns (SharedStructs.User memory) {\\n SharedStructs.User memory newUser = SharedStructs.User(\\n tx.origin,\\n metadataCID,\\n url,\\n roles\\n );\\n users[tx.origin] = newUser;\\n return newUser;\\n }\\n\\n function addUserToList(\\n SharedStructs.ServiceType serviceType\\n ) public {\\n require(users[tx.origin].userAddress != address(0), \\\"User must exist\\\");\\n (, bool found) = _getUserListIndex(serviceType, tx.origin);\\n require(!found, \\\"User is already part of that list\\\");\\n require(_doesUserHaveRole(serviceType, tx.origin), \\\"User must have that role\\\");\\n usersByType[serviceType].push(tx.origin);\\n }\\n\\n function removeUserFromList(\\n SharedStructs.ServiceType serviceType\\n ) public {\\n require(users[tx.origin].userAddress != address(0), \\\"User must exist\\\");\\n (uint256 index, bool found) = _getUserListIndex(serviceType, tx.origin);\\n require(found, \\\"User is not part of that list\\\");\\n for (uint256 i = index; i < usersByType[serviceType].length - 1; i++) {\\n usersByType[serviceType][i] = usersByType[serviceType][i + 1];\\n }\\n usersByType[serviceType].pop();\\n }\\n\\n function showUsersInList(\\n SharedStructs.ServiceType serviceType\\n ) public view returns (address[] memory) {\\n return usersByType[serviceType];\\n }\\n\\n // returns the index of the user found in the service list\\n // it returns 0 and false if the user is not found\\n function _getUserListIndex(\\n SharedStructs.ServiceType serviceType,\\n address userAddress\\n ) private view returns (uint256, bool) {\\n uint256 ret = 0;\\n bool found = false;\\n for (uint256 i = 0; i < usersByType[serviceType].length; i++) {\\n if (usersByType[serviceType][i] == userAddress) {\\n ret = i;\\n found = true;\\n break;\\n }\\n }\\n return (ret, found);\\n }\\n\\n function _doesUserHaveRole(\\n SharedStructs.ServiceType serviceType,\\n address userAddress\\n ) private view returns (bool) {\\n bool found = false;\\n for (uint256 i = 0; i < users[userAddress].roles.length; i++) {\\n if (users[userAddress].roles[i] == serviceType) {\\n found = true;\\n break;\\n }\\n }\\n return found;\\n }\\n}\\n\",\"keccak256\":\"0x7bca139366d9913f795252bae9583f7d634a599927cace6fc2163c22a6cf16c4\",\"license\":\"Apache-2.0\"},\"contracts/SharedStructs.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\npragma solidity ^0.8.6;\\n\\nlibrary SharedStructs {\\n\\n enum ServiceType {\\n Solver,\\n Mediator,\\n ResourceProvider,\\n JobCreator\\n }\\n\\n enum AgreementState {\\n\\n // the two parties have not yet both agreed to the deal\\n DealNegotiating,\\n\\n // both parties have agreed\\n DealAgreed,\\n\\n // results have been submitted by the RP\\n ResultsSubmitted,\\n\\n // the JC has accepted the results\\n ResultsAccepted,\\n\\n // the JC has checked the results\\n ResultsChecked,\\n\\n // a mediator has accepted the results\\n MediationAccepted,\\n\\n // a mediator has rejected the results\\n MediationRejected,\\n\\n // this means the counter-party did not agree to the deal in time\\n TimeoutAgree,\\n\\n // this means the RP did not submit results in time\\n TimeoutSubmitResults,\\n\\n // this means the JC did not accept or reject results in time\\n TimeoutJudgeResults,\\n\\n // this means the mediator did not accept or submit judgement in time\\n TimeoutMediateResults\\n\\n }\\n\\n // we map addresses onto infomation about the user\\n struct User {\\n address userAddress;\\n // the CID of information for this user\\n string metadataCID;\\n string url;\\n ServiceType[] roles;\\n }\\n\\n // the various addresses involved in runnig a deal\\n struct DealMembers {\\n // the address of the solver service that the RP and JC have agreed to use\\n address solver;\\n // the addresses of the RP and JC that have agreed to this deal\\n address jobCreator;\\n address resourceProvider;\\n // the list of mediators that the RP and JC have agreed to use\\n address[] mediators;\\n }\\n\\n // a timeout represents the agreed amount of time and the penalty\\n // that is applied if the timeout is exceeded \\n struct DealTimeout {\\n uint256 timeout;\\n uint256 collateral;\\n }\\n \\n // the various forms of timeout a deal can have\\n struct DealTimeouts { \\n DealTimeout agree;\\n DealTimeout submitResults;\\n DealTimeout judgeResults;\\n DealTimeout mediateResults;\\n }\\n\\n // configure the cost of a deal\\n struct DealPricing {\\n // agreed price per instruction\\n uint256 instructionPrice;\\n\\n // the collateral that the JC has put up to pay for the job\\n // the final cost of the job will be deducted from this\\n uint256 paymentCollateral;\\n\\n // how much collateral the RP will post to attest it's results are correct\\n // this is a multiple of the cost of the job which is known at results\\n // submission time\\n uint256 resultsCollateralMultiple;\\n\\n // how much is the JC willing to pay the mediator to resolve disputes\\n uint256 mediationFee;\\n }\\n\\n // a Deal forms the information that is agreed between both parties\\n // both parties must have called \\\"agree_deal\\\" with the exact\\n // same parameters before the deal is considered valid\\n // a Deal is immutable - nothing about it can be updated\\n struct Deal {\\n // the CID of the Deal document on IPFS (and directory service)\\n // this contains the job spec, the job offer and the resource offer\\n string dealId;\\n\\n // who is participating in this deal\\n DealMembers members;\\n \\n // the timeout settings for a deal\\n DealTimeouts timeouts;\\n\\n // the pricing settings for a deal\\n DealPricing pricing; \\n }\\n\\n // what the RP submits back once having run the job\\n // this is also immutable\\n struct Result {\\n // the id of the deal that this result is for\\n string dealId;\\n\\n // the CID of the results on IPFS (and directory service)\\n // NOTE - this is not the CID of actual results data rather\\n // of the JSON object reporting that data\\n string resultsId;\\n\\n // this is the actual lower level data CID\\n string dataId;\\n\\n // how many instructions were executed by the RP\\n uint256 instructionCount;\\n }\\n\\n // an agreement keeps track of the state of a deal and it's fields can be mutated\\n struct Agreement {\\n // the current state of the agreement\\n AgreementState state;\\n\\n uint256 resourceProviderAgreedAt;\\n uint256 jobCreatorAgreedAt;\\n uint256 dealCreatedAt;\\n uint256 dealAgreedAt;\\n\\n uint256 resultsSubmittedAt;\\n uint256 resultsAcceptedAt;\\n uint256 resultsCheckedAt;\\n\\n uint256 mediationAcceptedAt;\\n uint256 mediationRejectedAt;\\n\\n uint256 timeoutAgreeAt;\\n uint256 timeoutSubmitResultsAt;\\n uint256 timeoutJudgeResultsAt;\\n uint256 timeoutMediateResultsAt;\\n }\\n\\n struct JobOffer {\\n uint256 id;\\n \\n // this is the contract that will be triggered\\n // once there are some results\\n address calling_contract;\\n\\n // this is the address that is paying for the job\\n // they must have called approve on the token contract\\n // and granted the solver address the number of tokens\\n // required\\n address payee;\\n\\n // the job spec\\n string module;\\n string[] inputs;\\n }\\n}\\n\",\"keccak256\":\"0x17ae1fe0274d61f5460caee95e214371a378a3e49730e5bdc4833506de99fcb6\",\"license\":\"Apache-2.0\"}},\"version\":1}", + "bytecode": "0x608060405234801561000f575f80fd5b5061002c61002161003160201b60201c565b61003860201b60201c565b6100f9565b5f33905090565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b612002806101065f395ff3fe608060405234801561000f575f80fd5b5060043610610091575f3560e01c8063a15dcc8a11610064578063a15dcc8a146100f7578063a7f96f0614610127578063aeb5ec0114610143578063ebbbca271461015f578063f2fde38b1461018f57610091565b80636f77926b14610095578063715018a6146100c55780638129fc1c146100cf5780638da5cb5b146100d9575b5f80fd5b6100af60048036038101906100aa91906111cf565b6101ab565b6040516100bc919061141c565b60405180910390f35b6100cd6103ff565b005b6100d7610412565b005b6100e1610547565b6040516100ee919061144b565b60405180910390f35b610111600480360381019061010c9190611487565b61056e565b60405161011e919061155a565b60405180910390f35b610141600480360381019061013c9190611487565b61062e565b005b61015d60048036038101906101589190611487565b610932565b005b6101796004803603810190610174919061176a565b610b2d565b604051610186919061141c565b60405180910390f35b6101a960048036038101906101a491906111cf565b610c48565b005b6101b361105b565b60015f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f206040518060800160405290815f82015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160018201805461025f9061183b565b80601f016020809104026020016040519081016040528092919081815260200182805461028b9061183b565b80156102d65780601f106102ad576101008083540402835291602001916102d6565b820191905f5260205f20905b8154815290600101906020018083116102b957829003601f168201915b505050505081526020016002820180546102ef9061183b565b80601f016020809104026020016040519081016040528092919081815260200182805461031b9061183b565b80156103665780601f1061033d57610100808354040283529160200191610366565b820191905f5260205f20905b81548152906001019060200180831161034957829003601f168201915b50505050508152602001600382018054806020026020016040519081016040528092919081815260200182805480156103ef57602002820191905f5260205f20905f905b82829054906101000a900460ff1660038111156103ca576103c96112bc565b5b815260200190600101906020825f010492830192600103820291508084116103aa5790505b5050505050815250509050919050565b610407610cca565b6104105f610d48565b565b5f8060159054906101000a900460ff16159050808015610443575060015f60149054906101000a900460ff1660ff16105b80610471575061045230610e09565b158015610470575060015f60149054906101000a900460ff1660ff16145b5b6104b0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104a7906118eb565b60405180910390fd5b60015f60146101000a81548160ff021916908360ff16021790555080156104ec5760015f60156101000a81548160ff0219169083151502179055505b8015610544575f8060156101000a81548160ff0219169083151502179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498600160405161053b9190611957565b60405180910390a15b50565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060025f836003811115610586576105856112bc565b5b6003811115610598576105976112bc565b5b81526020019081526020015f2080548060200260200160405190810160405280929190818152602001828054801561062257602002820191905f5260205f20905b815f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190600101908083116105d9575b50505050509050919050565b5f73ffffffffffffffffffffffffffffffffffffffff1660015f3273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16036106fa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106f1906119ba565b60405180910390fd5b5f806107068332610e2b565b915091508061074a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161074190611a22565b60405180910390fd5b5f8290505b600160025f866003811115610767576107666112bc565b5b6003811115610779576107786112bc565b5b81526020019081526020015f20805490506107949190611a76565b8110156108b55760025f8560038111156107b1576107b06112bc565b5b60038111156107c3576107c26112bc565b5b81526020019081526020015f206001826107dd9190611aa9565b815481106107ee576107ed611adc565b5b905f5260205f20015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660025f86600381111561082c5761082b6112bc565b5b600381111561083e5761083d6112bc565b5b81526020019081526020015f20828154811061085d5761085c611adc565b5b905f5260205f20015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080806108ad90611b09565b91505061074f565b5060025f8460038111156108cc576108cb6112bc565b5b60038111156108de576108dd6112bc565b5b81526020019081526020015f208054806108fb576108fa611b50565b5b600190038181905f5260205f20015f6101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690559055505050565b5f73ffffffffffffffffffffffffffffffffffffffff1660015f3273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16036109fe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109f5906119ba565b60405180910390fd5b5f610a098232610e2b565b9150508015610a4d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a4490611bed565b60405180910390fd5b610a578232610f41565b610a96576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a8d90611c55565b60405180910390fd5b60025f836003811115610aac57610aab6112bc565b5b6003811115610abe57610abd6112bc565b5b81526020019081526020015f2032908060018154018082558091505060019003905f5260205f20015f9091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b610b3561105b565b5f60405180608001604052803273ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481525090508060015f3273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f820151815f015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506020820151816001019081610c069190611e07565b506040820151816002019081610c1c9190611e07565b506060820151816003019080519060200190610c39929190611098565b50905050809150509392505050565b610c50610cca565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610cbe576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cb590611f46565b60405180910390fd5b610cc781610d48565b50565b610cd2611054565b73ffffffffffffffffffffffffffffffffffffffff16610cf0610547565b73ffffffffffffffffffffffffffffffffffffffff1614610d46576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d3d90611fae565b60405180910390fd5b565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b5f805f805f5b60025f886003811115610e4757610e466112bc565b5b6003811115610e5957610e586112bc565b5b81526020019081526020015f2080549050811015610f31578573ffffffffffffffffffffffffffffffffffffffff1660025f896003811115610e9e57610e9d6112bc565b5b6003811115610eb057610eaf6112bc565b5b81526020019081526020015f208281548110610ecf57610ece611adc565b5b905f5260205f20015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603610f1e5780925060019150610f31565b8080610f2990611b09565b915050610e31565b5081819350935050509250929050565b5f805f90505f5b60015f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f206003018054905081101561104957846003811115610fa657610fa56112bc565b5b60015f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f206003018281548110610ff857610ff7611adc565b5b905f5260205f2090602091828204019190069054906101000a900460ff166003811115611028576110276112bc565b5b036110365760019150611049565b808061104190611b09565b915050610f48565b508091505092915050565b5f33905090565b60405180608001604052805f73ffffffffffffffffffffffffffffffffffffffff1681526020016060815260200160608152602001606081525090565b828054828255905f5260205f2090601f01602090048101928215611138579160200282015f5b8382111561110a57835183826101000a81548160ff021916908360038111156110ea576110e96112bc565b5b021790555092602001926001016020815f010492830192600103026110be565b80156111365782816101000a81549060ff02191690556001016020815f0104928301926001030261110a565b505b5090506111459190611149565b5090565b5b80821115611160575f815f90555060010161114a565b5090565b5f604051905090565b5f80fd5b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61119e82611175565b9050919050565b6111ae81611194565b81146111b8575f80fd5b50565b5f813590506111c9816111a5565b92915050565b5f602082840312156111e4576111e361116d565b5b5f6111f1848285016111bb565b91505092915050565b61120381611194565b82525050565b5f81519050919050565b5f82825260208201905092915050565b5f5b83811015611240578082015181840152602081019050611225565b5f8484015250505050565b5f601f19601f8301169050919050565b5f61126582611209565b61126f8185611213565b935061127f818560208601611223565b6112888161124b565b840191505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b600481106112fa576112f96112bc565b5b50565b5f81905061130a826112e9565b919050565b5f611319826112fd565b9050919050565b6113298161130f565b82525050565b5f61133a8383611320565b60208301905092915050565b5f602082019050919050565b5f61135c82611293565b611366818561129d565b9350611371836112ad565b805f5b838110156113a1578151611388888261132f565b975061139383611346565b925050600181019050611374565b5085935050505092915050565b5f608083015f8301516113c35f8601826111fa565b50602083015184820360208601526113db828261125b565b915050604083015184820360408601526113f5828261125b565b9150506060830151848203606086015261140f8282611352565b9150508091505092915050565b5f6020820190508181035f83015261143481846113ae565b905092915050565b61144581611194565b82525050565b5f60208201905061145e5f83018461143c565b92915050565b60048110611470575f80fd5b50565b5f8135905061148181611464565b92915050565b5f6020828403121561149c5761149b61116d565b5b5f6114a984828501611473565b91505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b5f6114e683836111fa565b60208301905092915050565b5f602082019050919050565b5f611508826114b2565b61151281856114bc565b935061151d836114cc565b805f5b8381101561154d57815161153488826114db565b975061153f836114f2565b925050600181019050611520565b5085935050505092915050565b5f6020820190508181035f83015261157281846114fe565b905092915050565b5f80fd5b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6115b88261124b565b810181811067ffffffffffffffff821117156115d7576115d6611582565b5b80604052505050565b5f6115e9611164565b90506115f582826115af565b919050565b5f67ffffffffffffffff82111561161457611613611582565b5b61161d8261124b565b9050602081019050919050565b828183375f83830152505050565b5f61164a611645846115fa565b6115e0565b9050828152602081018484840111156116665761166561157e565b5b61167184828561162a565b509392505050565b5f82601f83011261168d5761168c61157a565b5b813561169d848260208601611638565b91505092915050565b5f67ffffffffffffffff8211156116c0576116bf611582565b5b602082029050602081019050919050565b5f80fd5b5f6116e76116e2846116a6565b6115e0565b9050808382526020820190506020840283018581111561170a576117096116d1565b5b835b81811015611733578061171f8882611473565b84526020840193505060208101905061170c565b5050509392505050565b5f82601f8301126117515761175061157a565b5b81356117618482602086016116d5565b91505092915050565b5f805f606084860312156117815761178061116d565b5b5f84013567ffffffffffffffff81111561179e5761179d611171565b5b6117aa86828701611679565b935050602084013567ffffffffffffffff8111156117cb576117ca611171565b5b6117d786828701611679565b925050604084013567ffffffffffffffff8111156117f8576117f7611171565b5b6118048682870161173d565b9150509250925092565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f600282049050600182168061185257607f821691505b6020821081036118655761186461180e565b5b50919050565b5f82825260208201905092915050565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c7265615f8201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b5f6118d5602e8361186b565b91506118e08261187b565b604082019050919050565b5f6020820190508181035f830152611902816118c9565b9050919050565b5f819050919050565b5f60ff82169050919050565b5f819050919050565b5f61194161193c61193784611909565b61191e565b611912565b9050919050565b61195181611927565b82525050565b5f60208201905061196a5f830184611948565b92915050565b7f55736572206d75737420657869737400000000000000000000000000000000005f82015250565b5f6119a4600f8361186b565b91506119af82611970565b602082019050919050565b5f6020820190508181035f8301526119d181611998565b9050919050565b7f55736572206973206e6f742070617274206f662074686174206c6973740000005f82015250565b5f611a0c601d8361186b565b9150611a17826119d8565b602082019050919050565b5f6020820190508181035f830152611a3981611a00565b9050919050565b5f819050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f611a8082611a40565b9150611a8b83611a40565b9250828203905081811115611aa357611aa2611a49565b5b92915050565b5f611ab382611a40565b9150611abe83611a40565b9250828201905080821115611ad657611ad5611a49565b5b92915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f611b1382611a40565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611b4557611b44611a49565b5b600182019050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603160045260245ffd5b7f5573657220697320616c72656164792070617274206f662074686174206c69735f8201527f7400000000000000000000000000000000000000000000000000000000000000602082015250565b5f611bd760218361186b565b9150611be282611b7d565b604082019050919050565b5f6020820190508181035f830152611c0481611bcb565b9050919050565b7f55736572206d7573742068617665207468617420726f6c6500000000000000005f82015250565b5f611c3f60188361186b565b9150611c4a82611c0b565b602082019050919050565b5f6020820190508181035f830152611c6c81611c33565b9050919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f60088302611ccf7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82611c94565b611cd98683611c94565b95508019841693508086168417925050509392505050565b5f611d0b611d06611d0184611a40565b61191e565b611a40565b9050919050565b5f819050919050565b611d2483611cf1565b611d38611d3082611d12565b848454611ca0565b825550505050565b5f90565b611d4c611d40565b611d57818484611d1b565b505050565b5b81811015611d7a57611d6f5f82611d44565b600181019050611d5d565b5050565b601f821115611dbf57611d9081611c73565b611d9984611c85565b81016020851015611da8578190505b611dbc611db485611c85565b830182611d5c565b50505b505050565b5f82821c905092915050565b5f611ddf5f1984600802611dc4565b1980831691505092915050565b5f611df78383611dd0565b9150826002028217905092915050565b611e1082611209565b67ffffffffffffffff811115611e2957611e28611582565b5b611e33825461183b565b611e3e828285611d7e565b5f60209050601f831160018114611e6f575f8415611e5d578287015190505b611e678582611dec565b865550611ece565b601f198416611e7d86611c73565b5f5b82811015611ea457848901518255600182019150602085019450602081019050611e7f565b86831015611ec15784890151611ebd601f891682611dd0565b8355505b6001600288020188555050505b505050505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f20615f8201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b5f611f3060268361186b565b9150611f3b82611ed6565b604082019050919050565b5f6020820190508181035f830152611f5d81611f24565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725f82015250565b5f611f9860208361186b565b9150611fa382611f64565b602082019050919050565b5f6020820190508181035f830152611fc581611f8c565b905091905056fea26469706673582212202ad3a9ed2b779db7b64f8c5c2748e8654fcdc1b2d92243d639bc20f410abdfdf64736f6c63430008150033", + "deployedBytecode": "0x608060405234801561000f575f80fd5b5060043610610091575f3560e01c8063a15dcc8a11610064578063a15dcc8a146100f7578063a7f96f0614610127578063aeb5ec0114610143578063ebbbca271461015f578063f2fde38b1461018f57610091565b80636f77926b14610095578063715018a6146100c55780638129fc1c146100cf5780638da5cb5b146100d9575b5f80fd5b6100af60048036038101906100aa91906111cf565b6101ab565b6040516100bc919061141c565b60405180910390f35b6100cd6103ff565b005b6100d7610412565b005b6100e1610547565b6040516100ee919061144b565b60405180910390f35b610111600480360381019061010c9190611487565b61056e565b60405161011e919061155a565b60405180910390f35b610141600480360381019061013c9190611487565b61062e565b005b61015d60048036038101906101589190611487565b610932565b005b6101796004803603810190610174919061176a565b610b2d565b604051610186919061141c565b60405180910390f35b6101a960048036038101906101a491906111cf565b610c48565b005b6101b361105b565b60015f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f206040518060800160405290815f82015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160018201805461025f9061183b565b80601f016020809104026020016040519081016040528092919081815260200182805461028b9061183b565b80156102d65780601f106102ad576101008083540402835291602001916102d6565b820191905f5260205f20905b8154815290600101906020018083116102b957829003601f168201915b505050505081526020016002820180546102ef9061183b565b80601f016020809104026020016040519081016040528092919081815260200182805461031b9061183b565b80156103665780601f1061033d57610100808354040283529160200191610366565b820191905f5260205f20905b81548152906001019060200180831161034957829003601f168201915b50505050508152602001600382018054806020026020016040519081016040528092919081815260200182805480156103ef57602002820191905f5260205f20905f905b82829054906101000a900460ff1660038111156103ca576103c96112bc565b5b815260200190600101906020825f010492830192600103820291508084116103aa5790505b5050505050815250509050919050565b610407610cca565b6104105f610d48565b565b5f8060159054906101000a900460ff16159050808015610443575060015f60149054906101000a900460ff1660ff16105b80610471575061045230610e09565b158015610470575060015f60149054906101000a900460ff1660ff16145b5b6104b0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104a7906118eb565b60405180910390fd5b60015f60146101000a81548160ff021916908360ff16021790555080156104ec5760015f60156101000a81548160ff0219169083151502179055505b8015610544575f8060156101000a81548160ff0219169083151502179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498600160405161053b9190611957565b60405180910390a15b50565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060025f836003811115610586576105856112bc565b5b6003811115610598576105976112bc565b5b81526020019081526020015f2080548060200260200160405190810160405280929190818152602001828054801561062257602002820191905f5260205f20905b815f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190600101908083116105d9575b50505050509050919050565b5f73ffffffffffffffffffffffffffffffffffffffff1660015f3273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16036106fa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106f1906119ba565b60405180910390fd5b5f806107068332610e2b565b915091508061074a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161074190611a22565b60405180910390fd5b5f8290505b600160025f866003811115610767576107666112bc565b5b6003811115610779576107786112bc565b5b81526020019081526020015f20805490506107949190611a76565b8110156108b55760025f8560038111156107b1576107b06112bc565b5b60038111156107c3576107c26112bc565b5b81526020019081526020015f206001826107dd9190611aa9565b815481106107ee576107ed611adc565b5b905f5260205f20015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660025f86600381111561082c5761082b6112bc565b5b600381111561083e5761083d6112bc565b5b81526020019081526020015f20828154811061085d5761085c611adc565b5b905f5260205f20015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080806108ad90611b09565b91505061074f565b5060025f8460038111156108cc576108cb6112bc565b5b60038111156108de576108dd6112bc565b5b81526020019081526020015f208054806108fb576108fa611b50565b5b600190038181905f5260205f20015f6101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690559055505050565b5f73ffffffffffffffffffffffffffffffffffffffff1660015f3273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16036109fe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109f5906119ba565b60405180910390fd5b5f610a098232610e2b565b9150508015610a4d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a4490611bed565b60405180910390fd5b610a578232610f41565b610a96576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a8d90611c55565b60405180910390fd5b60025f836003811115610aac57610aab6112bc565b5b6003811115610abe57610abd6112bc565b5b81526020019081526020015f2032908060018154018082558091505060019003905f5260205f20015f9091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b610b3561105b565b5f60405180608001604052803273ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481525090508060015f3273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f820151815f015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506020820151816001019081610c069190611e07565b506040820151816002019081610c1c9190611e07565b506060820151816003019080519060200190610c39929190611098565b50905050809150509392505050565b610c50610cca565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610cbe576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cb590611f46565b60405180910390fd5b610cc781610d48565b50565b610cd2611054565b73ffffffffffffffffffffffffffffffffffffffff16610cf0610547565b73ffffffffffffffffffffffffffffffffffffffff1614610d46576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d3d90611fae565b60405180910390fd5b565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b5f805f805f5b60025f886003811115610e4757610e466112bc565b5b6003811115610e5957610e586112bc565b5b81526020019081526020015f2080549050811015610f31578573ffffffffffffffffffffffffffffffffffffffff1660025f896003811115610e9e57610e9d6112bc565b5b6003811115610eb057610eaf6112bc565b5b81526020019081526020015f208281548110610ecf57610ece611adc565b5b905f5260205f20015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603610f1e5780925060019150610f31565b8080610f2990611b09565b915050610e31565b5081819350935050509250929050565b5f805f90505f5b60015f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f206003018054905081101561104957846003811115610fa657610fa56112bc565b5b60015f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f206003018281548110610ff857610ff7611adc565b5b905f5260205f2090602091828204019190069054906101000a900460ff166003811115611028576110276112bc565b5b036110365760019150611049565b808061104190611b09565b915050610f48565b508091505092915050565b5f33905090565b60405180608001604052805f73ffffffffffffffffffffffffffffffffffffffff1681526020016060815260200160608152602001606081525090565b828054828255905f5260205f2090601f01602090048101928215611138579160200282015f5b8382111561110a57835183826101000a81548160ff021916908360038111156110ea576110e96112bc565b5b021790555092602001926001016020815f010492830192600103026110be565b80156111365782816101000a81549060ff02191690556001016020815f0104928301926001030261110a565b505b5090506111459190611149565b5090565b5b80821115611160575f815f90555060010161114a565b5090565b5f604051905090565b5f80fd5b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61119e82611175565b9050919050565b6111ae81611194565b81146111b8575f80fd5b50565b5f813590506111c9816111a5565b92915050565b5f602082840312156111e4576111e361116d565b5b5f6111f1848285016111bb565b91505092915050565b61120381611194565b82525050565b5f81519050919050565b5f82825260208201905092915050565b5f5b83811015611240578082015181840152602081019050611225565b5f8484015250505050565b5f601f19601f8301169050919050565b5f61126582611209565b61126f8185611213565b935061127f818560208601611223565b6112888161124b565b840191505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b600481106112fa576112f96112bc565b5b50565b5f81905061130a826112e9565b919050565b5f611319826112fd565b9050919050565b6113298161130f565b82525050565b5f61133a8383611320565b60208301905092915050565b5f602082019050919050565b5f61135c82611293565b611366818561129d565b9350611371836112ad565b805f5b838110156113a1578151611388888261132f565b975061139383611346565b925050600181019050611374565b5085935050505092915050565b5f608083015f8301516113c35f8601826111fa565b50602083015184820360208601526113db828261125b565b915050604083015184820360408601526113f5828261125b565b9150506060830151848203606086015261140f8282611352565b9150508091505092915050565b5f6020820190508181035f83015261143481846113ae565b905092915050565b61144581611194565b82525050565b5f60208201905061145e5f83018461143c565b92915050565b60048110611470575f80fd5b50565b5f8135905061148181611464565b92915050565b5f6020828403121561149c5761149b61116d565b5b5f6114a984828501611473565b91505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b5f6114e683836111fa565b60208301905092915050565b5f602082019050919050565b5f611508826114b2565b61151281856114bc565b935061151d836114cc565b805f5b8381101561154d57815161153488826114db565b975061153f836114f2565b925050600181019050611520565b5085935050505092915050565b5f6020820190508181035f83015261157281846114fe565b905092915050565b5f80fd5b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6115b88261124b565b810181811067ffffffffffffffff821117156115d7576115d6611582565b5b80604052505050565b5f6115e9611164565b90506115f582826115af565b919050565b5f67ffffffffffffffff82111561161457611613611582565b5b61161d8261124b565b9050602081019050919050565b828183375f83830152505050565b5f61164a611645846115fa565b6115e0565b9050828152602081018484840111156116665761166561157e565b5b61167184828561162a565b509392505050565b5f82601f83011261168d5761168c61157a565b5b813561169d848260208601611638565b91505092915050565b5f67ffffffffffffffff8211156116c0576116bf611582565b5b602082029050602081019050919050565b5f80fd5b5f6116e76116e2846116a6565b6115e0565b9050808382526020820190506020840283018581111561170a576117096116d1565b5b835b81811015611733578061171f8882611473565b84526020840193505060208101905061170c565b5050509392505050565b5f82601f8301126117515761175061157a565b5b81356117618482602086016116d5565b91505092915050565b5f805f606084860312156117815761178061116d565b5b5f84013567ffffffffffffffff81111561179e5761179d611171565b5b6117aa86828701611679565b935050602084013567ffffffffffffffff8111156117cb576117ca611171565b5b6117d786828701611679565b925050604084013567ffffffffffffffff8111156117f8576117f7611171565b5b6118048682870161173d565b9150509250925092565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f600282049050600182168061185257607f821691505b6020821081036118655761186461180e565b5b50919050565b5f82825260208201905092915050565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c7265615f8201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b5f6118d5602e8361186b565b91506118e08261187b565b604082019050919050565b5f6020820190508181035f830152611902816118c9565b9050919050565b5f819050919050565b5f60ff82169050919050565b5f819050919050565b5f61194161193c61193784611909565b61191e565b611912565b9050919050565b61195181611927565b82525050565b5f60208201905061196a5f830184611948565b92915050565b7f55736572206d75737420657869737400000000000000000000000000000000005f82015250565b5f6119a4600f8361186b565b91506119af82611970565b602082019050919050565b5f6020820190508181035f8301526119d181611998565b9050919050565b7f55736572206973206e6f742070617274206f662074686174206c6973740000005f82015250565b5f611a0c601d8361186b565b9150611a17826119d8565b602082019050919050565b5f6020820190508181035f830152611a3981611a00565b9050919050565b5f819050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f611a8082611a40565b9150611a8b83611a40565b9250828203905081811115611aa357611aa2611a49565b5b92915050565b5f611ab382611a40565b9150611abe83611a40565b9250828201905080821115611ad657611ad5611a49565b5b92915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f611b1382611a40565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611b4557611b44611a49565b5b600182019050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603160045260245ffd5b7f5573657220697320616c72656164792070617274206f662074686174206c69735f8201527f7400000000000000000000000000000000000000000000000000000000000000602082015250565b5f611bd760218361186b565b9150611be282611b7d565b604082019050919050565b5f6020820190508181035f830152611c0481611bcb565b9050919050565b7f55736572206d7573742068617665207468617420726f6c6500000000000000005f82015250565b5f611c3f60188361186b565b9150611c4a82611c0b565b602082019050919050565b5f6020820190508181035f830152611c6c81611c33565b9050919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f60088302611ccf7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82611c94565b611cd98683611c94565b95508019841693508086168417925050509392505050565b5f611d0b611d06611d0184611a40565b61191e565b611a40565b9050919050565b5f819050919050565b611d2483611cf1565b611d38611d3082611d12565b848454611ca0565b825550505050565b5f90565b611d4c611d40565b611d57818484611d1b565b505050565b5b81811015611d7a57611d6f5f82611d44565b600181019050611d5d565b5050565b601f821115611dbf57611d9081611c73565b611d9984611c85565b81016020851015611da8578190505b611dbc611db485611c85565b830182611d5c565b50505b505050565b5f82821c905092915050565b5f611ddf5f1984600802611dc4565b1980831691505092915050565b5f611df78383611dd0565b9150826002028217905092915050565b611e1082611209565b67ffffffffffffffff811115611e2957611e28611582565b5b611e33825461183b565b611e3e828285611d7e565b5f60209050601f831160018114611e6f575f8415611e5d578287015190505b611e678582611dec565b865550611ece565b601f198416611e7d86611c73565b5f5b82811015611ea457848901518255600182019150602085019450602081019050611e7f565b86831015611ec15784890151611ebd601f891682611dd0565b8355505b6001600288020188555050505b505050505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f20615f8201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b5f611f3060268361186b565b9150611f3b82611ed6565b604082019050919050565b5f6020820190508181035f830152611f5d81611f24565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725f82015250565b5f611f9860208361186b565b9150611fa382611f64565b602082019050919050565b5f6020820190508181035f830152611fc581611f8c565b905091905056fea26469706673582212202ad3a9ed2b779db7b64f8c5c2748e8654fcdc1b2d92243d639bc20f410abdfdf64736f6c63430008150033", + "devdoc": { + "events": { + "Initialized(uint8)": { + "details": "Triggered when the contract has been initialized or reinitialized." + } + }, + "kind": "dev", + "methods": { + "owner()": { + "details": "Returns the address of the current owner." + }, + "renounceOwnership()": { + "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner." + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "getUser(address)": { + "notice": "Users" + }, + "initialize()": { + "notice": "Init" + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 680, + "contract": "contracts/LilypadUsers.sol:LilypadUsers", + "label": "_owner", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 138, + "contract": "contracts/LilypadUsers.sol:LilypadUsers", + "label": "_initialized", + "offset": 20, + "slot": "0", + "type": "t_uint8" + }, + { + "astId": 141, + "contract": "contracts/LilypadUsers.sol:LilypadUsers", + "label": "_initializing", + "offset": 21, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 6576, + "contract": "contracts/LilypadUsers.sol:LilypadUsers", + "label": "users", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_address,t_struct(User)6917_storage)" + }, + { + "astId": 6582, + "contract": "contracts/LilypadUsers.sol:LilypadUsers", + "label": "usersByType", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_enum(ServiceType)6894,t_array(t_address)dyn_storage)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_address)dyn_storage": { + "base": "t_address", + "encoding": "dynamic_array", + "label": "address[]", + "numberOfBytes": "32" + }, + "t_array(t_enum(ServiceType)6894)dyn_storage": { + "base": "t_enum(ServiceType)6894", + "encoding": "dynamic_array", + "label": "enum SharedStructs.ServiceType[]", + "numberOfBytes": "32" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_enum(ServiceType)6894": { + "encoding": "inplace", + "label": "enum SharedStructs.ServiceType", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_struct(User)6917_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct SharedStructs.User)", + "numberOfBytes": "32", + "value": "t_struct(User)6917_storage" + }, + "t_mapping(t_enum(ServiceType)6894,t_array(t_address)dyn_storage)": { + "encoding": "mapping", + "key": "t_enum(ServiceType)6894", + "label": "mapping(enum SharedStructs.ServiceType => address[])", + "numberOfBytes": "32", + "value": "t_array(t_address)dyn_storage" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(User)6917_storage": { + "encoding": "inplace", + "label": "struct SharedStructs.User", + "members": [ + { + "astId": 6908, + "contract": "contracts/LilypadUsers.sol:LilypadUsers", + "label": "userAddress", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 6910, + "contract": "contracts/LilypadUsers.sol:LilypadUsers", + "label": "metadataCID", + "offset": 0, + "slot": "1", + "type": "t_string_storage" + }, + { + "astId": 6912, + "contract": "contracts/LilypadUsers.sol:LilypadUsers", + "label": "url", + "offset": 0, + "slot": "2", + "type": "t_string_storage" + }, + { + "astId": 6916, + "contract": "contracts/LilypadUsers.sol:LilypadUsers", + "label": "roles", + "offset": 0, + "slot": "3", + "type": "t_array(t_enum(ServiceType)6894)dyn_storage" + } + ], + "numberOfBytes": "128" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + } + } + } +} \ No newline at end of file diff --git a/hardhat/deployments/orbit/solcInputs/06e78eaee1ee101e9b46d15f399432ba.json b/hardhat/deployments/orbit/solcInputs/06e78eaee1ee101e9b46d15f399432ba.json new file mode 100644 index 00000000..cbb3faea --- /dev/null +++ b/hardhat/deployments/orbit/solcInputs/06e78eaee1ee101e9b46d15f399432ba.json @@ -0,0 +1,131 @@ +{ + "language": "Solidity", + "sources": { + "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n function __Ownable_init() internal onlyInitializing {\n __Ownable_init_unchained();\n }\n\n function __Ownable_init_unchained() internal onlyInitializing {\n _transferOwnership(_msgSender());\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n _checkOwner();\n _;\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if the sender is not the owner.\n */\n function _checkOwner() internal view virtual {\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby disabling any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _transferOwnership(address(0));\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[49] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)\n\npragma solidity ^0.8.2;\n\nimport \"../../utils/AddressUpgradeable.sol\";\n\n/**\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\n *\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\n * reused. This mechanism prevents re-execution of each \"step\" but allows the creation of new initialization steps in\n * case an upgrade adds a module that needs to be initialized.\n *\n * For example:\n *\n * [.hljs-theme-light.nopadding]\n * ```solidity\n * contract MyToken is ERC20Upgradeable {\n * function initialize() initializer public {\n * __ERC20_init(\"MyToken\", \"MTK\");\n * }\n * }\n *\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\n * function initializeV2() reinitializer(2) public {\n * __ERC20Permit_init(\"MyToken\");\n * }\n * }\n * ```\n *\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\n *\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\n *\n * [CAUTION]\n * ====\n * Avoid leaving a contract uninitialized.\n *\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * /// @custom:oz-upgrades-unsafe-allow constructor\n * constructor() {\n * _disableInitializers();\n * }\n * ```\n * ====\n */\nabstract contract Initializable {\n /**\n * @dev Indicates that the contract has been initialized.\n * @custom:oz-retyped-from bool\n */\n uint8 private _initialized;\n\n /**\n * @dev Indicates that the contract is in the process of being initialized.\n */\n bool private _initializing;\n\n /**\n * @dev Triggered when the contract has been initialized or reinitialized.\n */\n event Initialized(uint8 version);\n\n /**\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\n * `onlyInitializing` functions can be used to initialize parent contracts.\n *\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\n * constructor.\n *\n * Emits an {Initialized} event.\n */\n modifier initializer() {\n bool isTopLevelCall = !_initializing;\n require(\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\n \"Initializable: contract is already initialized\"\n );\n _initialized = 1;\n if (isTopLevelCall) {\n _initializing = true;\n }\n _;\n if (isTopLevelCall) {\n _initializing = false;\n emit Initialized(1);\n }\n }\n\n /**\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\n * used to initialize parent contracts.\n *\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\n * are added through upgrades and that require initialization.\n *\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\n * cannot be nested. If one is invoked in the context of another, execution will revert.\n *\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\n * a contract, executing them in the right order is up to the developer or operator.\n *\n * WARNING: setting the version to 255 will prevent any future reinitialization.\n *\n * Emits an {Initialized} event.\n */\n modifier reinitializer(uint8 version) {\n require(!_initializing && _initialized < version, \"Initializable: contract is already initialized\");\n _initialized = version;\n _initializing = true;\n _;\n _initializing = false;\n emit Initialized(version);\n }\n\n /**\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\n */\n modifier onlyInitializing() {\n require(_initializing, \"Initializable: contract is not initializing\");\n _;\n }\n\n /**\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\n * through proxies.\n *\n * Emits an {Initialized} event the first time it is successfully executed.\n */\n function _disableInitializers() internal virtual {\n require(!_initializing, \"Initializable: contract is initializing\");\n if (_initialized != type(uint8).max) {\n _initialized = type(uint8).max;\n emit Initialized(type(uint8).max);\n }\n }\n\n /**\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\n */\n function _getInitializedVersion() internal view returns (uint8) {\n return _initialized;\n }\n\n /**\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\n */\n function _isInitializing() internal view returns (bool) {\n return _initializing;\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary AddressUpgradeable {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n *\n * Furthermore, `isContract` will also return true if the target contract within\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\n * which only has an effect at the end of a transaction.\n * ====\n *\n * [IMPORTANT]\n * ====\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\n *\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n * constructor.\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize/address.code.length, which returns 0\n // for contracts in construction, since the code is only stored at the end\n // of the constructor execution.\n\n return account.code.length > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n (bool success, ) = recipient.call{value: amount}(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\n *\n * _Available since v4.8._\n */\n function verifyCallResultFromTarget(\n address target,\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n if (success) {\n if (returndata.length == 0) {\n // only check isContract if the call was successful and the return data is empty\n // otherwise we already know that it was a contract\n require(isContract(target), \"Address: call to non-contract\");\n }\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n /**\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason or using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n /// @solidity memory-safe-assembly\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\npragma solidity ^0.8.0;\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract ContextUpgradeable is Initializable {\n function __Context_init() internal onlyInitializing {\n }\n\n function __Context_init_unchained() internal onlyInitializing {\n }\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[50] private __gap;\n}\n" + }, + "@openzeppelin/contracts/access/Ownable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract Ownable is Context {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n constructor() {\n _transferOwnership(_msgSender());\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n _checkOwner();\n _;\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if the sender is not the owner.\n */\n function _checkOwner() internal view virtual {\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby disabling any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _transferOwnership(address(0));\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n" + }, + "@openzeppelin/contracts/security/Pausable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which allows children to implement an emergency stop\n * mechanism that can be triggered by an authorized account.\n *\n * This module is used through inheritance. It will make available the\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\n * the functions of your contract. Note that they will not be pausable by\n * simply including this module, only once the modifiers are put in place.\n */\nabstract contract Pausable is Context {\n /**\n * @dev Emitted when the pause is triggered by `account`.\n */\n event Paused(address account);\n\n /**\n * @dev Emitted when the pause is lifted by `account`.\n */\n event Unpaused(address account);\n\n bool private _paused;\n\n /**\n * @dev Initializes the contract in unpaused state.\n */\n constructor() {\n _paused = false;\n }\n\n /**\n * @dev Modifier to make a function callable only when the contract is not paused.\n *\n * Requirements:\n *\n * - The contract must not be paused.\n */\n modifier whenNotPaused() {\n _requireNotPaused();\n _;\n }\n\n /**\n * @dev Modifier to make a function callable only when the contract is paused.\n *\n * Requirements:\n *\n * - The contract must be paused.\n */\n modifier whenPaused() {\n _requirePaused();\n _;\n }\n\n /**\n * @dev Returns true if the contract is paused, and false otherwise.\n */\n function paused() public view virtual returns (bool) {\n return _paused;\n }\n\n /**\n * @dev Throws if the contract is paused.\n */\n function _requireNotPaused() internal view virtual {\n require(!paused(), \"Pausable: paused\");\n }\n\n /**\n * @dev Throws if the contract is not paused.\n */\n function _requirePaused() internal view virtual {\n require(paused(), \"Pausable: not paused\");\n }\n\n /**\n * @dev Triggers stopped state.\n *\n * Requirements:\n *\n * - The contract must not be paused.\n */\n function _pause() internal virtual whenNotPaused {\n _paused = true;\n emit Paused(_msgSender());\n }\n\n /**\n * @dev Returns to normal state.\n *\n * Requirements:\n *\n * - The contract must be paused.\n */\n function _unpause() internal virtual whenPaused {\n _paused = false;\n emit Unpaused(_msgSender());\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/ERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC20.sol\";\nimport \"./extensions/IERC20Metadata.sol\";\nimport \"../../utils/Context.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n * For a generic mechanism see {ERC20PresetMinterPauser}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * The default value of {decimals} is 18. To change this, you should override\n * this function so it returns a different value.\n *\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\n * instead returning `false` on failure. This behavior is nonetheless\n * conventional and does not conflict with the expectations of ERC20\n * applications.\n *\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn't required by the specification.\n *\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\n * functions have been added to mitigate the well-known issues around setting\n * allowances. See {IERC20-approve}.\n */\ncontract ERC20 is Context, IERC20, IERC20Metadata {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n string private _symbol;\n\n /**\n * @dev Sets the values for {name} and {symbol}.\n *\n * All two of these values are immutable: they can only be set once during\n * construction.\n */\n constructor(string memory name_, string memory symbol_) {\n _name = name_;\n _symbol = symbol_;\n }\n\n /**\n * @dev Returns the name of the token.\n */\n function name() public view virtual override returns (string memory) {\n return _name;\n }\n\n /**\n * @dev Returns the symbol of the token, usually a shorter version of the\n * name.\n */\n function symbol() public view virtual override returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev Returns the number of decimals used to get its user representation.\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\n *\n * Tokens usually opt for a value of 18, imitating the relationship between\n * Ether and Wei. This is the default value returned by this function, unless\n * it's overridden.\n *\n * NOTE: This information is only used for _display_ purposes: it in\n * no way affects any of the arithmetic of the contract, including\n * {IERC20-balanceOf} and {IERC20-transfer}.\n */\n function decimals() public view virtual override returns (uint8) {\n return 18;\n }\n\n /**\n * @dev See {IERC20-totalSupply}.\n */\n function totalSupply() public view virtual override returns (uint256) {\n return _totalSupply;\n }\n\n /**\n * @dev See {IERC20-balanceOf}.\n */\n function balanceOf(address account) public view virtual override returns (uint256) {\n return _balances[account];\n }\n\n /**\n * @dev See {IERC20-transfer}.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - the caller must have a balance of at least `amount`.\n */\n function transfer(address to, uint256 amount) public virtual override returns (bool) {\n address owner = _msgSender();\n _transfer(owner, to, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-allowance}.\n */\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n /**\n * @dev See {IERC20-approve}.\n *\n * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\n * `transferFrom`. This is semantically equivalent to an infinite approval.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-transferFrom}.\n *\n * Emits an {Approval} event indicating the updated allowance. This is not\n * required by the EIP. See the note at the beginning of {ERC20}.\n *\n * NOTE: Does not update the allowance if the current allowance\n * is the maximum `uint256`.\n *\n * Requirements:\n *\n * - `from` and `to` cannot be the zero address.\n * - `from` must have a balance of at least `amount`.\n * - the caller must have allowance for ``from``'s tokens of at least\n * `amount`.\n */\n function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) {\n address spender = _msgSender();\n _spendAllowance(from, spender, amount);\n _transfer(from, to, amount);\n return true;\n }\n\n /**\n * @dev Atomically increases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, allowance(owner, spender) + addedValue);\n return true;\n }\n\n /**\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `spender` must have allowance for the caller of at least\n * `subtractedValue`.\n */\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\n address owner = _msgSender();\n uint256 currentAllowance = allowance(owner, spender);\n require(currentAllowance >= subtractedValue, \"ERC20: decreased allowance below zero\");\n unchecked {\n _approve(owner, spender, currentAllowance - subtractedValue);\n }\n\n return true;\n }\n\n /**\n * @dev Moves `amount` of tokens from `from` to `to`.\n *\n * This internal function is equivalent to {transfer}, and can be used to\n * e.g. implement automatic token fees, slashing mechanisms, etc.\n *\n * Emits a {Transfer} event.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `from` must have a balance of at least `amount`.\n */\n function _transfer(address from, address to, uint256 amount) internal virtual {\n require(from != address(0), \"ERC20: transfer from the zero address\");\n require(to != address(0), \"ERC20: transfer to the zero address\");\n\n _beforeTokenTransfer(from, to, amount);\n\n uint256 fromBalance = _balances[from];\n require(fromBalance >= amount, \"ERC20: transfer amount exceeds balance\");\n unchecked {\n _balances[from] = fromBalance - amount;\n // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by\n // decrementing then incrementing.\n _balances[to] += amount;\n }\n\n emit Transfer(from, to, amount);\n\n _afterTokenTransfer(from, to, amount);\n }\n\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\n * the total supply.\n *\n * Emits a {Transfer} event with `from` set to the zero address.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n */\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _beforeTokenTransfer(address(0), account, amount);\n\n _totalSupply += amount;\n unchecked {\n // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.\n _balances[account] += amount;\n }\n emit Transfer(address(0), account, amount);\n\n _afterTokenTransfer(address(0), account, amount);\n }\n\n /**\n * @dev Destroys `amount` tokens from `account`, reducing the\n * total supply.\n *\n * Emits a {Transfer} event with `to` set to the zero address.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n * - `account` must have at least `amount` tokens.\n */\n function _burn(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: burn from the zero address\");\n\n _beforeTokenTransfer(account, address(0), amount);\n\n uint256 accountBalance = _balances[account];\n require(accountBalance >= amount, \"ERC20: burn amount exceeds balance\");\n unchecked {\n _balances[account] = accountBalance - amount;\n // Overflow not possible: amount <= accountBalance <= totalSupply.\n _totalSupply -= amount;\n }\n\n emit Transfer(account, address(0), amount);\n\n _afterTokenTransfer(account, address(0), amount);\n }\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\n *\n * This internal function is equivalent to `approve`, and can be used to\n * e.g. set automatic allowances for certain subsystems, etc.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `owner` cannot be the zero address.\n * - `spender` cannot be the zero address.\n */\n function _approve(address owner, address spender, uint256 amount) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n\n /**\n * @dev Updates `owner` s allowance for `spender` based on spent `amount`.\n *\n * Does not update the allowance amount in case of infinite allowance.\n * Revert if not enough allowance is available.\n *\n * Might emit an {Approval} event.\n */\n function _spendAllowance(address owner, address spender, uint256 amount) internal virtual {\n uint256 currentAllowance = allowance(owner, spender);\n if (currentAllowance != type(uint256).max) {\n require(currentAllowance >= amount, \"ERC20: insufficient allowance\");\n unchecked {\n _approve(owner, spender, currentAllowance - amount);\n }\n }\n }\n\n /**\n * @dev Hook that is called before any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * will be transferred to `to`.\n * - when `from` is zero, `amount` tokens will be minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual {}\n\n /**\n * @dev Hook that is called after any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * has been transferred to `to`.\n * - when `from` is zero, `amount` tokens have been minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {}\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/extensions/ERC20Pausable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/ERC20Pausable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../ERC20.sol\";\nimport \"../../../security/Pausable.sol\";\n\n/**\n * @dev ERC20 token with pausable token transfers, minting and burning.\n *\n * Useful for scenarios such as preventing trades until the end of an evaluation\n * period, or having an emergency switch for freezing all token transfers in the\n * event of a large bug.\n *\n * IMPORTANT: This contract does not include public pause and unpause functions. In\n * addition to inheriting this contract, you must define both functions, invoking the\n * {Pausable-_pause} and {Pausable-_unpause} internal functions, with appropriate\n * access control, e.g. using {AccessControl} or {Ownable}. Not doing so will\n * make the contract unpausable.\n */\nabstract contract ERC20Pausable is ERC20, Pausable {\n /**\n * @dev See {ERC20-_beforeTokenTransfer}.\n *\n * Requirements:\n *\n * - the contract must not be paused.\n */\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual override {\n super._beforeTokenTransfer(from, to, amount);\n\n require(!paused(), \"ERC20Pausable: token transfer while paused\");\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC20 standard.\n *\n * _Available since v4.1._\n */\ninterface IERC20Metadata is IERC20 {\n /**\n * @dev Returns the name of the token.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the symbol of the token.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the decimals places of the token.\n */\n function decimals() external view returns (uint8);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `to`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address to, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `from` to `to` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\n}\n" + }, + "@openzeppelin/contracts/utils/Context.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n}\n" + }, + "contracts/ControllerOwnable.sol": { + "content": "// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.6;\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\n\n// as well as being ownable (i.e. our admin wallet)\n// this contract has a modifier called onlyController\n// it works the same way as Ownable but only the Owner\n// can change the controller address so it gives us a way of\n// re-pointing contracts if needed\ncontract ControllerOwnable is Ownable {\n\n // the address of the controller that is allowed to call functions\n address private controllerAddress;\n\n // used to \"freeze\" the controller address - even the admin cannot\n // change it from this point onwards\n bool private canChangeControllerAddress = true;\n\n modifier onlyController() {\n _checkControllerAccess();\n _;\n }\n\n function _checkControllerAccess() internal view virtual returns (bool) {\n require(controllerAddress != address(0), \"ControllerOwnable: Controller address must be defined\");\n require(_msgSender() == controllerAddress, \"ControllerOwnable: Only the controller can call this method\");\n return true;\n }\n\n function setControllerAddress(address _controllerAddress) public onlyOwner {\n require(_controllerAddress != address(0), \"ControllerOwnable: Controller address must be defined\");\n require(canChangeControllerAddress, \"ControllerOwnable: canChangeControllerAddress is disabled\");\n controllerAddress = _controllerAddress;\n }\n\n function getControllerAddress() public view returns (address) {\n return controllerAddress;\n }\n\n function disableChangeControllerAddress() public onlyOwner {\n canChangeControllerAddress = false;\n }\n}\n" + }, + "contracts/ExampleClient.sol": { + "content": "// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.6;\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"./ILilypadJobManager.sol\";\nimport \"./ILilypadJobClient.sol\";\n\ncontract ExampleClient is Ownable, Initializable, ILilypadJobClient {\n\n address private jobManagerAddress;\n ILilypadJobManager private jobManagerContract;\n\n mapping(uint256 => string) private jobResults;\n\n event JobCreated(\n uint256 id,\n string message\n );\n\n event JobCompleted(\n uint256 id,\n string dealId,\n string dataId\n );\n\n function initialize(address _jobManagerAddress) public initializer {\n setJobManagerAddress(_jobManagerAddress);\n }\n\n function setJobManagerAddress(address _jobManagerAddress) public onlyOwner {\n require(_jobManagerAddress != address(0), \"Job manager address\");\n jobManagerAddress = _jobManagerAddress;\n jobManagerContract = ILilypadJobManager(jobManagerAddress);\n }\n\n function getJobResult(uint256 _jobID) public view returns (string memory) {\n return jobResults[_jobID];\n }\n\n function runCowsay(\n string memory message\n ) public {\n string[] memory inputs = new string[](1);\n inputs[0] = string(abi.encodePacked(\"Message=\", message));\n uint256 id = jobManagerContract.runJob(\n \"cowsay:v0.0.4\",\n inputs,\n msg.sender\n );\n\n emit JobCreated(\n id,\n message\n );\n }\n\n function submitResults(\n uint256 id,\n string memory dealId,\n string memory dataId\n ) public override {\n jobResults[id] = dataId;\n emit JobCompleted(\n id,\n dealId,\n dataId\n );\n }\n}\n" + }, + "contracts/ILilypadController.sol": { + "content": "// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.6;\n\nimport \"./SharedStructs.sol\";\n\ninterface ILilypadController {\n\n function agree(\n string memory dealId,\n SharedStructs.DealMembers memory members,\n SharedStructs.DealTimeouts memory timeouts,\n SharedStructs.DealPricing memory pricing\n ) external returns (SharedStructs.Agreement memory);\n\n function addResult(\n string memory dealId,\n string memory resultsId,\n string memory dataId,\n uint256 instructionCount\n ) external;\n\n function acceptResult(\n string memory dealId\n ) external;\n \n function checkResult(\n string memory dealId\n ) external;\n\n function mediationAcceptResult(\n string memory dealId\n ) external;\n\n function mediationRejectResult(\n string memory dealId\n ) external;\n\n function timeoutAgree(\n string memory dealId\n ) external;\n\n function timeoutSubmitResult(\n string memory dealId\n ) external;\n\n function timeoutJudgeResult(\n string memory dealId\n ) external;\n \n function timeoutMediateResult(\n string memory dealId\n ) external;\n}\n" + }, + "contracts/ILilypadJobClient.sol": { + "content": "// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.6;\n\n// a smart contract that is running a job\n// it will call the IOnChainJobManager with it's job\n// which will end up with the resultsAdded function being called by the manager\ninterface ILilypadJobClient {\n function submitResults(\n uint256 id,\n string memory dealId,\n string memory dataId\n ) external;\n}\n" + }, + "contracts/ILilypadJobManager.sol": { + "content": "// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.6;\n\nimport \"./ILilypadJobClient.sol\";\n\n// the smart contract that is responsible for handling the life\n// cycle of a job - it will pay the registered solver to manage the job\n// this is the simple implementation - later we can implement the whole protocol\n// where the calling smart contract can decide if it wants to agree to a resource offer\n// and accept results\ninterface ILilypadJobManager is ILilypadJobClient {\n function runJob(\n string memory module,\n string[] memory inputs,\n address payee\n ) external returns (uint256);\n}\n" + }, + "contracts/ILilypadMediation.sol": { + "content": "// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.6;\n\nimport \"./SharedStructs.sol\";\n\n// this is our controller contract\n// it will be called by the mediation handler once a decision has been reached\ninterface ILilypadMediationRequester {\n function mediationAcceptResult(\n string memory dealId\n ) external;\n\n function mediationRejectResult(\n string memory dealId\n ) external;\n}\n\n// this is the contract that will handle mediating a deal\ninterface ILilypadMediationHandler {\n function mediationRequest(\n SharedStructs.Deal memory deal \n ) external; \n}\n" + }, + "contracts/ILilypadPayments.sol": { + "content": "// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.6;\n\ninterface ILilypadPayments {\n\n /**\n * Init\n */\n\n function setTokenAddress(\n address _tokenAddress\n ) external;\n\n /**\n * Agreements\n */\n function agreeResourceProvider(\n string memory dealId,\n address resourceProvider,\n uint256 timeoutCollateral\n ) external;\n\n function agreeJobCreator(\n string memory dealId,\n address jobCreator,\n uint256 paymentCollateral,\n uint256 timeoutCollateral\n ) external;\n\n /**\n * Results\n */\n\n function addResult(\n string memory dealId,\n address resourceProvider,\n uint256 resultsCollateral,\n uint256 timeoutCollateral\n ) external;\n\n function acceptResult(\n string memory dealId,\n address resourceProvider,\n address jobCreator,\n uint256 jobCost,\n uint256 paymentCollateral,\n uint256 resultsCollateral,\n uint256 timeoutCollateral\n ) external;\n\n function checkResult(\n string memory dealId,\n address jobCreator,\n uint256 timeoutCollateral,\n uint256 mediationFee\n ) external;\n\n /**\n * Mediation\n */\n\n function mediationAcceptResult(\n string memory dealId,\n address resourceProvider,\n address jobCreator,\n uint256 jobCost,\n uint256 paymentCollateral,\n uint256 resultsCollateral,\n uint256 mediationFee\n ) external;\n\n function mediationRejectResult(\n string memory dealId,\n address resourceProvider,\n address jobCreator,\n uint256 paymentCollateral,\n uint256 resultsCollateral,\n uint256 mediationFee\n ) external;\n\n /**\n * Timeouts\n */\n\n function timeoutAgreeRefundResourceProvider(\n string memory dealId,\n address resourceProvider,\n uint256 timeoutCollateral\n ) external;\n\n function timeoutAgreeRefundJobCreator(\n string memory dealId,\n address jobCreator,\n uint256 paymentCollateral,\n uint256 timeoutCollateral\n ) external;\n\n function timeoutSubmitResult(\n string memory dealId,\n address resourceProvider,\n address jobCreator,\n uint256 paymentCollateral,\n uint256 timeoutCollateral\n ) external;\n\n function timeoutJudgeResult(\n string memory dealId,\n address resourceProvider,\n address jobCreator,\n uint256 resultsCollateral,\n uint256 timeoutCollateral\n ) external;\n\n function timeoutMediateResult(\n string memory dealId,\n address resourceProvider,\n address jobCreator,\n uint256 paymentCollateral,\n uint256 resultsCollateral,\n uint256 mediationFee\n ) external;\n \n}\n" + }, + "contracts/ILilypadStorage.sol": { + "content": "// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.6;\n\nimport \"./SharedStructs.sol\";\n\ninterface ILilypadStorage {\n \n /**\n * Deals\n */\n\n function getDeal(\n string memory dealId\n ) external returns (SharedStructs.Deal memory);\n\n function getDealsForParty(\n address party\n ) external returns (uint256[] memory);\n\n function ensureDeal(\n string memory dealId,\n SharedStructs.DealMembers memory members,\n SharedStructs.DealTimeouts memory timeouts,\n SharedStructs.DealPricing memory pricing\n ) external returns (SharedStructs.Deal memory);\n\n /**\n * Agreements\n */\n\n function getAgreement(\n string memory dealId\n ) external returns (SharedStructs.Agreement memory);\n \n function agreeResourceProvider(\n string memory dealId\n ) external returns (SharedStructs.Agreement memory);\n\n function agreeJobCreator(\n string memory dealId\n ) external returns (SharedStructs.Agreement memory);\n \n /**\n * Post Results\n */\n\n function getResult(\n string memory dealId\n ) external returns (SharedStructs.Result memory);\n\n function addResult(\n string memory dealId,\n string memory resultsId,\n string memory dataId,\n uint256 instructionCount\n ) external returns (SharedStructs.Result memory);\n\n /**\n * Judge Results\n */\n\n function acceptResult(\n string memory dealId\n ) external;\n\n function checkResult(\n string memory dealId\n ) external;\n\n /**\n * Mediation\n */\n \n function mediationAcceptResult(\n string memory dealId\n ) external;\n\n function mediationRejectResult(\n string memory dealId\n ) external;\n\n /**\n * Timeouts\n */\n function timeoutAgree(\n string memory dealId\n ) external;\n\n function timeoutSubmitResult(\n string memory dealId\n ) external;\n\n function timeoutJudgeResult(\n string memory dealId\n ) external;\n\n function timeoutMediateResult(\n string memory dealId\n ) external;\n\n /**\n * Costings\n */\n\n function getJobCost(\n string memory dealId\n ) external returns (uint256);\n\n function getResultsCollateral(\n string memory dealId\n ) external returns (uint256);\n \n /**\n * Checkers\n */\n\n function hasDeal(\n string memory dealId\n ) external returns (bool);\n\n function isState(\n string memory dealId,\n SharedStructs.AgreementState state\n ) external returns (bool);\n \n}\n" + }, + "contracts/ILilypadToken.sol": { + "content": "// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.6;\n\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\n\ninterface ILilypadToken is IERC20 {\n function escrowBalanceOf(\n address _address\n ) external returns (uint256);\n\n function payEscrow(\n uint256 amount\n ) external returns (bool);\n\n function refundEscrow(\n address toAddress,\n uint256 amount\n ) external returns (bool);\n\n function payJob(\n address fromAddress,\n address toAddress,\n uint256 amount\n ) external returns (bool);\n\n function slashEscrow(\n address slashedAddress,\n uint256 amount\n ) external returns (bool);\n}\n" + }, + "contracts/ILilypadUsers.sol": { + "content": "// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.6;\n\nimport \"./SharedStructs.sol\";\n\ninterface ILilypadUsers {\n\n /**\n * Users\n */\n\n function getUser(\n address userAddress\n ) external returns (SharedStructs.User memory);\n\n function updateUser(\n string memory metadataCID,\n string memory url,\n SharedStructs.ServiceType[] memory roles\n ) external returns (SharedStructs.User memory);\n\n // add the given user to a list of service types\n // that can be easily discovered (e.g. how to list the solvers)\n function addUserToList(\n SharedStructs.ServiceType serviceType\n ) external;\n\n function removeUserFromList(\n SharedStructs.ServiceType serviceType\n ) external;\n\n function showUsersInList(\n SharedStructs.ServiceType serviceType\n ) external returns (address[] memory);\n \n}\n" + }, + "contracts/LilypadController.sol": { + "content": "// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.6;\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"./SharedStructs.sol\";\nimport \"./ILilypadController.sol\";\nimport \"./ILilypadStorage.sol\";\nimport \"./ILilypadPayments.sol\";\nimport \"./ILilypadMediation.sol\";\n\ncontract LilypadController is ILilypadController, Ownable, Initializable {\n\n /**\n * Types\n */\n \n address private storageAddress;\n address private userAddress;\n address private paymentsAddress;\n address private mediationAddress;\n address private jobCreatorAddress;\n address private powAddress;\n\n ILilypadStorage private storageContract;\n ILilypadPayments private paymentsContract;\n ILilypadMediationHandler private mediationContract;\n\n /**\n * Init\n */\n\n // https://docs.openzeppelin.com/upgrades-plugins/1.x/writing-upgradeable\n function initialize(\n address _storageAddress,\n address _usersAddress,\n address _paymentsAddress,\n address _mediationAddress,\n address _jobCreatorAddress,\n address _powAddress\n ) public initializer {\n setStorageAddress(_storageAddress);\n setUsersAddress(_usersAddress);\n setPaymentsAddress(_paymentsAddress);\n setMediationAddress(_mediationAddress);\n setJobCreatorAddress(_jobCreatorAddress);\n setPowAddress(_powAddress);\n }\n\n function setStorageAddress(address _storageAddress) public onlyOwner {\n require(_storageAddress != address(0), \"Storage address\");\n storageAddress = _storageAddress;\n storageContract = ILilypadStorage(storageAddress);\n }\n\n function getStorageAddress() public view returns(address) {\n return storageAddress;\n }\n\n function setUsersAddress(address _usersAddress) public onlyOwner {\n require(_usersAddress != address(0), \"Users address\");\n userAddress = _usersAddress;\n }\n\n function getUsersAddress() public view returns(address) {\n return userAddress;\n }\n\n function setPaymentsAddress(address _paymentsAddress) public onlyOwner {\n require(_paymentsAddress != address(0), \"Payments address\");\n paymentsAddress = _paymentsAddress;\n paymentsContract = ILilypadPayments(_paymentsAddress);\n }\n\n function getPaymentsAddress() public view returns(address) {\n return paymentsAddress;\n }\n\n function setMediationAddress(address _mediationAddress) public onlyOwner {\n require(_mediationAddress != address(0), \"Mediation address\");\n mediationAddress = _mediationAddress;\n mediationContract = ILilypadMediationHandler(_mediationAddress);\n }\n\n function getMediationAddress() public view returns(address) {\n return mediationAddress;\n }\n\n function setJobCreatorAddress(address _jobCreatorAddress) public onlyOwner {\n require(_jobCreatorAddress != address(0), \"JobCreator address\");\n jobCreatorAddress = _jobCreatorAddress;\n }\n\n function getJobCreatorAddress() public view returns(address) {\n return jobCreatorAddress;\n }\n\n function setPowAddress(address _powAddress) public onlyOwner {\n require(_powAddress != address(0), \"Users address\");\n powAddress = _powAddress;\n }\n\n function getPowAddress() public view returns(address) {\n return powAddress;\n }\n\n\n /**\n * Agreements\n */\n\n // * create the deal if not exists\n // * otherwise compare the values to ensure 2 sided agreement\n // * check the RP or JC is calling this\n // * if RP:\n // * mark the deal as RP agreed\n // * pay in the timeout collateral\n // * if JC:\n // * mark the deal as JC agreed\n // * pay in the payment collateral and timeout collateral\n // * if both sides have agreed then mark the deal as agreed\n // * emit the event\n function agree(\n string memory dealId,\n SharedStructs.DealMembers memory members,\n SharedStructs.DealTimeouts memory timeouts,\n SharedStructs.DealPricing memory pricing\n ) public override returns (SharedStructs.Agreement memory) {\n SharedStructs.Deal memory deal = storageContract.ensureDeal(\n dealId,\n members,\n timeouts,\n pricing\n );\n bool isResourceProvider = tx.origin == deal.members.resourceProvider;\n bool isJobCreator = tx.origin == deal.members.jobCreator;\n require(isResourceProvider || isJobCreator, \"Only RP / JC\");\n\n if(isResourceProvider) {\n storageContract.agreeResourceProvider(dealId);\n paymentsContract.agreeResourceProvider(\n dealId,\n deal.members.resourceProvider,\n deal.timeouts.submitResults.collateral\n );\n }\n else if(isJobCreator) {\n storageContract.agreeJobCreator(dealId);\n paymentsContract.agreeJobCreator(\n dealId,\n deal.members.jobCreator,\n deal.pricing.paymentCollateral,\n // the JC paus the judge results collateral\n deal.timeouts.judgeResults.collateral\n );\n }\n return storageContract.getAgreement(dealId);\n }\n\n /**\n * Results\n */\n\n // * check the RP is calling this\n // * mark the deal as results submitted\n // * calculate the cost of the job\n // * calculate the job collateral based on the multiple\n // * work out the difference between the timeout and results collateral\n // * pay the difference into / out of the contract to the RP\n // * emit the event\n function addResult(\n string memory dealId,\n string memory resultsId,\n // this is the CID of the actual data\n // otherwise onchain clients cannot know the actual data they want to fetch\n string memory dataId,\n uint256 instructionCount\n ) public override {\n require(storageContract.isState(dealId, SharedStructs.AgreementState.DealAgreed), \"DealAgreed\");\n SharedStructs.Deal memory deal = storageContract.getDeal(dealId);\n require(deal.members.resourceProvider == tx.origin, \"Only RP\");\n\n storageContract.addResult(\n dealId,\n resultsId,\n dataId,\n instructionCount\n );\n\n // how many multiple of the job cost must the RP put up as collateral\n // we need to do this after having added the result otherwise\n // we don't know the instruction count\n uint256 resultsCollateral = storageContract.getResultsCollateral(dealId);\n\n paymentsContract.addResult(\n dealId,\n deal.members.resourceProvider,\n resultsCollateral,\n // this is the RP adding a results so they get their submit results timeout collateral back\n deal.timeouts.submitResults.collateral\n );\n }\n\n // * check the JC is calling this\n // * check we are in Submitted state\n // * mark the deal as results accepted\n // * calculate the cost of the job\n // * deduct the cost of the job from the JC payment collateral\n // * pay the RP the cost of the job\n // * refund the RP the results collateral\n // * refund the JC the job collateral minus the cost\n // * refund the JC the timeout collateral\n function acceptResult(\n string memory dealId\n ) public override {\n require(storageContract.isState(dealId, SharedStructs.AgreementState.ResultsSubmitted), \"ResultsSubmitted\");\n SharedStructs.Deal memory deal = storageContract.getDeal(dealId);\n require(deal.members.jobCreator == tx.origin, \"Only JC\");\n \n uint256 jobCost = storageContract.getJobCost(dealId);\n uint256 resultsCollateral = storageContract.getResultsCollateral(dealId);\n\n storageContract.acceptResult(dealId);\n paymentsContract.acceptResult(\n dealId,\n deal.members.resourceProvider,\n deal.members.jobCreator,\n jobCost,\n deal.pricing.paymentCollateral,\n resultsCollateral,\n // this is the JC judging their result so they get their timeout collateral back\n deal.timeouts.judgeResults.collateral\n );\n }\n\n // * check the JC is calling this\n // * check we are in Submitted state\n // * check the mediator is in the list of RP trusted mediators\n // * mark the deal as results checked\n // * charge the JC the mediation fee\n // * refund the JC the timeout collateral\n // * emit the Mediation event so the mediator kicks in\n function checkResult(\n string memory dealId\n ) public override {\n require(storageContract.isState(dealId, SharedStructs.AgreementState.ResultsSubmitted), \"ResultsSubmitted\");\n SharedStructs.Deal memory deal = storageContract.getDeal(dealId);\n require(deal.members.jobCreator == tx.origin, \"Only JC\");\n\n // this function will require that the mediator is in the RP's list of trusted mediators\n storageContract.checkResult(dealId);\n paymentsContract.checkResult(\n dealId,\n deal.members.jobCreator,\n // this is the JC judging their result so they get their timeout collateral back\n deal.timeouts.judgeResults.collateral,\n deal.pricing.mediationFee\n );\n\n // trigger the mediation process by calling the contract\n mediationContract.mediationRequest(deal);\n }\n\n /**\n * Mediation\n */\n\n // the mediator calls this to say that the resource provider did the correct job\n // * check the state is ResultsChecked\n // * check the mediator is calling this\n // * mark the deal as mediation accepted\n // * refund the JC what is left from the payment collateral (if any)\n // * pay the RP the cost of the job\n // * refund the RP the results collateral\n // * pay the mediator for mediating\n function mediationAcceptResult(\n string memory dealId\n ) public override {\n require(mediationAddress == _msgSender(), \"Only mediation\");\n require(_canMediateResult(dealId), \"Cannot mediate\");\n \n SharedStructs.Deal memory deal = storageContract.getDeal(dealId);\n uint256 jobCost = storageContract.getJobCost(dealId);\n uint256 resultsCollateral = storageContract.getResultsCollateral(dealId);\n\n storageContract.mediationAcceptResult(dealId);\n paymentsContract.mediationAcceptResult(\n dealId,\n deal.members.resourceProvider,\n deal.members.jobCreator,\n jobCost,\n deal.pricing.paymentCollateral,\n resultsCollateral,\n deal.pricing.mediationFee\n );\n }\n\n // the mediator calls this to say that the resource provider did the bad job\n // * check the state is ResultsChecked\n // * check the mediator is calling this\n // * mark the deal as mediation rejected\n // * refund the JC their payment collateral\n // * slash the RP's results collateral\n // * pay the mediator for mediating\n function mediationRejectResult(\n string memory dealId\n ) public override {\n // only the current mediation contract can call this\n require(mediationAddress == _msgSender(), \"Only mediation\");\n require(_canMediateResult(dealId), \"Cannot mediate\");\n\n SharedStructs.Deal memory deal = storageContract.getDeal(dealId);\n uint256 resultsCollateral = storageContract.getResultsCollateral(dealId);\n\n storageContract.mediationRejectResult(dealId);\n paymentsContract.mediationRejectResult(\n dealId,\n deal.members.resourceProvider,\n deal.members.jobCreator,\n deal.pricing.paymentCollateral,\n resultsCollateral,\n deal.pricing.mediationFee\n );\n }\n\n function _canMediateResult(\n string memory dealId \n ) private returns (bool) {\n require(storageContract.isState(dealId, SharedStructs.AgreementState.ResultsChecked), \"ResultsChecked\");\n return true;\n }\n\n /**\n * Timeouts\n */\n\n function timeoutAgree(\n string memory dealId\n ) public override {\n SharedStructs.Deal memory deal = storageContract.getDeal(dealId);\n SharedStructs.Agreement memory agreement = storageContract.getAgreement(dealId);\n require(deal.members.jobCreator == tx.origin || deal.members.resourceProvider == tx.origin, \"Only JC or RP\");\n require(agreement.state == SharedStructs.AgreementState.DealNegotiating, \"Not correct state\");\n require(block.timestamp > agreement.dealCreatedAt + deal.timeouts.agree.timeout, \"Not timed out\");\n storageContract.timeoutAgree(dealId);\n if (agreement.resourceProviderAgreedAt > 0) {\n // this is an RP refund\n paymentsContract.timeoutAgreeRefundResourceProvider(\n dealId,\n deal.members.resourceProvider,\n deal.timeouts.submitResults.collateral\n );\n } else if (agreement.jobCreatorAgreedAt > 0) {\n // this is an JC refund\n paymentsContract.timeoutAgreeRefundJobCreator(\n dealId,\n deal.members.jobCreator,\n deal.pricing.paymentCollateral,\n deal.timeouts.submitResults.collateral\n );\n }\n }\n\n // the job creator calls this after the timeout has passed and there are no results submitted\n // * check the JC is calling this\n // * mark the deal as timedout\n // * pay back the JC's job collateral\n // * slash the RP's results collateral\n // * emit the event\n function timeoutSubmitResult(\n string memory dealId\n ) public override {\n SharedStructs.Deal memory deal = storageContract.getDeal(dealId);\n SharedStructs.Agreement memory agreement = storageContract.getAgreement(dealId);\n require(deal.members.jobCreator == tx.origin, \"Only JC\");\n require(agreement.state == SharedStructs.AgreementState.DealAgreed, \"Not correct state\");\n require(block.timestamp > agreement.dealAgreedAt + deal.timeouts.submitResults.timeout, \"Not timed out\");\n storageContract.timeoutSubmitResult(dealId);\n paymentsContract.timeoutSubmitResult(\n dealId,\n deal.members.resourceProvider,\n deal.members.jobCreator,\n deal.pricing.paymentCollateral,\n deal.timeouts.submitResults.collateral\n );\n }\n\n // the resource provider calls this after the timeout has passed after submitting results\n // and the job creator has not yet submitted their judgement on those results\n // * check the RP is calling this\n // * mark the deal as timedout\n // * pay back the RP's results collateral\n // * pay the RP the cost of the job\n // * slash the JC's timeout collateral\n // * slash the JC's job collateral\n // * emit the event\n function timeoutJudgeResult(\n string memory dealId\n ) public override {\n SharedStructs.Deal memory deal = storageContract.getDeal(dealId);\n SharedStructs.Agreement memory agreement = storageContract.getAgreement(dealId);\n require(deal.members.resourceProvider == tx.origin, \"Only RP\");\n require(agreement.state == SharedStructs.AgreementState.ResultsSubmitted, \"Not correct state\");\n require(block.timestamp > agreement.resultsSubmittedAt + deal.timeouts.judgeResults.timeout, \"Not timed out\");\n uint256 resultsCollateral = storageContract.getResultsCollateral(dealId);\n storageContract.timeoutJudgeResult(dealId); \n paymentsContract.timeoutJudgeResult(\n dealId,\n deal.members.resourceProvider,\n deal.members.jobCreator,\n resultsCollateral,\n deal.timeouts.judgeResults.collateral\n );\n }\n\n // either the JC or RP call this after the timeout has passed after results being checked\n // this refunds both the payment and results collateral to both the JC and RP\n // * check the RP or JC is calling this\n // * mark the deal as timedout\n // * pay back the RP's results collateral\n // * pay back the JC's paymnet collateral\n // * emit the event\n function timeoutMediateResult(\n string memory dealId\n ) public override {\n SharedStructs.Deal memory deal = storageContract.getDeal(dealId);\n SharedStructs.Agreement memory agreement = storageContract.getAgreement(dealId);\n require(deal.members.resourceProvider == tx.origin || deal.members.jobCreator == tx.origin, \"Only RP or JC\");\n require(agreement.state == SharedStructs.AgreementState.ResultsChecked, \"Not correct state\");\n require(block.timestamp > agreement.resultsSubmittedAt + deal.timeouts.judgeResults.timeout, \"Not timed out\");\n uint256 resultsCollateral = storageContract.getResultsCollateral(dealId);\n storageContract.timeoutMediateResult(dealId);\n paymentsContract.timeoutMediateResult(\n dealId,\n deal.members.resourceProvider,\n deal.members.jobCreator,\n deal.pricing.paymentCollateral,\n resultsCollateral,\n deal.pricing.mediationFee\n );\n }\n}\n" + }, + "contracts/LilypadMediationRandom.sol": { + "content": "// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.6;\n\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"./ControllerOwnable.sol\";\nimport \"./SharedStructs.sol\";\nimport \"./ILilypadMediation.sol\";\n\ncontract LilypadMediationRandom is ControllerOwnable, Initializable {\n\n // keep track of which mediators were choosen for which deals\n mapping(string => address) private mediators;\n\n event MediationRequested(\n string dealId,\n address mediator\n );\n\n /**\n * Init\n */\n\n // https://docs.openzeppelin.com/upgrades-plugins/1.x/writing-upgradeable\n function initialize() public initializer {\n \n }\n\n // this is called by the controller contract\n function mediationRequest(\n SharedStructs.Deal memory deal\n ) public onlyController {\n uint randomIndex = uint(keccak256(abi.encodePacked(block.timestamp, deal.dealId))) % deal.members.mediators.length;\n address mediator = deal.members.mediators[randomIndex];\n require(mediator != address(0), \"mediator cannot be 0x0\");\n mediators[deal.dealId] = mediator;\n emit MediationRequested(deal.dealId, mediator);\n }\n\n function getMediator(\n string memory dealId\n ) public view returns(address) {\n return mediators[dealId];\n }\n\n // call the controller contract as a ILilypadMediationRequester\n function mediationAcceptResult(\n string memory dealId\n ) public {\n // check the tx.origin is the same mediator that was picked\n require(mediators[dealId] != address(0), \"mediator cannot be 0x0\");\n require(mediators[dealId] == tx.origin, \"tx.origin must be the mediator\");\n // call the controller contract\n ILilypadMediationRequester(getControllerAddress()).mediationAcceptResult(dealId);\n }\n\n // call the controller contract as a ILilypadMediationRequester\n function mediationRejectResult(\n string memory dealId\n ) public {\n // check the tx.origin is the same mediator that was picked\n require(mediators[dealId] != address(0), \"mediator cannot be 0x0\");\n require(mediators[dealId] == tx.origin, \"tx.origin must be the mediator\");\n // call the controller contract\n ILilypadMediationRequester(getControllerAddress()).mediationRejectResult(dealId);\n }\n}\n" + }, + "contracts/LilypadOnChainJobCreator.sol": { + "content": "// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.6;\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"./SharedStructs.sol\";\nimport \"./ILilypadJobManager.sol\";\nimport \"./ILilypadJobClient.sol\";\nimport \"./ControllerOwnable.sol\";\nimport \"./ILilypadToken.sol\";\n\ncontract LilypadOnChainJobCreator is ILilypadJobManager, ControllerOwnable, Initializable {\n\n // the token contract\n // we check to see what allowance has been granted to be spent on behalf\n // of the customer of a job\n address private tokenAddress;\n ILilypadToken private tokenContract;\n\n // the minimum amount that must be \"approved\" on the smart contract for the solver to spend\n // for it to consider running a job for a client\n // the solver will update this as the market pricing changes\n uint256 public requiredDeposit;\n\n // auto increment job id\n uint256 public nextJobID;\n\n // map of job id onto offer\n mapping(uint256 => SharedStructs.JobOffer) private jobOffers;\n\n event JobAdded(\n uint256 id,\n address calling_contract,\n address payee,\n string module,\n string[] inputs\n );\n\n /**\n * Init\n */\n\n // https://docs.openzeppelin.com/upgrades-plugins/1.x/writing-upgradeable\n function initialize(\n address _tokenAddress\n ) public initializer {\n setTokenAddress(_tokenAddress);\n nextJobID = 0;\n }\n\n function setTokenAddress(address _tokenAddress) public onlyOwner {\n require(_tokenAddress != address(0), \"Token address\");\n tokenAddress = _tokenAddress;\n tokenContract = ILilypadToken(tokenAddress);\n }\n\n function getTokenAddress() public view returns (address) {\n return tokenAddress;\n }\n\n function setRequiredDeposit(uint256 cost) public onlyController {\n require(cost > 0, \"Min deposit\");\n requiredDeposit = cost;\n }\n\n function getRequiredDeposit() public view returns (uint256) {\n return requiredDeposit;\n }\n\n // called by on-chain clients to make an offer for a job\n // this will return a ticketID which is a unique onchain identifier for the job\n function runJob(\n // what is the module name we are making an offer for\n string memory module,\n // an array of key=value pairs that will be the inputs to the job\n string[] memory inputs,\n // the address of the client who is paying for the job\n // they must have called the increaseAllowance function\n // giving the controller (i.e. solver) permission to spend their tokens\n address payee\n ) public override returns (uint256) {\n // this makes sure that the person paying for the job has\n // already called \"approve\" on the token contract so the solver can\n // work on it's behalf\n require(tokenContract.allowance(payee, getControllerAddress()) >= requiredDeposit, \"Token allowance not enough\");\n\n nextJobID = nextJobID + 1;\n jobOffers[nextJobID] = SharedStructs.JobOffer(\n nextJobID,\n msg.sender,\n payee,\n module,\n inputs\n );\n emit JobAdded(\n nextJobID,\n msg.sender,\n payee,\n module,\n inputs\n );\n\n return nextJobID;\n }\n\n // this is called by the solver once we've got results out of the controller\n // it will call the \"resultsAdded\" function on the original client contract\n function submitResults(\n uint256 id,\n string memory dealId,\n string memory dataId\n ) public onlyController override {\n SharedStructs.JobOffer storage offer = jobOffers[id];\n require(offer.id != 0, \"Job not found\");\n ILilypadJobClient(offer.calling_contract).submitResults(\n id,\n dealId,\n dataId\n );\n }\n}\n" + }, + "contracts/LilypadPayments.sol": { + "content": "// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.6;\n\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"./ILilypadToken.sol\";\nimport \"./ControllerOwnable.sol\";\nimport \"./ILilypadPayments.sol\";\n\n// import \"@openzeppelin/contracts/utils/Strings.sol\";\n// import \"hardhat/console.sol\";\n// console.log(\"ensureDeal\");\n// console.log(Strings.toString(uint256(SharedStructs.AgreementState.DealNegotiating)));\n// console.log(Strings.toString(uint256(agreements[dealId].state)));\n\ncontract LilypadPayments is ControllerOwnable, Initializable {\n\n /**\n * Types\n */\n\n // the address of the LilypadToken contract\n address private tokenAddress;\n ILilypadToken private tokenContract;\n\n // used to cut off upgrades for the remote contract\n bool private canChangeTokenAddress = true;\n\n /**\n * Enums\n */\n enum PaymentReason {\n\n // the money the JC puts up to pay for the job\n PaymentCollateral,\n\n // the money the RP puts up to attest it's results are correct\n ResultsCollateral,\n\n // the money the RP, JC and Mediator all put up to prevent timeouts\n TimeoutCollateral,\n\n // the money the RP gets paid for the job for running it successfully\n JobPayment,\n\n // the money the JC pays the mediator for resolving a dispute\n MediationFee\n }\n\n enum PaymentDirection {\n\n // money flowing into the contract\n // i.e. we GET paid\n PaidIn,\n\n // money paid out to services\n // i.e. we are PAYING\n PaidOut,\n\n // collateral that is locked up being refunded\n Refunded,\n \n // collateral that is locked up being slashed\n Slashed\n }\n\n /**\n * Events\n */\n event Payment(\n string dealId,\n address payee,\n uint256 amount,\n PaymentReason reason,\n PaymentDirection direction\n );\n\n /**\n * Init\n */\n\n // used for debugging\n mapping(address => string) private accountNames;\n\n // https://docs.openzeppelin.com/upgrades-plugins/1.x/writing-upgradeable\n function initialize(\n address _tokenAddress\n ) public initializer {\n setTokenAddress(_tokenAddress);\n\n // this is only for debugging\n // accountNames[address(0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266)] = \"admin\";\n // accountNames[address(0x70997970C51812dc3A010C7d01b50e0d17dc79C8)] = \"faucet\";\n // accountNames[address(0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC)] = \"solver\";\n // accountNames[address(0x90F79bf6EB2c4f870365E785982E1f101E93b906)] = \"mediator\";\n // accountNames[address(0x15d34AAf54267DB7D7c367839AAf71A00a2C6A65)] = \"resource_provider\";\n // accountNames[address(0x9965507D1a55bcC2695C58ba16FB37d819B0A4dc)] = \"job_creator\";\n // accountNames[address(0x976EA74026E726554dB657fA54763abd0C3a0aa9)] = \"directory\";\n }\n\n // the LilypadToken we are calling payinEscrow and payoutEscrow on\n function setTokenAddress(address _tokenAddress) public onlyOwner {\n require(_tokenAddress != address(0), \"LilepadPayments: Token address must be defined\");\n require(canChangeTokenAddress, \"LilypadToken: canChangeTokenAddress is disabled\");\n tokenAddress = _tokenAddress;\n tokenContract = ILilypadToken(_tokenAddress);\n }\n\n function getTokenAddress() public view returns(address) {\n return tokenAddress;\n }\n\n // set for canChangePaymentsAddress\n function disableChangeTokenAddress() public onlyOwner {\n canChangeTokenAddress = false;\n }\n\n /**\n * Controller handlers\n * \n * these methods are called by the controller to wrap various payment\n * scenarios - hence they are all onlyOwner\n */\n\n /**\n * Agreements\n */\n\n // * pay in the timeout collateral\n function agreeResourceProvider(\n string memory dealId,\n address resourceProvider,\n uint256 timeoutCollateral\n ) public onlyController {\n // we check this here to double check who we are about to charge (the RP)\n // is who signed the TX and so we can take the money\n require(tx.origin == resourceProvider, \"LilypadPayments: Can only be called by the RP\");\n _payEscrow(\n dealId,\n timeoutCollateral,\n PaymentReason.TimeoutCollateral\n );\n }\n\n // * pay in the payment collateral and timeout collateral\n function agreeJobCreator(\n string memory dealId,\n address jobCreator,\n uint256 paymentCollateral,\n uint256 timeoutCollateral\n ) public onlyController {\n require(tx.origin == jobCreator, \"LilypadPayments: Can only be called by the JC\");\n _payEscrow(\n dealId,\n paymentCollateral,\n PaymentReason.PaymentCollateral\n );\n _payEscrow(\n dealId,\n timeoutCollateral,\n PaymentReason.TimeoutCollateral\n );\n }\n\n /**\n * Results\n */\n\n // * pay back the timeout collateral\n // * pay in the results collateral\n function addResult(\n string memory dealId,\n address resourceProvider,\n uint256 resultsCollateral,\n uint256 timeoutCollateral\n ) public onlyController {\n require(tx.origin == resourceProvider, \"LilypadPayments: Can only be called by the RP\");\n _payEscrow(\n dealId,\n resultsCollateral,\n PaymentReason.ResultsCollateral\n );\n _refundEscrow(\n dealId,\n resourceProvider,\n timeoutCollateral,\n PaymentReason.TimeoutCollateral\n );\n }\n\n // * pay the RP the job cost\n // * refund the RP the results collateral\n // * refund the JC the job collateral minus the job cost\n // * refund the JC the timeout collateral\n function acceptResult(\n string memory dealId,\n address resourceProvider,\n address jobCreator,\n uint256 jobCost,\n uint256 paymentCollateral,\n uint256 resultsCollateral,\n uint256 timeoutCollateral\n ) public onlyController {\n require(tx.origin == jobCreator, \"LilypadPayments: Can only be called by the JC\");\n\n // what if the final job cost is more than the payment collateral?\n // well - we have to cap the job cost at that collateral\n // true - the RP has lost money but they agreed to the deal\n uint256 actualPayment = jobCost;\n uint256 jcRefund = 0;\n if(jobCost > paymentCollateral) {\n actualPayment = paymentCollateral;\n } else {\n jcRefund = paymentCollateral - jobCost;\n }\n\n // pay the RP the actualPayment\n _payOut(\n dealId,\n jobCreator,\n resourceProvider,\n actualPayment,\n PaymentReason.JobPayment\n );\n\n // if the job cost more than the payment collateral then we shold not go negative\n // otherwise we are paying out more than the JC has put in\n //\n // the RP is loosing out a bit here but they agreed to doing the job\n if(jcRefund > 0) {\n _refundEscrow(\n dealId,\n jobCreator,\n jcRefund,\n PaymentReason.PaymentCollateral\n );\n }\n\n // refund the JC timeout collateral\n _refundEscrow(\n dealId,\n jobCreator,\n timeoutCollateral,\n PaymentReason.TimeoutCollateral\n );\n\n // refund the RP results collateral\n _refundEscrow(\n dealId,\n resourceProvider,\n resultsCollateral,\n PaymentReason.ResultsCollateral\n );\n }\n\n // * charge the JC the mediation fee\n // * refund the JC the timeout collateral\n function checkResult(\n string memory dealId,\n address jobCreator,\n uint256 timeoutCollateral,\n uint256 mediationFee\n ) public onlyController {\n require(tx.origin == jobCreator, \"LilypadPayments: Can only be called by the JC\");\n \n // the refund of the timeout collateral\n _refundEscrow(\n dealId,\n jobCreator,\n timeoutCollateral,\n PaymentReason.TimeoutCollateral\n );\n\n // the payment of the mediation fee\n _payEscrow(\n dealId,\n mediationFee,\n PaymentReason.MediationFee\n );\n }\n\n /**\n * Mediation\n */\n\n // * pay the RP the job cost\n // * refund the RP the results collateral\n // * refund the JC the job collateral minus the job cost\n // * pay the mediator for mediating\n function mediationAcceptResult(\n string memory dealId,\n address resourceProvider,\n address jobCreator,\n uint256 jobCost,\n uint256 paymentCollateral,\n uint256 resultsCollateral,\n uint256 mediationFee\n ) public onlyController {\n uint256 actualPayment = jobCost;\n uint256 jcRefund = 0;\n if(jobCost > paymentCollateral) {\n actualPayment = paymentCollateral;\n } else {\n jcRefund = paymentCollateral - jobCost;\n }\n \n // pay the RP the job cost from the JC\n _payOut(\n dealId,\n jobCreator,\n resourceProvider,\n actualPayment,\n PaymentReason.JobPayment\n );\n\n // pay the mediator the fee from the JC\n _payOut(\n dealId,\n jobCreator,\n tx.origin,\n mediationFee,\n PaymentReason.MediationFee\n );\n\n // if the job cost more than the payment collateral then we shold not go negative\n // otherwise we are paying out more than the JC has put in\n //\n // the RP is loosing out a bit here but they agreed to doing the job\n if(jcRefund > 0) {\n\n // refund the JC the diff between payment collateral and job cost\n _refundEscrow(\n dealId,\n jobCreator,\n jcRefund,\n PaymentReason.PaymentCollateral\n );\n }\n\n // refund the RP the results collateral\n _refundEscrow(\n dealId,\n resourceProvider,\n resultsCollateral,\n PaymentReason.ResultsCollateral\n );\n }\n\n // * refund the JC their payment collateral\n // * slash the RP's results collateral\n // * pay the mediator for mediating\n function mediationRejectResult(\n string memory dealId,\n address resourceProvider,\n address jobCreator,\n uint256 paymentCollateral,\n uint256 resultsCollateral,\n uint256 mediationFee\n ) public onlyController {\n // refund the JC their payment collateral\n _refundEscrow(\n dealId,\n jobCreator,\n paymentCollateral,\n PaymentReason.PaymentCollateral\n );\n\n // pay the mediator the fee from the JC\n _payOut(\n dealId,\n jobCreator,\n tx.origin,\n mediationFee,\n PaymentReason.MediationFee\n );\n\n // slash the RP\n _slashEscrow(\n dealId,\n resourceProvider,\n resultsCollateral,\n PaymentReason.ResultsCollateral\n );\n }\n\n /**\n * Timeouts\n */\n function timeoutAgreeRefundResourceProvider(\n string memory dealId,\n address resourceProvider,\n uint256 timeoutCollateral\n ) public onlyController {\n require(tx.origin == resourceProvider, \"LilypadPayments: Can only be called by the RP\");\n // the refund of the job collateral to the JC\n _refundEscrow(\n dealId,\n resourceProvider,\n timeoutCollateral,\n PaymentReason.TimeoutCollateral\n );\n }\n\n function timeoutAgreeRefundJobCreator(\n string memory dealId,\n address jobCreator,\n uint256 paymentCollateral,\n uint256 timeoutCollateral\n ) public onlyController {\n require(tx.origin == jobCreator, \"LilypadPayments: Can only be called by the JC\");\n // the refund of the job collateral to the JC\n _refundEscrow(\n dealId,\n jobCreator,\n paymentCollateral,\n PaymentReason.PaymentCollateral\n );\n\n // the refund of the job collateral to the JC\n _refundEscrow(\n dealId,\n jobCreator,\n timeoutCollateral,\n PaymentReason.TimeoutCollateral\n );\n }\n\n // * pay back the JC's job collateral\n // * pay back the JC's timeout collateral\n // * slash the RP's results collateral\n function timeoutSubmitResults(\n string memory dealId,\n address resourceProvider,\n address jobCreator,\n uint256 paymentCollateral,\n uint256 timeoutCollateral\n ) public onlyController {\n require(tx.origin == jobCreator, \"LilypadPayments: Can only be called by the JC\");\n // the refund of the job collateral to the JC\n _refundEscrow(\n dealId,\n jobCreator,\n paymentCollateral,\n PaymentReason.PaymentCollateral\n );\n\n // the refund of the job collateral to the JC\n _refundEscrow(\n dealId,\n jobCreator,\n timeoutCollateral,\n PaymentReason.TimeoutCollateral\n );\n \n // the slashing of the timeout collateral for the RP\n _slashEscrow(\n dealId,\n resourceProvider,\n timeoutCollateral,\n PaymentReason.TimeoutCollateral\n );\n }\n\n // * pay back the RP's results collateral\n // * pay the RP the cost of the job\n // * slash the JC's timeout collateral\n // * slash the JC's job collateral\n function timeoutJudgeResults(\n string memory dealId,\n address resourceProvider,\n address jobCreator,\n uint256 resultsCollateral,\n uint256 timeoutCollateral\n ) public onlyController {\n require(tx.origin == resourceProvider, \"LilypadPayments: Can only be called by the RP\");\n // the refund of the results collateral to the RP\n _refundEscrow(\n dealId,\n resourceProvider,\n resultsCollateral,\n PaymentReason.ResultsCollateral\n );\n\n // the slashing of the timeout collateral for the RP\n _slashEscrow(\n dealId,\n jobCreator,\n timeoutCollateral,\n PaymentReason.TimeoutCollateral\n );\n }\n\n // * pay back the RP's results collateral\n // * pay back the JC's payment collateral\n // * pay back the JC's mediation fee\n function timeoutMediateResult(\n string memory dealId,\n address resourceProvider,\n address jobCreator,\n uint256 paymentCollateral,\n uint256 resultsCollateral,\n uint256 mediationFee\n ) public onlyController {\n require(tx.origin == resourceProvider || tx.origin == jobCreator, \"LilypadPayments: Can only be called by the RP or JC\");\n // the refund of the results collateral to the RP\n _refundEscrow(\n dealId,\n resourceProvider,\n resultsCollateral,\n PaymentReason.ResultsCollateral\n );\n\n // the refund of the payment collateral to the JC\n _refundEscrow(\n dealId,\n jobCreator,\n paymentCollateral,\n PaymentReason.PaymentCollateral\n );\n\n // the refund of the mediation fee to the JC\n _refundEscrow(\n dealId,\n jobCreator,\n mediationFee,\n PaymentReason.MediationFee\n );\n }\n\n /**\n * Payment utils\n */\n\n\n function _payEscrow(\n string memory dealId,\n uint256 amount,\n PaymentReason reason\n ) private {\n // we check they have that much in their token balance before moving to tokens to us\n require(tokenContract.balanceOf(tx.origin) >= amount, \"LilypadPayments: Insufficient balance\");\n\n // console.log(\"_payEscrow\");\n // console.log(accountNames[tx.origin]);\n // console.log(amount);\n\n bool success = tokenContract.payEscrow(amount);\n require(success, \"LilypadPayments: Pay escrow failed\");\n\n emit Payment(\n dealId,\n tx.origin,\n amount,\n reason,\n PaymentDirection.PaidIn\n );\n }\n\n function _refundEscrow(\n string memory dealId,\n address toAddress,\n uint256 amount,\n PaymentReason reason\n ) private {\n // console.log(\"_refundEscrow\");\n // console.log(accountNames[toAddress]);\n // console.log(amount);\n\n bool success = tokenContract.refundEscrow(toAddress, amount);\n require(success, \"LilypadPayments: Refund escrow failed\");\n\n emit Payment(\n dealId,\n toAddress,\n amount,\n reason,\n PaymentDirection.Refunded\n );\n }\n\n function _payOut(\n string memory dealId,\n address fromAddress,\n address toAddress,\n uint256 amount,\n PaymentReason reason\n ) private {\n // console.log(\"_payJob\");\n // console.log(accountNames[fromAddress]);\n // console.log(accountNames[toAddress]);\n // console.log(amount);\n\n bool success = tokenContract.payJob(fromAddress, toAddress, amount);\n require(success, \"LilypadPayments: Pay job failed\");\n\n emit Payment(\n dealId,\n toAddress,\n amount,\n reason,\n PaymentDirection.PaidOut\n );\n }\n\n function _slashEscrow(\n string memory dealId,\n address slashedAddress,\n uint256 amount,\n PaymentReason reason\n ) private {\n // console.log(\"_slashEscrow\");\n // console.log(accountNames[slashedAddress]);\n // console.log(amount);\n\n bool success = tokenContract.slashEscrow(slashedAddress, amount);\n require(success, \"LilypadPayments: Slash escrow failed\");\n\n emit Payment(\n dealId,\n slashedAddress,\n amount,\n reason,\n PaymentDirection.Slashed\n );\n }\n}\n" + }, + "contracts/LilypadPaymentsTestable.sol": { + "content": "// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.6;\n\nimport \"./LilypadPayments.sol\";\n\ncontract LilypadPaymentsTestable is LilypadPayments {\n function _checkControllerAccess() internal pure override returns (bool) {\n return true;\n }\n}\n" + }, + "contracts/LilypadPow.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.6;\n//import \"@openzeppelin/contracts/access/Ownable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\";\n\ncontract LilypadPow is Initializable, OwnableUpgradeable {\n struct POWSubmission {\n address walletAddress;\n string nodeId;\n uint256 nonce;\n uint256 start_timestamp;\n uint256 complete_timestamp; //used to estimate hashrate of this submission\n bytes32 challenge; //record this to provent user never change challenge\n uint256 difficulty;\n }\n\n struct Challenge {\n bytes32 challenge;\n uint256 difficulty;\n string nodeId;\n uint256 timestamp;\n }\n\n // todo difficulty may need to adjust in test\n // this difficulty was calculate with this tool https://github.com/hunjixin/pow-tool/tree/main/difficulty\n // Theoretically A machine with a hash rate of 8M has a probability of no more than 0.01% of not finding a nonce that meets the difficulty within 20 blocks.\n // However, this issue has not been well validated in practice. it can solve nonce within one minute most of the time.\n uint256 public targetDifficulty; // =\n //555460709263765739036470010701196062214039696708679004195670928130048;\n mapping(address => POWSubmission[]) public powSubmissions;\n address[] public miners;\n\n mapping(address => Challenge) public lastChallenges;\n uint256 public validProofs;\n uint256 public startTime;\n\n uint256 public window_start;\n uint256 public window_end;\n /**\n * Init\n */\n\n // https://docs.openzeppelin.com/upgrades-plugins/1.x/writing-upgradeable\n function initialize() public initializer {\n __Ownable_init();\n targetDifficulty = 555460709263765739036470010701196062214039696708679004195670928130048;\n }\n\n function getMinerCount() public view returns (uint256) {\n return miners.length;\n }\n\n function getMiners() public view returns (address[] memory) {\n return miners;\n }\n\n function getMinerPowSubmissionCount(\n address addr\n ) public view returns (uint256) {\n return powSubmissions[addr].length;\n }\n\n function getMinerPowSubmissions(\n address addr\n ) public view returns (POWSubmission[] memory) {\n return powSubmissions[addr];\n }\n\n // generateChallenge gen a byte32 value as challenge value, Sc store this one for verify\n function generateChallenge(string calldata nodeId) external {\n checkTimeWindow();\n\n bytes32 challenge = keccak256(\n abi.encodePacked(block.timestamp, window_start, msg.sender, nodeId)\n );\n\n uint256 difficulty = calculate_difficulty();\n lastChallenges[msg.sender] = Challenge(\n challenge,\n difficulty,\n nodeId,\n block.timestamp\n );\n emit GenerateChallenge(challenge, difficulty);\n }\n\n function change_difficulty(uint256 difficulty) public onlyOwner {\n targetDifficulty = difficulty;\n }\n\n function calculate_difficulty() public view returns (uint256) {\n uint256 percentChange = 90 + (block.prevrandao % 21);\n return (targetDifficulty * percentChange) / 100;\n }\n\n // submitWork miner submint a nonce value, sc check the difficulty and emit a valid pow event when success\n function submitWork(uint256 nonce, string calldata nodeId) external {\n checkTimeWindow();\n\n Challenge memory lastChallenge = lastChallenges[msg.sender];\n bytes32 challenge = keccak256(\n abi.encodePacked(\n lastChallenge.timestamp,\n window_start,\n msg.sender,\n nodeId\n )\n );\n\n require(\n lastChallenge.challenge == challenge,\n \"Work submit not compatable with challenge\"\n );\n\n bytes32 hash = keccak256(abi.encodePacked(challenge, nonce));\n require(\n uint256(hash) < lastChallenge.difficulty,\n \"Work does not meet difficulty target\"\n );\n\n validProofs++;\n\n POWSubmission[] storage onwMinerPowSubmissions = powSubmissions[\n msg.sender\n ];\n if (onwMinerPowSubmissions.length == 0) {\n miners.push(msg.sender);\n }\n onwMinerPowSubmissions.push(\n POWSubmission(\n msg.sender,\n nodeId,\n nonce,\n lastChallenge.timestamp,\n block.timestamp,\n lastChallenge.challenge,\n lastChallenge.difficulty\n )\n );\n\n //clean last challenge to submit the same proof\n lastChallenges[msg.sender] = Challenge(0, 0, \"\", 0);\n emit ValidPOWSubmitted(\n msg.sender,\n nodeId,\n nonce,\n lastChallenge.timestamp,\n block.timestamp,\n lastChallenge.challenge,\n lastChallenge.difficulty\n );\n }\n\n function triggerNewPowRound() external onlyOwner {\n window_start = block.number;\n window_end = block.number + 30; //todo arbitary value , need to discuss\n emit NewPowRound();\n }\n\n function checkTimeWindow() public view {\n require(block.number < window_end, \"proof windows has closed\");\n }\n\n event ValidPOWSubmitted(\n address walletAddress,\n string nodeId,\n uint256 nonce,\n uint256 start_timestamp,\n uint256 complete_timestamp,\n bytes32 challenge,\n uint256 difficulty\n );\n event GenerateChallenge(bytes32 challenge, uint256 difficulty);\n event NewPowRound();\n}\n" + }, + "contracts/LilypadStorage.sol": { + "content": "// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.6;\n\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"./SharedStructs.sol\";\nimport \"./ControllerOwnable.sol\";\n\ncontract LilypadStorage is ControllerOwnable, Initializable {\n\n // the address that is allowed to be the msg.sender for the payment functions\n address private controllerAddress;\n\n // used to cut off upgrades for the remote contract\n bool private canChangeControllerAddress = true;\n\n // a map of deal id -> deal\n mapping(string => SharedStructs.Deal) private deals;\n\n // a map of party -> dealid[]\n mapping(address => string[]) private dealsForParty;\n\n // a map of deal id -> agreement\n mapping(string => SharedStructs.Agreement) private agreements;\n\n // a map of deal id -> result\n mapping(string => SharedStructs.Result) private results;\n\n // a map of deal id -> result\n mapping(string => SharedStructs.Result) private mediations;\n\n event DealStateChange(\n string dealId,\n SharedStructs.AgreementState state\n );\n\n /**\n * Init\n */\n\n // https://docs.openzeppelin.com/upgrades-plugins/1.x/writing-upgradeable\n function initialize() public initializer {\n \n }\n\n /**\n * Deals\n */\n\n function getDeal(\n string memory dealId\n ) public view returns (SharedStructs.Deal memory) {\n return deals[dealId];\n }\n\n function getDealsForParty(\n address party\n ) public view returns (string[] memory) {\n return dealsForParty[party];\n }\n\n function checkDealMembers(\n SharedStructs.DealMembers memory members\n ) private pure {\n require(members.resourceProvider != address(0), \"RP missing\");\n require(members.jobCreator != address(0), \"JC missing\");\n require(members.solver != address(0), \"Solver missing\");\n require(members.mediators.length > 0, \"Mediators <= 0\");\n require(members.resourceProvider != members.jobCreator, \"RP / JC same\");\n }\n\n function checkTimeouts(\n SharedStructs.DealTimeouts memory timeouts\n ) private pure {\n // the cost of the agree timeout cannot be > 0 because the whole point is\n // one party has not paid anything into the contract is what has timed out\n require(timeouts.agree.collateral == 0, \"Agree deposit must be 0\");\n // the same is true of the mediation timeout - it's cost cannot be zero\n require(timeouts.mediateResults.collateral == 0, \"Mediate deposit must be 0\");\n }\n\n function compareDealMembers(\n SharedStructs.DealMembers memory members1,\n SharedStructs.DealMembers memory members2\n ) private pure {\n require(members1.resourceProvider == members2.resourceProvider, \"RP\");\n require(members1.jobCreator == members2.jobCreator, \"JC\");\n require(members1.solver == members2.solver, \"Solver\");\n require(members1.mediators.length == members2.mediators.length, \"Mediators\");\n for (uint256 i = 0; i < members1.mediators.length; i++) {\n require(members1.mediators[i] == members2.mediators[i], \"Mediator\");\n }\n }\n\n function compareDealTimeout(\n SharedStructs.DealTimeout memory timeout1,\n SharedStructs.DealTimeout memory timeout2\n ) private pure {\n require(timeout1.timeout == timeout2.timeout, \"Timeout\");\n require(timeout1.collateral == timeout2.collateral, \"Collateral\");\n }\n \n function compareDealTimeouts(\n SharedStructs.DealTimeouts memory timeouts1,\n SharedStructs.DealTimeouts memory timeouts2\n ) private pure {\n compareDealTimeout(timeouts1.agree, timeouts2.agree);\n compareDealTimeout(timeouts1.submitResults, timeouts2.submitResults);\n compareDealTimeout(timeouts1.judgeResults, timeouts2.judgeResults);\n compareDealTimeout(timeouts1.mediateResults, timeouts2.mediateResults);\n }\n\n function compareDealPricing(\n SharedStructs.DealPricing memory pricing1,\n SharedStructs.DealPricing memory pricing2\n ) private pure {\n require(pricing1.instructionPrice == pricing2.instructionPrice, \"Price\");\n require(pricing1.paymentCollateral == pricing2.paymentCollateral, \"Payment\");\n require(pricing1.resultsCollateralMultiple == pricing2.resultsCollateralMultiple, \"Results\");\n require(pricing1.mediationFee == pricing2.mediationFee, \"Mediation\");\n }\n\n function ensureDeal(\n string memory dealId,\n SharedStructs.DealMembers memory members,\n SharedStructs.DealTimeouts memory timeouts,\n SharedStructs.DealPricing memory pricing\n ) public onlyController returns (SharedStructs.Deal memory) {\n require(isState(dealId, SharedStructs.AgreementState.DealNegotiating), \"DealNegotiating\");\n checkDealMembers(members);\n checkTimeouts(timeouts);\n if(hasDeal(dealId)) {\n SharedStructs.Deal memory existingDeal = getDeal(dealId);\n compareDealMembers(existingDeal.members, members);\n compareDealTimeouts(existingDeal.timeouts, timeouts);\n compareDealPricing(existingDeal.pricing, pricing);\n }\n else {\n deals[dealId] = SharedStructs.Deal(\n dealId,\n members,\n timeouts,\n pricing\n );\n dealsForParty[members.resourceProvider].push(dealId);\n dealsForParty[members.jobCreator].push(dealId);\n }\n return deals[dealId];\n }\n\n /**\n * Agreements\n */\n \n function getAgreement(\n string memory dealId\n ) public view returns (SharedStructs.Agreement memory) {\n return agreements[dealId];\n }\n\n function agreeResourceProvider(\n string memory dealId\n ) public onlyController returns (SharedStructs.Agreement memory) {\n require(hasDeal(dealId), \"Deal does not exist\");\n require(agreements[dealId].resourceProviderAgreedAt == 0, \"RP has already agreed\");\n agreements[dealId].resourceProviderAgreedAt = block.timestamp;\n _maybeAgreeDeal(dealId);\n return agreements[dealId];\n }\n\n function agreeJobCreator(\n string memory dealId\n ) public onlyController returns (SharedStructs.Agreement memory) {\n require(hasDeal(dealId), \"Deal does not exist\");\n require(agreements[dealId].jobCreatorAgreedAt == 0, \"JC has already agreed\");\n agreements[dealId].jobCreatorAgreedAt = block.timestamp;\n _maybeAgreeDeal(dealId);\n return agreements[dealId];\n }\n\n /**\n * Post Results\n */\n\n function getResult(\n string memory dealId\n ) public view returns (SharedStructs.Result memory) {\n return results[dealId];\n }\n\n function addResult(\n string memory dealId,\n string memory resultsId,\n string memory dataId,\n uint256 instructionCount\n ) public onlyController returns (SharedStructs.Result memory) {\n require(isState(dealId, SharedStructs.AgreementState.DealAgreed), \"DealAgreed\");\n agreements[dealId].resultsSubmittedAt = block.timestamp;\n _changeAgreementState(dealId, SharedStructs.AgreementState.ResultsSubmitted);\n results[dealId] = SharedStructs.Result(\n dealId,\n resultsId,\n dataId,\n instructionCount\n );\n return results[dealId];\n }\n\n /**\n * Judge Results\n */\n\n function acceptResult(\n string memory dealId\n ) public onlyController {\n require(isState(dealId, SharedStructs.AgreementState.ResultsSubmitted), \"ResultsSubmitted\");\n agreements[dealId].resultsAcceptedAt = block.timestamp;\n _changeAgreementState(dealId, SharedStructs.AgreementState.ResultsAccepted);\n }\n\n function checkResult(\n string memory dealId\n ) public onlyController {\n require(isState(dealId, SharedStructs.AgreementState.ResultsSubmitted), \"ResultsSubmitted\");\n agreements[dealId].resultsCheckedAt = block.timestamp;\n _changeAgreementState(dealId, SharedStructs.AgreementState.ResultsChecked);\n }\n\n /**\n * Mediati:\n */\n\n function mediationAcceptResult(\n string memory dealId\n ) public onlyController {\n require(isState(dealId, SharedStructs.AgreementState.ResultsChecked), \"ResultsChecked\");\n agreements[dealId].mediationAcceptedAt = block.timestamp;\n _changeAgreementState(dealId, SharedStructs.AgreementState.MediationAccepted);\n }\n\n function mediationRejectResult(\n string memory dealId\n ) public onlyController {\n require(isState(dealId, SharedStructs.AgreementState.ResultsChecked), \"ResultsChecked\");\n agreements[dealId].mediationRejectedAt = block.timestamp;\n _changeAgreementState(dealId, SharedStructs.AgreementState.MediationRejected);\n }\n\n /**\n * Timeouts\n */\n\n // called because one party submitted a deal and the other party\n // did not agree in time\n function timeoutAgree(\n string memory dealId\n ) public onlyController {\n require(isState(dealId, SharedStructs.AgreementState.DealNegotiating), \"DealNegotiating\");\n agreements[dealId].timeoutAgreeAt = block.timestamp;\n _changeAgreementState(dealId, SharedStructs.AgreementState.TimeoutAgree);\n }\n\n // called because the JC waited too long for a result to be submitted\n // and wants it's money back\n function timeoutSubmitResult(\n string memory dealId\n ) public onlyController {\n require(isState(dealId, SharedStructs.AgreementState.DealAgreed), \"DealAgreed\");\n agreements[dealId].timeoutSubmitResultsAt = block.timestamp;\n _changeAgreementState(dealId, SharedStructs.AgreementState.TimeoutSubmitResults);\n }\n\n // called because the RP waited too long for a judgement of it's results\n // and wants it's money back\n function timeoutJudgeResult(\n string memory dealId\n ) public onlyController {\n require(isState(dealId, SharedStructs.AgreementState.ResultsSubmitted), \"ResultsSubmitted\");\n agreements[dealId].timeoutJudgeResultsAt = block.timestamp;\n _changeAgreementState(dealId, SharedStructs.AgreementState.TimeoutJudgeResults);\n }\n // called because the RP or JC waited too long for a mediation of it's results\n // and both want their money back\n function timeoutMediateResult(\n string memory dealId\n ) public onlyController {\n require(isState(dealId, SharedStructs.AgreementState.ResultsChecked), \"ResultsChecked\");\n agreements[dealId].timeoutMediateResultsAt = block.timestamp;\n _changeAgreementState(dealId, SharedStructs.AgreementState.TimeoutMediateResults);\n }\n\n /**\n * Costings\n */\n\n function getJobCost(\n string memory dealId\n ) public view returns (uint256) {\n return deals[dealId].pricing.instructionPrice * results[dealId].instructionCount;\n }\n\n function getResultsCollateral(\nstring memory dealId\n ) public view returns (uint256) {\n return deals[dealId].pricing.resultsCollateralMultiple * getJobCost(dealId);\n }\n\n /**\n * Checkers\n */\n\n function hasDeal(\n string memory dealId\n ) public view returns (bool) {\n return bytes(getDeal(dealId).dealId).length > 0;\n }\n\n function isState(\n string memory dealId,\n SharedStructs.AgreementState state\n ) public view returns (bool) {\n // if we don't have a deal, we should check against DealNegotiating\n // as this is the default state - otherwise it's impossible to check\n // for isState('DealNegotiating')\n if(!hasDeal(dealId)) {\n return state == SharedStructs.AgreementState.DealNegotiating;\n }\n return agreements[dealId].state == state;\n }\n\n /**\n * Utils\n */\n\n function _maybeAgreeDeal(\n string memory dealId\n ) private {\n if(agreements[dealId].resourceProviderAgreedAt != 0 && agreements[dealId].jobCreatorAgreedAt != 0) {\n agreements[dealId].dealAgreedAt = block.timestamp;\n _changeAgreementState(dealId, SharedStructs.AgreementState.DealAgreed);\n } else {\n // this is used so we can know if a party can call an agree timeout trigger\n agreements[dealId].dealCreatedAt = block.timestamp;\n }\n }\n\n function _changeAgreementState(\n string memory dealId,\n SharedStructs.AgreementState state\n ) private {\n agreements[dealId].state = state;\n emit DealStateChange(dealId, state);\n }\n}\n" + }, + "contracts/LilypadStorageTestable.sol": { + "content": "// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.6;\n\nimport \"./LilypadStorage.sol\";\n\ncontract LilypadStorageTestable is LilypadStorage {\n function _checkControllerAccess() internal pure override returns (bool) {\n return true;\n }\n}\n" + }, + "contracts/LilypadToken.sol": { + "content": "// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.6;\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"@openzeppelin/contracts/token/ERC20/extensions/ERC20Pausable.sol\";\nimport \"./ControllerOwnable.sol\";\n\n/*\n standard ERC20 token but with some additional features:\n\n * ControllerOwnable\n * for paying in, we use tx.origin so the actual payee must call the contract\n * for paying out - we use the Controller Ownable feature so only the payments contract\n can pay out from the escrow account\n * escrowBalanceOf\n * get the current escrow balance for an address\n * payEscrow\n * pay into the escrow account\n * refundEscrow\n * get refunded from the escrow account\n * payJob\n * reduce the \"from\" account by X amount\n * actually pay that amount to the \"to\" address\n * slashEscrow\n * reduce the \"slashed\" account by X amount\n\n the escrow functions are designed to be called by the payments contract\n\n * deploy this contract as admin\n * deploy the payments contract as admin and pass this address to it\n * update the ControllerOwnable address of this contract to be the payments contract\n \n now, only the payments contract can call the escrow functions that pay out\n\n */\ncontract LilypadToken is ControllerOwnable, ERC20, ERC20Pausable {\n\n // keep track of the current escrow balance for each address\n mapping(address => uint256) private escrowBalances;\n\n constructor(\n string memory name,\n string memory symbol,\n uint256 initialSupply\n ) ERC20(name, symbol) {\n _mint(msg.sender, initialSupply);\n }\n\n function escrowBalanceOf(\n address _address\n ) public view returns (uint256) {\n return escrowBalances[_address];\n }\n\n // money being paid into the escrow account\n function payEscrow(\n uint256 amount\n ) public returns (bool) {\n // it's important we use tx.origin and not msg.sender here\n // msg.sender will be the payments contract\n // tx.origin will be the user who called the controller -> payments -> token\n // i.e. the account that is actually paying into the escrow address\n _transfer(tx.origin, address(this), amount);\n escrowBalances[tx.origin] += amount;\n return true;\n }\n\n // money being paid back from the escrow account\n function refundEscrow(\n address toAddress,\n uint256 amount\n ) public onlyController returns (bool) {\n require(toAddress != address(0), \"LilypadToken: toAddress cannot be zero address\");\n require(escrowBalances[toAddress] >= amount, \"LilypadToken: not enough funds in escrow\");\n escrowBalances[toAddress] -= amount;\n _transfer(address(this), toAddress, amount);\n return true;\n }\n\n // pay the RP account from the JC escrow account\n function payJob(\n address fromAddress,\n address toAddress,\n uint256 amount\n ) public onlyController returns (bool) {\n require(escrowBalances[fromAddress] >= amount, \"LilypadToken: not enough funds in escrow\");\n escrowBalances[fromAddress] -= amount;\n _transfer(address(this), toAddress, amount);\n return true;\n }\n\n // the given party has been slashed so the money stays in the contract\n // TODO: what should happen to slashed funds?\n // at the moment we move them to the owner address so they are not locked\n function slashEscrow(\n address slashedAddress,\n uint256 amount\n ) public onlyController returns (bool) {\n require(escrowBalances[slashedAddress] >= amount, \"LilypadToken: not enough funds in escrow\");\n escrowBalances[slashedAddress] -= amount;\n _transfer(address(this), owner(), amount);\n return true;\n }\n\n function pause() public onlyOwner {\n _pause();\n }\n\n function unpause() public onlyOwner {\n _unpause();\n }\n\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal override(ERC20, ERC20Pausable) {\n super._beforeTokenTransfer(from, to, amount);\n }\n}\n" + }, + "contracts/LilypadTokenTestable.sol": { + "content": "// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.6;\n\nimport \"./LilypadToken.sol\";\n\n// a version of LilypadToken that can be called by any address\n// so we can run unit tests\ncontract LilypadTokenTestable is LilypadToken {\n constructor(\n string memory name,\n string memory symbol,\n uint256 initialSupply\n ) LilypadToken(name, symbol, initialSupply) {}\n\n function _checkControllerAccess() internal pure override returns (bool) {\n return true;\n }\n}\n" + }, + "contracts/LilypadUsers.sol": { + "content": "// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.6;\n\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"./SharedStructs.sol\";\nimport \"./ControllerOwnable.sol\";\n\ncontract LilypadUsers is Ownable, Initializable {\n\n // a map of user address -> user\n mapping(address => SharedStructs.User) private users;\n\n // a map of user type => user address[]\n mapping(SharedStructs.ServiceType => address[]) private usersByType;\n\n /**\n * Init\n */\n\n // https://docs.openzeppelin.com/upgrades-plugins/1.x/writing-upgradeable\n function initialize() public initializer {\n \n }\n\n /**\n * Users\n */\n\n function getUser(\n address userAddress\n ) public view returns (SharedStructs.User memory) {\n return users[userAddress];\n }\n\n function updateUser(\n string memory metadataCID,\n string memory url,\n SharedStructs.ServiceType[] memory roles\n ) public returns (SharedStructs.User memory) {\n SharedStructs.User memory newUser = SharedStructs.User(\n tx.origin,\n metadataCID,\n url,\n roles\n );\n users[tx.origin] = newUser;\n return newUser;\n }\n\n function addUserToList(\n SharedStructs.ServiceType serviceType\n ) public {\n require(users[tx.origin].userAddress != address(0), \"User must exist\");\n (, bool found) = _getUserListIndex(serviceType, tx.origin);\n require(!found, \"User is already part of that list\");\n require(_doesUserHaveRole(serviceType, tx.origin), \"User must have that role\");\n usersByType[serviceType].push(tx.origin);\n }\n\n function removeUserFromList(\n SharedStructs.ServiceType serviceType\n ) public {\n require(users[tx.origin].userAddress != address(0), \"User must exist\");\n (uint256 index, bool found) = _getUserListIndex(serviceType, tx.origin);\n require(found, \"User is not part of that list\");\n for (uint256 i = index; i < usersByType[serviceType].length - 1; i++) {\n usersByType[serviceType][i] = usersByType[serviceType][i + 1];\n }\n usersByType[serviceType].pop();\n }\n\n function showUsersInList(\n SharedStructs.ServiceType serviceType\n ) public view returns (address[] memory) {\n return usersByType[serviceType];\n }\n\n // returns the index of the user found in the service list\n // it returns 0 and false if the user is not found\n function _getUserListIndex(\n SharedStructs.ServiceType serviceType,\n address userAddress\n ) private view returns (uint256, bool) {\n uint256 ret = 0;\n bool found = false;\n for (uint256 i = 0; i < usersByType[serviceType].length; i++) {\n if (usersByType[serviceType][i] == userAddress) {\n ret = i;\n found = true;\n break;\n }\n }\n return (ret, found);\n }\n\n function _doesUserHaveRole(\n SharedStructs.ServiceType serviceType,\n address userAddress\n ) private view returns (bool) {\n bool found = false;\n for (uint256 i = 0; i < users[userAddress].roles.length; i++) {\n if (users[userAddress].roles[i] == serviceType) {\n found = true;\n break;\n }\n }\n return found;\n }\n}\n" + }, + "contracts/SharedStructs.sol": { + "content": "// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.6;\n\nlibrary SharedStructs {\n\n enum ServiceType {\n Solver,\n Mediator,\n ResourceProvider,\n JobCreator\n }\n\n enum AgreementState {\n\n // the two parties have not yet both agreed to the deal\n DealNegotiating,\n\n // both parties have agreed\n DealAgreed,\n\n // results have been submitted by the RP\n ResultsSubmitted,\n\n // the JC has accepted the results\n ResultsAccepted,\n\n // the JC has checked the results\n ResultsChecked,\n\n // a mediator has accepted the results\n MediationAccepted,\n\n // a mediator has rejected the results\n MediationRejected,\n\n // this means the counter-party did not agree to the deal in time\n TimeoutAgree,\n\n // this means the RP did not submit results in time\n TimeoutSubmitResults,\n\n // this means the JC did not accept or reject results in time\n TimeoutJudgeResults,\n\n // this means the mediator did not accept or submit judgement in time\n TimeoutMediateResults\n\n }\n\n // we map addresses onto infomation about the user\n struct User {\n address userAddress;\n // the CID of information for this user\n string metadataCID;\n string url;\n ServiceType[] roles;\n }\n\n // the various addresses involved in runnig a deal\n struct DealMembers {\n // the address of the solver service that the RP and JC have agreed to use\n address solver;\n // the addresses of the RP and JC that have agreed to this deal\n address jobCreator;\n address resourceProvider;\n // the list of mediators that the RP and JC have agreed to use\n address[] mediators;\n }\n\n // a timeout represents the agreed amount of time and the penalty\n // that is applied if the timeout is exceeded \n struct DealTimeout {\n uint256 timeout;\n uint256 collateral;\n }\n \n // the various forms of timeout a deal can have\n struct DealTimeouts { \n DealTimeout agree;\n DealTimeout submitResults;\n DealTimeout judgeResults;\n DealTimeout mediateResults;\n }\n\n // configure the cost of a deal\n struct DealPricing {\n // agreed price per instruction\n uint256 instructionPrice;\n\n // the collateral that the JC has put up to pay for the job\n // the final cost of the job will be deducted from this\n uint256 paymentCollateral;\n\n // how much collateral the RP will post to attest it's results are correct\n // this is a multiple of the cost of the job which is known at results\n // submission time\n uint256 resultsCollateralMultiple;\n\n // how much is the JC willing to pay the mediator to resolve disputes\n uint256 mediationFee;\n }\n\n // a Deal forms the information that is agreed between both parties\n // both parties must have called \"agree_deal\" with the exact\n // same parameters before the deal is considered valid\n // a Deal is immutable - nothing about it can be updated\n struct Deal {\n // the CID of the Deal document on IPFS (and directory service)\n // this contains the job spec, the job offer and the resource offer\n string dealId;\n\n // who is participating in this deal\n DealMembers members;\n \n // the timeout settings for a deal\n DealTimeouts timeouts;\n\n // the pricing settings for a deal\n DealPricing pricing; \n }\n\n // what the RP submits back once having run the job\n // this is also immutable\n struct Result {\n // the id of the deal that this result is for\n string dealId;\n\n // the CID of the results on IPFS (and directory service)\n // NOTE - this is not the CID of actual results data rather\n // of the JSON object reporting that data\n string resultsId;\n\n // this is the actual lower level data CID\n string dataId;\n\n // how many instructions were executed by the RP\n uint256 instructionCount;\n }\n\n // an agreement keeps track of the state of a deal and it's fields can be mutated\n struct Agreement {\n // the current state of the agreement\n AgreementState state;\n\n uint256 resourceProviderAgreedAt;\n uint256 jobCreatorAgreedAt;\n uint256 dealCreatedAt;\n uint256 dealAgreedAt;\n\n uint256 resultsSubmittedAt;\n uint256 resultsAcceptedAt;\n uint256 resultsCheckedAt;\n\n uint256 mediationAcceptedAt;\n uint256 mediationRejectedAt;\n\n uint256 timeoutAgreeAt;\n uint256 timeoutSubmitResultsAt;\n uint256 timeoutJudgeResultsAt;\n uint256 timeoutMediateResultsAt;\n }\n\n struct JobOffer {\n uint256 id;\n \n // this is the contract that will be triggered\n // once there are some results\n address calling_contract;\n\n // this is the address that is paying for the job\n // they must have called approve on the token contract\n // and granted the solver address the number of tokens\n // required\n address payee;\n\n // the job spec\n string module;\n string[] inputs;\n }\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": false, + "runs": 200 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file diff --git a/hardhat/hardhat.config.ts b/hardhat/hardhat.config.ts index f6cdc947..89b59701 100644 --- a/hardhat/hardhat.config.ts +++ b/hardhat/hardhat.config.ts @@ -20,7 +20,7 @@ const NETWORK = process.env.NETWORK || "dev"; const NETWORK_URL = process.env.WEB3_HTTP_URL || 'http://localhost:8547'; const CHAIN_ID = Number(process.env.CHAIN_ID) || 412346; const INFURA_KEY = process.env.INFURA_KEY || ""; - +console.log(NETWORK_URL,NETWORK,CHAIN_ID,INFURA_KEY) const config: HardhatUserConfig = { solidity: '0.8.21', defaultNetwork: NETWORK, @@ -46,6 +46,12 @@ const config: HardhatUserConfig = { chainId: 421614, accounts: [getAccount('admin').privateKey], }, + + orbit:{ + url: 'https://rpc.orbit.arsenum.com/', + chainId: 68283778764, + accounts: [getAccount('admin').privateKey], + }, }, etherscan: { apiKey: process.env.ETHERSCAN_API_KEY, diff --git a/hardhat/scripts/run-cowsay-onchain.ts b/hardhat/scripts/run-cowsay-onchain.ts index d54e0116..8d0a8c67 100644 --- a/hardhat/scripts/run-cowsay-onchain.ts +++ b/hardhat/scripts/run-cowsay-onchain.ts @@ -54,7 +54,10 @@ async function main() { let result = '' while(!result) { + // console.log(`Checking job result...`,result) result = await client.getJobResult(jobID) + // console.log(`Checking job result...`,result) + if(!result) { await bluebird.delay(1000) } diff --git a/hardhat/utils/web3.ts b/hardhat/utils/web3.ts index 92f214f0..ec5e27a6 100644 --- a/hardhat/utils/web3.ts +++ b/hardhat/utils/web3.ts @@ -29,7 +29,7 @@ import { */ // how much ether to send to each account -export const DEFAULT_ETHER_PER_ACCOUNT = ethers.parseEther('10') +export const DEFAULT_ETHER_PER_ACCOUNT = ethers.parseEther('.0010') // a billion tokens in total export const DEFAULT_TOKEN_SUPPLY = ethers.parseEther('1000000000') diff --git a/pkg/jobcreator/onchain_jobcreator.go b/pkg/jobcreator/onchain_jobcreator.go index 6b3c49c5..04afb8c5 100644 --- a/pkg/jobcreator/onchain_jobcreator.go +++ b/pkg/jobcreator/onchain_jobcreator.go @@ -112,11 +112,19 @@ func (jobCreator *OnChainJobCreator) Start(ctx context.Context, cm *system.Clean options := jobCreator.options.Offer options.Module.Name = ev.Module + if strings.Contains(options.Module.Name, "github.com") { + parts := strings.Split(options.Module.Name, ":") + options.Module.Name = "" + options.Module.Repo = "https://" + parts[0] + options.Module.Hash = parts[1] + options.Module.Path = "/lilypad_module.json.tmpl" + } + inputs := map[string]string{} for _, input := range ev.Inputs { parts := strings.Split(input, "=") - if len(parts) == 2 { - inputs[parts[0]] = parts[1] + if len(parts) > 1 { + inputs[parts[0]] = strings.Join(parts[1:], "=") } } options.Inputs = inputs diff --git a/stack b/stack index 0515e499..774b9d89 100755 --- a/stack +++ b/stack @@ -51,7 +51,7 @@ function load-local-env() { if [[ -n "$line" && ! "$line" =~ ^[[:space:]]*# ]]; then export $line fi - done < .local.dev + done < .local.orbit } ############################################################################ @@ -98,16 +98,16 @@ function chain-boot() { echo "- Install local dependencies" cd hardhat && npm install -y echo "- Fund services with ether" - npx hardhat run scripts/fund-services-ether.ts --network dev + npx hardhat run scripts/fund-services-ether.ts --network orbit echo "- Compile contracts" - npx hardhat compile --network dev + npx hardhat compile --network orbit cd .. go-bindings echo "- Deploy contracts" cd hardhat - npx hardhat deploy --network dev + npx hardhat deploy --network orbit echo "- Fund services with tokens" - npx hardhat run scripts/fund-services-tokens.ts --network dev + npx hardhat run scripts/fund-services-tokens.ts --network orbit cd .. echo "- Done" } @@ -204,6 +204,10 @@ function print-local-dev-env() { function run-cowsay-onchain() { load-local-env cd hardhat + # WEB3_HTTP_URL=https://rpc.orbit.arsenum.com \ + # CHAIN_ID=68283778764 \ + NETWORK=orbit \ + API_HOST=\ npx hardhat run scripts/run-cowsay-onchain.ts } @@ -370,5 +374,82 @@ function run() { export LOG_LEVEL=info go run . run --network dev "$@" } - +function cow() { + # load-local-env + # export WEB3_PRIVATE_KEY=${RUN_PRIVATE_KEY} + # export LOG_LEVEL=info + # MODULE_PATH="github.com/Lilypad-Tech/lilypad-module-cowsay:v0.0.4" \ + # WEB3_PRIVATE_KEY=${RUN_PRIVATE_KEY} \ + DISABLE_TELEMETRY=true \ + WEB3_PRIVATE_KEY=b3994e7660abe5f65f729bb64163c6cd6b7d0b1a8c67881a7346e3e8c7f026f5 \ + WEB3_CHAIN_ID=68283778764 \ + WEB3_CONTROLLER_ADDRESS=0xa85233C63b9Ee964Add6F2cffe00Fd84eb32338f \ + WEB3_PAYMENTS_ADDRESS=0x2279B7A0a67DB372996a5FaB50D91eAA73d2eBe6 \ + WEB3_STORAGE_ADDRESS=0xB7f8BC63BbcaD18155201308C8f3540b07f84F5e \ + WEB3_USERS_ADDRESS=0x0DCd1Bf9A1b36cE34237eEaFef220932846BCD82 \ + WEB3_TOKEN_ADDRESS=0xa513E6E4b8f2a923D98304ec87F64353C4D5C853 \ + WEB3_MEDIATION_ADDRESS=0x0B306BF915C4d645ff596e518fAf3F9669b97016 \ + WEB3_JOBCREATOR_ADDRESS=0x9A9f2CCfdE556A7E9Ff0848998Aa4a0CFD8863AE \ + POW_ADDRESS=0x4ed7c70F96B99c776995fB64377f0d4aB3B0e1C1 \ + WEB3_RPC_URL=wss://wss.orbit.arsenum.com \ + SERVICE_SOLVER=0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC \ + API_HOST=\ + go run . run cowsay:v0.0.4 "$@" + # go run . run github.com/Lilypad-Tech/lilypad-module-cowsay:main "$@" +} +function rp() { + # load-local-env + # export WEB3_PRIVATE_KEY=${RUN_PRIVATE_KEY} + # export LOG_LEVEL=info + # MODULE_PATH="github.com/Lilypad-Tech/lilypad-module-cowsay:v0.0.4" \ + # WEB3_PRIVATE_KEY=${RUN_PRIVATE_KEY} \ + DISABLE_TELEMETRY=true \ + WEB3_PRIVATE_KEY=0x47e179ec197488593b187f80a00eb0da91f1b9d0b13f8733639f19c30a34926a \ + WEB3_CHAIN_ID=68283778764 \ + WEB3_CONTROLLER_ADDRESS=0xa85233C63b9Ee964Add6F2cffe00Fd84eb32338f \ + WEB3_PAYMENTS_ADDRESS=0x2279B7A0a67DB372996a5FaB50D91eAA73d2eBe6 \ + WEB3_STORAGE_ADDRESS=0xB7f8BC63BbcaD18155201308C8f3540b07f84F5e \ + WEB3_USERS_ADDRESS=0x0DCd1Bf9A1b36cE34237eEaFef220932846BCD82 \ + WEB3_TOKEN_ADDRESS=0xa513E6E4b8f2a923D98304ec87F64353C4D5C853 \ + WEB3_MEDIATION_ADDRESS=0x0B306BF915C4d645ff596e518fAf3F9669b97016 \ + WEB3_JOBCREATOR_ADDRESS=0x9A9f2CCfdE556A7E9Ff0848998Aa4a0CFD8863AE \ + POW_ADDRESS=0x4ed7c70F96B99c776995fB64377f0d4aB3B0e1C1 \ + WEB3_RPC_URL=wss://wss.orbit.arsenum.com \ + SERVICE_SOLVER=0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC \ + API_HOST=\ + OFFER_GPU=1 \ + go run . resource-provider "$@" + # go run . run github.com/Lilypad-Tech/lilypad-module-cowsay:main "$@" +} +function jc_orbit() { + # load-local-env + # export WEB3_PRIVATE_KEY=${RUN_PRIVATE_KEY} + # export LOG_LEVEL=info + # MODULE_PATH="github.com/Lilypad-Tech/lilypad-module-cowsay:v0.0.4" \ + # WEB3_PRIVATE_KEY=${RUN_PRIVATE_KEY} \ + DISABLE_TELEMETRY=true \ + WEB3_PRIVATE_KEY=0x5de4111afa1a4b94908f83103eb1f1706367c2e68ca870fc3fb9a804cdab365a \ + WEB3_CHAIN_ID=68283778764 \ + WEB3_CONTROLLER_ADDRESS=0xa85233C63b9Ee964Add6F2cffe00Fd84eb32338f \ + WEB3_PAYMENTS_ADDRESS=0x2279B7A0a67DB372996a5FaB50D91eAA73d2eBe6 \ + WEB3_STORAGE_ADDRESS=0xB7f8BC63BbcaD18155201308C8f3540b07f84F5e \ + WEB3_USERS_ADDRESS=0x0DCd1Bf9A1b36cE34237eEaFef220932846BCD82 \ + WEB3_TOKEN_ADDRESS=0xa513E6E4b8f2a923D98304ec87F64353C4D5C853 \ + WEB3_MEDIATION_ADDRESS=0x0B306BF915C4d645ff596e518fAf3F9669b97016 \ + WEB3_JOBCREATOR_ADDRESS=0x9A9f2CCfdE556A7E9Ff0848998Aa4a0CFD8863AE \ + POW_ADDRESS=0x4ed7c70F96B99c776995fB64377f0d4aB3B0e1C1 \ + WEB3_RPC_URL=wss://wss.orbit.arsenum.com \ + SERVICE_SOLVER=0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC \ + API_HOST=\ + go run . jobcreator "$@" + # go run . run github.com/Lilypad-Tech/lilypad-module-cowsay:main "$@" +} eval "$@" + # WEB3_CHAIN_ID=95873066572\ + # WEB3_CONTROLLER_ADDRESS=0xdF2bc8d64A869eF4605BA821cE7183A702D5Bf72\ + # WEB3_PAYMENTS_ADDRESS=0xE7FdFfD56797a6E6024a09bd168effCa6C5208cE\ + # WEB3_POW_ADDRESS=0x7cFA21dB253afBcD9AaCf2dE58FC3C0e9D1a9149\ + # WEB3_STORAGE_ADDRESS=0xDf9EAf5f1020d75c502DC66FFCC43a634E10017b\ + # WEB3_TOKEN_ADDRESS=0x2B0722b2C623b19aDA2ec56D50487203a7475C38\ + # WEB3_USERS_ADDRESS=0x3f4048eBDB5C853EDBe30843f8e8e6CC9aFfAbFe\ + # SERVICE_SOLVER=0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC\ \ No newline at end of file