diff --git a/packages/protocol-kit/package.json b/packages/protocol-kit/package.json index 9a118ed43..e4cd4b16b 100644 --- a/packages/protocol-kit/package.json +++ b/packages/protocol-kit/package.json @@ -1,6 +1,6 @@ { - "name": "@safe-global/protocol-kit", - "version": "1.2.0", + "name": "@franvf/protocol-kit", + "version": "1.0.0", "description": "SDK to interact with Safe smart contracts", "main": "dist/src/index.js", "types": "dist/src/index.d.ts", @@ -40,12 +40,12 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/safe-global/safe-core-sdk.git" + "url": "git+https://github.com/franvf/safe-core-sdk-fixed" }, - "author": "Safe (https://safe.global)", + "author": "Fran Vañó", "license": "MIT", "bugs": { - "url": "https://github.com/safe-global/safe-core-sdk/issues" + "url": "https://github.com/franvf" }, "files": [ "dist" diff --git a/packages/protocol-kit/src/adapters/web3/contracts/SafeProxyFactory/SafeProxyFactoryWeb3Contract.ts b/packages/protocol-kit/src/adapters/web3/contracts/SafeProxyFactory/SafeProxyFactoryWeb3Contract.ts index b8e93fc0a..2710225c3 100644 --- a/packages/protocol-kit/src/adapters/web3/contracts/SafeProxyFactory/SafeProxyFactoryWeb3Contract.ts +++ b/packages/protocol-kit/src/adapters/web3/contracts/SafeProxyFactory/SafeProxyFactoryWeb3Contract.ts @@ -63,12 +63,19 @@ class SafeProxyFactoryWeb3Contract implements SafeProxyFactoryContract { const txResult: TransactionReceipt = await new Promise((resolve, reject) => txResponse.once('receipt', (receipt: TransactionReceipt) => resolve(receipt)).catch(reject) ) - const proxyAddress = txResult.events?.ProxyCreation?.returnValues?.proxy - if (!proxyAddress) { + // const proxyAddress = txResult.events?.ProxyCreation?.returnValues?.proxy + + //FRAN CODE START + const events = await this.contract.getPastEvents('ProxyCreation') + const proxyAddress = events[0]['returnValues']['0'] + + // if (!proxyAddress) { + if (proxyAddress == '0x0000000000000000000000000000000000000000') { throw new Error('SafeProxy was not deployed correctly') } return proxyAddress } + //FRAN CODE FINISH encode(methodName: string, params: any[]): string { return (this.contract as any).methods[methodName](...params).encodeABI()