Skip to content

Commit

Permalink
Owned Proxy - update to support forc deploy proxy feature (#17)
Browse files Browse the repository at this point in the history
* Use current nightly forc

* chore: update contract to forc 0.63.1

* chore: update scripts

* chore: updated tests and removed copied test

* docs: updated badges and replace version message with badge

* chore: changelog

* chore: update CI rust ver

* feat: update to latest deps, pin owner slot

* docs: updated forc version

* chore: updated forc ver in tests

* Resolve failed to run custom build command for fuel-core-upgradable-executor v0.33.0 error

* Use master branch of Sway-Libs

* Update to Sway-Libs v0.24.0

* Udpate Forc.lock

* chore: updated script dependencies

* chore: updated test dependencies

* chore: fix clippy lint

* chore: fix spelling

* chore: use default node and chain config

* chore: use latest nightly chain

* fix ci

* chore: update CI rust version

* chore: updated owned proxy forc version

* chore: updated owned_proxy scripts fuel-rs version

* chore: updated test harness forc and fuels-rs versions

---------

Co-authored-by: Sophie <[email protected]>
Co-authored-by: bitzoic <[email protected]>
  • Loading branch information
3 people authored Sep 9, 2024
1 parent 6c41355 commit 9b10f24
Show file tree
Hide file tree
Showing 27 changed files with 434 additions and 478 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ concurrency:
env:
CARGO_TERM_COLOR: always
REGISTRY: ghcr.io
RUST_VERSION: 1.79.0
RUST_VERSION: 1.81.0

jobs:
build-projects:
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Description of the upcoming release here.
- [#1](https://github.com/FuelLabs/sway-standard-implementations/pull/1) Adds an implementation of SRC-14: Owned Proxy.
- [#8](https://github.com/FuelLabs/sway-standard-implementations/pull/8) Adds SRC-14 owned proxy usage scripts and docs.
- [#10](https://github.com/FuelLabs/sway-standard-implementations/pull/10) Sets owned_proxy sway-libs dependency to version v0.23.0.
- [#17](https://github.com/FuelLabs/sway-standard-implementations/pull/17) Update Owned Proxy to support `forc`'s deploy proxy feature.

### Changed

Expand Down
7 changes: 2 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<a href="https://github.com/FuelLabs/sway-standard-implementations/actions/workflows/ci.yml" alt="CI">
<img src="https://github.com/FuelLabs/sway-standard-implementations/actions/workflows/ci.yml/badge.svg" />
</a>
<a href="./LICENSE" alt="forc">
<img src="https://img.shields.io/github/license/FuelLabs/sway-libs" />
<a href="./LICENSE" alt="License">
<img src="https://img.shields.io/github/license/FuelLabs/sway-standard-implementations" />
</a>
<a href="https://discord.gg/xfpK4Pe">
<img src="https://img.shields.io/discord/732892373507375164?color=6A7EC2&logo=discord&logoColor=ffffff&labelColor=6A7EC2&label=Discord" />
Expand Down Expand Up @@ -34,6 +34,3 @@ cd tests && forc test --release --locked && cargo test

> **NOTE:**
> This may take a while depending on your hardware, future improvements to Sway will decrease build times. After this has been run once, individual test projects may be built on their own to save time.
> **NOTE:**
> All projects currently use `forc v0.60.0`, `fuels-rs v0.63.0` and `fuel-core v0.27.0`. Versions are locked via `fuel-toolchain.toml` files.
6 changes: 6 additions & 0 deletions src14/owned_proxy/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# SRC-14: Owned Proxy Contract

<p align="center">
<a href="https://crates.io/crates/forc/0.63.5" alt="forc">
<img src="https://img.shields.io/badge/forc-v0.63.5-orange" />
</a>
</p>

- The [Owned Proxy Contract](./contract/src/main.sw) is an opinionated implementation of the [extended SRC-14 standard](https://docs.fuel.network/docs/sway-standards/src-14-simple-upgradeable-proxies/). It utilises the [Upgradability library from sway-libs](https://github.com/FuelLabs/sway-libs) and includes initialization functionality that allows for secure ownership upon deployment.

## Usage instructions
Expand Down
17 changes: 6 additions & 11 deletions src14/owned_proxy/contract/Forc.lock
Original file line number Diff line number Diff line change
@@ -1,35 +1,30 @@
[[package]]
name = "core"
source = "path+from-root-E19CE48B3E858B72"
source = "path+from-root-4BB20845430AF9CF"

[[package]]
name = "src14_owned_proxy"
source = "member"
dependencies = [
"standards git+https://github.com/FuelLabs/sway-standards?tag=v0.5.1#e2d5ac40a1d11a9e38e0a662d35141076515319f",
"standards",
"std",
"sway_libs",
]

[[package]]
name = "standards"
source = "git+https://github.com/FuelLabs/sway-standards?tag=v0.5.0#348f7175df4c012b23c86cdb18aab79025ca1f18"
dependencies = ["std"]

[[package]]
name = "standards"
source = "git+https://github.com/FuelLabs/sway-standards?tag=v0.5.1#e2d5ac40a1d11a9e38e0a662d35141076515319f"
source = "git+https://github.com/FuelLabs/sway-standards?tag=v0.6.0#65e09f95ea8b9476b171a66c8a47108f352fa32c"
dependencies = ["std"]

[[package]]
name = "std"
source = "git+https://github.com/fuellabs/sway?tag=v0.60.0#2f0392ee35a1e4dd80bd8034962d5b4083dfb8b6"
source = "git+https://github.com/fuellabs/sway?tag=v0.63.5#31a1d6f98395f571cd3674b492d9bf4773c55f65"
dependencies = ["core"]

[[package]]
name = "sway_libs"
source = "git+https://github.com/FuelLabs/sway-libs?tag=v0.23.0#9987d8ae11b1d82d42524794829c216b607916c5"
source = "git+https://github.com/FuelLabs/sway-libs?tag=v0.24.0#e19f96f85ae12426d20adc176b70aa38fd9a2a5b"
dependencies = [
"standards git+https://github.com/FuelLabs/sway-standards?tag=v0.5.0#348f7175df4c012b23c86cdb18aab79025ca1f18",
"standards",
"std",
]
4 changes: 2 additions & 2 deletions src14/owned_proxy/contract/Forc.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ license = "Apache-2.0"
name = "src14_owned_proxy"

[dependencies]
standards = { git = "https://github.com/FuelLabs/sway-standards", tag = "v0.5.1" }
sway_libs = { git = "https://github.com/FuelLabs/sway-libs", tag = "v0.23.0" }
standards = { git = "https://github.com/FuelLabs/sway-standards", tag = "v0.6.0" }
sway_libs = { git = "https://github.com/FuelLabs/sway-libs", tag = "v0.24.0" }
6 changes: 3 additions & 3 deletions src14/owned_proxy/contract/fuel-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[toolchain]
channel = "testnet"
channel = "testnet-2024-09-06"

[components]
fuel-core = "0.27.0"
forc = "0.60.0"
forc = "0.63.5"
fuel-core = "0.35.0"
Loading

0 comments on commit 9b10f24

Please sign in to comment.