Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v2.3.0 #230

Merged
merged 10 commits into from
Jul 29, 2022
Next Next commit
Add proxyCreationCode to proxy factory contract
  • Loading branch information
germartinez committed Jul 27, 2022
commit 7c1da37a69cce883cae7c975ae8023cac7431806
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { TransactionOptions } from '../types'
import { TransactionOptions } from '../types';

export interface CreateProxyProps {
safeMasterCopyAddress: string
Expand All @@ -10,6 +10,7 @@ export interface CreateProxyProps {

export interface GnosisSafeProxyFactoryContract {
getAddress(): string
proxyCreationCode(): Promise<string>
createProxy(options: CreateProxyProps): Promise<string>
encode(methodName: string, params: any[]): string
estimateGas(methodName: string, params: any[], options: TransactionOptions): Promise<number>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ class GnosisSafeProxyFactoryEthersContract implements GnosisSafeProxyFactoryCont
return this.contract.address
}

async proxyCreationCode(): Promise<string> {
return this.contract.proxyCreationCode()
}

async createProxy({
safeMasterCopyAddress,
initializer,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ class GnosisSafeProxyFactoryWeb3Contract implements GnosisSafeProxyFactoryContra
return this.contract.options.address
}

async proxyCreationCode(): Promise<string> {
return this.contract.methods.proxyCreationCode().call()
}

async createProxy({
safeMasterCopyAddress,
initializer,
Expand Down