Skip to content

Commit

Permalink
update build process
Browse files Browse the repository at this point in the history
  • Loading branch information
augustbleeds committed Aug 27, 2024
1 parent 9df857a commit 65c9afd
Show file tree
Hide file tree
Showing 9 changed files with 111 additions and 26 deletions.
4 changes: 2 additions & 2 deletions .github/actions/install-cairo/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ description: A composite action that installs cairo and scarb binaries
inputs:
cairo_version:
description: Cairo release version
default: "v2.6.4"
default: "v2.7.1"
required: false
scarb_version:
description: Scarb release version
default: "v2.6.5"
default: "v2.7.1"
required: false

runs:
Expand Down
84 changes: 82 additions & 2 deletions examples/contracts/aggregator_consumer/Scarb.lock
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,88 @@ dependencies = [

[[package]]
name = "openzeppelin"
version = "0.10.0"
source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?tag=v0.10.0#d77082732daab2690ba50742ea41080eb23299d3"
version = "0.15.1"
source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?tag=v0.15.1#2f8a93d762858714095a1d391afffa9e21df6983"
dependencies = [
"openzeppelin_access",
"openzeppelin_account",
"openzeppelin_governance",
"openzeppelin_introspection",
"openzeppelin_presets",
"openzeppelin_security",
"openzeppelin_token",
"openzeppelin_upgrades",
"openzeppelin_utils",
]

[[package]]
name = "openzeppelin_access"
version = "0.15.1"
source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?tag=v0.15.1#2f8a93d762858714095a1d391afffa9e21df6983"
dependencies = [
"openzeppelin_introspection",
"openzeppelin_utils",
]

[[package]]
name = "openzeppelin_account"
version = "0.15.1"
source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?tag=v0.15.1#2f8a93d762858714095a1d391afffa9e21df6983"
dependencies = [
"openzeppelin_introspection",
"openzeppelin_utils",
]

[[package]]
name = "openzeppelin_governance"
version = "0.15.1"
source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?tag=v0.15.1#2f8a93d762858714095a1d391afffa9e21df6983"
dependencies = [
"openzeppelin_access",
"openzeppelin_introspection",
]

[[package]]
name = "openzeppelin_introspection"
version = "0.15.1"
source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?tag=v0.15.1#2f8a93d762858714095a1d391afffa9e21df6983"

[[package]]
name = "openzeppelin_presets"
version = "0.15.1"
source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?tag=v0.15.1#2f8a93d762858714095a1d391afffa9e21df6983"
dependencies = [
"openzeppelin_access",
"openzeppelin_account",
"openzeppelin_introspection",
"openzeppelin_token",
"openzeppelin_upgrades",
]

[[package]]
name = "openzeppelin_security"
version = "0.15.1"
source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?tag=v0.15.1#2f8a93d762858714095a1d391afffa9e21df6983"

[[package]]
name = "openzeppelin_token"
version = "0.15.1"
source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?tag=v0.15.1#2f8a93d762858714095a1d391afffa9e21df6983"
dependencies = [
"openzeppelin_account",
"openzeppelin_governance",
"openzeppelin_introspection",
]

[[package]]
name = "openzeppelin_upgrades"
version = "0.15.1"
source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?tag=v0.15.1#2f8a93d762858714095a1d391afffa9e21df6983"

[[package]]
name = "openzeppelin_utils"
version = "0.15.1"
source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?tag=v0.15.1#2f8a93d762858714095a1d391afffa9e21df6983"

[[package]]
name = "snforge_std"
Expand Down
4 changes: 2 additions & 2 deletions examples/contracts/aggregator_consumer/Scarb.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
[package]
name = "aggregator_consumer"
version = "0.1.0"
cairo-version = "2.6.3"
cairo-version = "2.7.1"

# See more keys and their definitions at https://docs.swmansion.com/scarb/docs/reference/manifest.html

[dependencies]
snforge_std = { git = "https://github.com/foundry-rs/starknet-foundry.git", tag = "v0.21.0" }
chainlink = { path = "../../../contracts" }
starknet = ">=2.6.3"
starknet = ">=2.7.1"

[lib]

Expand Down
7 changes: 3 additions & 4 deletions examples/contracts/aggregator_consumer/scripts/Scarb.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
[package]
name = "src"
version = "0.1.0"
cairo-version = "2.6.3"
cairo-version = "2.7.1"

# See more keys and their definitions at https://docs.swmansion.com/scarb/docs/reference/manifest.html

[dependencies]
sncast_std = { git = "https://github.com/foundry-rs/starknet-foundry.git", tag = "v0.21.0" }
chainlink = { path = "../../../../contracts" }
aggregator_consumer = { path = "../" }
starknet = ">=2.6.3"
starknet = ">=2.7.1"

[lib]
casm = true
Expand All @@ -19,6 +19,5 @@ casm = true
build-external-contracts = [
"chainlink::emergency::sequencer_uptime_feed::SequencerUptimeFeed",
"chainlink::ocr2::mocks::mock_aggregator::MockAggregator",
"aggregator_consumer::ocr2::consumer::AggregatorConsumer"
"aggregator_consumer::ocr2::consumer::AggregatorConsumer",
]

26 changes: 16 additions & 10 deletions integration-tests/testconfig/default.toml
Original file line number Diff line number Diff line change
@@ -1,32 +1,38 @@
# This is the default configuration so OCR2 tests can run without issues
[ChainlinkImage]
image="public.ecr.aws/chainlink/chainlink"
version="2.9.0"
image = "public.ecr.aws/chainlink/chainlink"
version = "2.9.0"

[Logging]
test_log_collect=false
test_log_collect = false

[Logging.LogStream]
log_targets=["file"]
log_producer_timeout="10s"
log_producer_retry_limit=10
log_targets = ["file"]
log_producer_timeout = "10s"
log_producer_retry_limit = 10

[Network]
selected_networks=["SIMULATED"] # Not needed for Starknet but mandatory from CTF (do not change)
selected_networks = [
"SIMULATED",
] # Not needed for Starknet but mandatory from CTF (do not change)

[Network.RpcHttpUrls]
simulated = ["http://127.0.0.1"] # Not needed for Starknet but mandatory from CTF (do not change)
simulated = [
"http://127.0.0.1",
] # Not needed for Starknet but mandatory from CTF (do not change)

[Network.RpcWsUrls]
simulated = ["wss://127.0.0.1"] # Not needed for Starknet but mandatory from CTF (do not change)
simulated = [
"wss://127.0.0.1",
] # Not needed for Starknet but mandatory from CTF (do not change)

[Common]
internal_docker_repo = "public.ecr.aws/chainlink"
inside_k8 = false
network = "localnet"
user = "satoshi"
stateful_db = false
devnet_image = "shardlabs/starknet-devnet-rs:a147b4cd72f9ce9d1fa665d871231370db0f51c7"
devnet_image = "shardlabs/starknet-devnet-rs:438da575b2a514c44d8a70ca6169f9dd7e585b2c"
postgres_version = "15.7"

[OCR2]
Expand Down
2 changes: 1 addition & 1 deletion ops/charts/devnet/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ spec:
{{- if eq .Values.real_node true }}
image: "{{ .Values.repository | default "eqlabs/pathfinder"}}:{{ .Values.tag | default "v0.1.8-alpha"}}"
{{- else }}
image: "{{ .Values.repository | default "shardlabs/starknet-devnet-rs"}}:{{ .Values.tag | default "a147b4cd72f9ce9d1fa665d871231370db0f51c7"}}"
image: "{{ .Values.repository | default "shardlabs/starknet-devnet-rs"}}:{{ .Values.tag | default "438da575b2a514c44d8a70ca6169f9dd7e585b2c"}}"
args: ["--port", {{ .Values.service.internalPort | quote}}, "--seed", {{ .Values.seed | quote}}, "--account-class", "cairo1", "--gas-price", "1", "--data-gas-price", "1"]
{{- end }}
imagePullPolicy: IfNotPresent
Expand Down
2 changes: 1 addition & 1 deletion ops/devnet/environment.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func defaultProps() map[string]any {
"starknet-dev": map[string]any{
"image": map[string]any{
"image": "shardlabs/starknet-devnet-rs",
"version": "a147b4cd72f9ce9d1fa665d871231370db0f51c7",
"version": "438da575b2a514c44d8a70ca6169f9dd7e585b2c",
},
"resources": map[string]any{
"requests": map[string]any{
Expand Down
4 changes: 2 additions & 2 deletions ops/scripts/devnet-hardhat.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ bash "$(dirname -- "$0")/devnet-hardhat-down.sh"
echo "Checking CPU structure..."
if [[ $cpu_struct == *"arm"* ]]; then
echo "Starting arm devnet container..."
container_version="${CONTAINER_VERSION:-a147b4cd72f9ce9d1fa665d871231370db0f51c7}-arm"
container_version="${CONTAINER_VERSION:-438da575b2a514c44d8a70ca6169f9dd7e585b2c}-arm"
else
echo "Starting i386 devnet container..."
container_version="${CONTAINER_VERSION:-a147b4cd72f9ce9d1fa665d871231370db0f51c7}"
container_version="${CONTAINER_VERSION:-438da575b2a514c44d8a70ca6169f9dd7e585b2c}"
fi

echo "Starting starknet-devnet"
Expand Down
4 changes: 2 additions & 2 deletions scripts/devnet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ echo "Checking CPU structure..."
if [[ $cpu_struct == *"arm"* ]]
then
echo "Starting arm devnet container..."
container_version="a147b4cd72f9ce9d1fa665d871231370db0f51c7-arm"
container_version="438da575b2a514c44d8a70ca6169f9dd7e585b2c-arm"
else
echo "Starting i386 devnet container..."
container_version="a147b4cd72f9ce9d1fa665d871231370db0f51c7"
container_version="438da575b2a514c44d8a70ca6169f9dd7e585b2c"
fi

echo "Starting starknet-devnet"
Expand Down

0 comments on commit 65c9afd

Please sign in to comment.