Skip to content

Commit

Permalink
algo: contracts
Browse files Browse the repository at this point in the history
  • Loading branch information
evan-gray committed Apr 30, 2022
1 parent d4a4f8a commit cc72c2a
Show file tree
Hide file tree
Showing 135 changed files with 16,528 additions and 17,512 deletions.
1 change: 1 addition & 0 deletions Dockerfile.const
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,4 @@ FROM scratch AS const-export
COPY --from=const-build /scripts/.env.0x ethereum/.env
COPY --from=const-build /scripts/.env.hex solana/.env
COPY --from=const-build /scripts/.env.hex terra/tools/.env
COPY --from=const-build /scripts/.env.hex algorand/.env
27 changes: 0 additions & 27 deletions Dockerfile.teal

This file was deleted.

67 changes: 35 additions & 32 deletions Tiltfile
Original file line number Diff line number Diff line change
Expand Up @@ -113,17 +113,6 @@ local_resource(
trigger_mode = trigger_mode,
)

if algorand:
local_resource(
name = "teal-gen",
deps = ["staging/algorand/teal"],
cmd = "tilt docker build -- --target teal-export -f Dockerfile.teal -o type=local,dest=. .",
env = {"DOCKER_BUILDKIT": "1"},
labels = ["algorand"],
allow_parallel = True,
trigger_mode = trigger_mode,
)

# wasm

if solana:
Expand Down Expand Up @@ -443,27 +432,6 @@ if ci_tests:
trigger_mode = trigger_mode,
)

# algorand
if algorand:
k8s_yaml_with_ns("devnet/algorand.yaml")

docker_build(
ref = "algorand",
context = "third_party/algorand",
dockerfile = "third_party/algorand/Dockerfile",
)

k8s_resource(
"algorand",
resource_deps = ["teal-gen"],
port_forwards = [
port_forward(4001, name = "Algorand RPC [:4001]", host = webHost),
port_forward(4002, name = "Algorand KMD [:4002]", host = webHost),
],
labels = ["algorand"],
trigger_mode = trigger_mode,
)

# e2e
if e2e:
k8s_yaml_with_ns("devnet/e2e.yaml")
Expand Down Expand Up @@ -581,3 +549,38 @@ k8s_resource(
labels = ["terra"],
trigger_mode = trigger_mode,
)

if algorand:
k8s_yaml_with_ns("devnet/algorand-devnet.yaml")

docker_build(
ref = "algorand-algod",
context = "algorand/sandbox-algorand",
dockerfile = "algorand/sandbox-algorand/images/algod/Dockerfile"
)

docker_build(
ref = "algorand-indexer",
context = "algorand/sandbox-algorand",
dockerfile = "algorand/sandbox-algorand/images/indexer/Dockerfile"
)

docker_build(
ref = "algorand-contracts",
context = "algorand",
dockerfile = "algorand/Dockerfile",
ignore = ["algorand/test/*.*"]
)

k8s_resource(
"algorand",
port_forwards = [
port_forward(4001, name = "Algod [:4001]", host = webHost),
port_forward(4002, name = "KMD [:4002]", host = webHost),
port_forward(8980, name = "Indexer [:8980]", host = webHost),
],
resource_deps = ["const-gen"],
labels = ["algorand"],
trigger_mode = trigger_mode,
)

3 changes: 3 additions & 0 deletions algorand/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
__pycache__
_sandbox
genesis.json
23 changes: 23 additions & 0 deletions algorand/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# syntax=docker.io/docker/dockerfile:1.3@sha256:42399d4635eddd7a9b8a24be879d2f9a930d0ed040a61324cfdf59ef1357b3b2
FROM docker.io/python:3.10

# Support additional root CAs
COPY README.md cert.pem* /certs/
# Debian
RUN if [ -e /certs/cert.pem ]; then cp /certs/cert.pem /etc/ssl/certs/ca-certificates.crt; fi

RUN python3 -m pip install virtualenv

RUN apt-get update
RUN apt-get -y install netcat

COPY Pipfile.lock Pipfile.lock
COPY Pipfile Pipfile

RUN python3 -m pip install pipenv
RUN pipenv install
RUN mkdir teal

COPY *.py .
COPY deploy.sh deploy.sh
COPY .env .env
381 changes: 381 additions & 0 deletions algorand/MEMORY.md

Large diffs are not rendered by default.

Loading

0 comments on commit cc72c2a

Please sign in to comment.