Skip to content

Commit

Permalink
feat: adding support for proxy contracts in fuels deploy (#3190)
Browse files Browse the repository at this point in the history
* Adjusting deprecated method

* Adding new fixture for upgradable contract

* Adjusting type defs for toml file

* Adding new helper to find closes toml file

* Passing toml file contents to `deployContract` method

* Temporarily re-ordering exported members

* feat: deploy contract flow with proxy deploy

* Adding new forc utility

* Saving deployed proxy contract id to toml file

* feat: refactor proxiedContract -> targetContract

* feat: pass correct deploy config to proxy deploy

* feat: remove toml caching

* chore: remove redundant var

* fix: return the right address from a proxy deploy

* test: seperate proxy test

* Enabling PR auto-publish

* Fixing broken tests

* Removing orphaned conditional

* Lintfix

* Adjusting node options

* Adjusting hooks

* Adding TODO

* Adding chageset

* Adjusting changeset

* Building proxy contract on the fly

* Removing obsolete files

* Unifying gitignore

* Adding simple README with refs to Proxy contract

* Updating README

* Adding new generated dir path to eslintignore

* Fixing eslintignore path

* DRY

* Formatting comments and TODO

* Ignoring new path in prettierignore

* Lintfix

* Adjust `deployConfig`

* DRY

* Nits

* Start accepting `privateKey` to use in config file

* Using predictable wallet in tests

* Adjusting hooks and un-skipping test

* Removing TODO

* Improving test, adding more comments

* Adding TODOs

* Tyop

* Tyop

* avoid re-using target storageSlots when deploying proxy contract

* add storage to upgradable contract

* Remove redundant code; renaming variables

* Resetting change; rolling back original approach

* Moving things around; reducing nesting levels; improving comments

* Renaming variable

* Re-ordering definitions

* Adding new large contract for test with proxies

* Adding new test case

* Adding basic docs around Proxy Contracts

* Fix broken tests

* Tyop

* Disabling PR auto-release

* Updating changeset

* Sorting words list

* Adding more custom words

* One more custom word

* Update apps/docs/src/guide/contracts/proxy-contracts.md

Co-authored-by: Sérgio Torres <[email protected]>

* Update packages/fuels/src/cli/commands/deploy/proxy/contract/fuel-toolchain.toml

Co-authored-by: Peter Smith <[email protected]>

* Update packages/fuels/test/fixtures/workspace/contracts/upgradable-chunked/Forc.toml

Co-authored-by: Peter Smith <[email protected]>

* Update packages/fuels/test/fixtures/workspace/contracts/upgradable/Forc.toml

Co-authored-by: Peter Smith <[email protected]>

* Update packages/fuels/src/cli/commands/deploy/proxy/contract/fuel-toolchain.toml

Co-authored-by: Peter Smith <[email protected]>

* Update packages/fuels/test/fixtures/workspace/contracts/upgradable/Forc.toml

* Update packages/fuels/src/cli/commands/deploy/deployContract.ts

Co-authored-by: Chad Nehemiah <[email protected]>

* Switching to built-in binaries

* Tyop

* Adjusting scripts

* Updating path in eslintignore

* Updating path in prettierignore

* Lintfix

---------

Co-authored-by: Daniel Bate <[email protected]>
Co-authored-by: Sérgio Torres <[email protected]>
Co-authored-by: Peter Smith <[email protected]>
Co-authored-by: Chad Nehemiah <[email protected]>
  • Loading branch information
5 people authored Sep 26, 2024
1 parent a2475e0 commit 3ad28bf
Show file tree
Hide file tree
Showing 34 changed files with 2,471 additions and 325 deletions.
5 changes: 5 additions & 0 deletions .changeset/friendly-turkeys-work.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"fuels": patch
---

feat: adding support for proxy contracts in `fuels deploy`
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ apps/demo-react-cra
apps/demo-react-vite
apps/create-fuels-counter-guide

packages/fuels/src/cli/commands/deploy/proxy
packages/fuels/test/fixtures/project
packages/account/src/providers/__generated__
packages/account/src/providers/assets
Expand Down
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ apps/demo-typegen/src/predicate-types
apps/docs/.vitepress/cache/
apps/create-fuels-counter-guide

packages/fuels/src/cli/commands/deploy/proxy
packages/fuels/test/fixtures/project
packages/account/src/providers/assets

Expand Down
4 changes: 4 additions & 0 deletions apps/docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,10 @@ export default defineConfig({
text: 'Managing Deployed Contracts',
link: '/guide/contracts/managing-deployed-contracts',
},
{
text: 'Proxy Contracts',
link: '/guide/contracts/proxy-contracts',
},
{
text: 'Understanding the FuelVM Binary File',
link: '/guide/contracts/understanding-the-fuelvm-binary-file',
Expand Down
Loading

0 comments on commit 3ad28bf

Please sign in to comment.