Skip to content

Commit

Permalink
fix(core): fix a couple bugs when deploying no-proxy contracts
Browse files Browse the repository at this point in the history
  • Loading branch information
sam-goldman committed Apr 10, 2023
1 parent 94402bc commit 1dee798
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/wet-lobsters-accept.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@chugsplash/core': patch
---

Fixes a couple errors when deploying no-proxy contracts
5 changes: 4 additions & 1 deletion packages/core/src/config/parse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -933,7 +933,10 @@ const parseContractVariables = (
cre: ChugSplashRuntimeEnvironment
): ParsedConfigVariables => {
const parsedConfigVariables: ParsedConfigVariables = {}
if (!contractConfig.variables) {
if (
!contractConfig.variables ||
Object.keys(contractConfig.variables).length === 0
) {
return {}
}

Expand Down
4 changes: 4 additions & 0 deletions packages/core/src/languages/solidity/storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,10 @@ export const computeStorageSegments = (
contractConfig: ParsedContractConfig,
dereferencer: ASTDereferencer
): Array<StorageSlotSegment> => {
if (contractConfig.kind === 'no-proxy') {
return []
}

let segments: StorageSlotSegment[] = []
for (const storageObj of Object.values(extendedLayout.storage)) {
const configVarValue = contractConfig.variables[storageObj.configVarName]
Expand Down

0 comments on commit 1dee798

Please sign in to comment.