Skip to content

Commit

Permalink
Merge pull request #451 from eonian-core/feature/allow-use-custom-uup…
Browse files Browse the repository at this point in the history
…s-proxy

Allow override custom proxy params
  • Loading branch information
wighawag committed Jun 24, 2023
2 parents 5d0973d + f877342 commit b2f8d6d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
6 changes: 5 additions & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion src/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1226,6 +1226,9 @@ export function addHelpers(
}
}

checkABIConflict = options.proxy.checkABIConflict ?? checkABIConflict;
checkProxyAdmin = options.proxy.checkProxyAdmin ?? checkProxyAdmin;

if (options.proxy.proxyContract) {
if (typeof options.proxy.proxyContract === 'string') {
try {
Expand Down Expand Up @@ -1306,7 +1309,7 @@ export function addHelpers(
);
// ensure no clash
const mergedABI = mergeABIs([proxyContract.abi, artifact.abi], {
check: checkABIConflict, // TODO options for custom proxy ?
check: checkABIConflict,
skipSupportsInterface: true, // TODO options for custom proxy ?
}).filter((v) => v.type !== 'constructor');
mergedABI.push(proxyContractConstructor); // use proxy constructor abi
Expand Down
2 changes: 2 additions & 0 deletions types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ type ProxyOptionsBase = {
artifact?: string | ArtifactData;
};
implementationName?: string;
checkABIConflict?: boolean;
checkProxyAdmin?: boolean;
};

export type ProxyOptions =
Expand Down

0 comments on commit b2f8d6d

Please sign in to comment.