Update safeMaster setup parameters
This commit is contained in:
parent
a3b86bb807
commit
c78fa2fb29
|
@ -5,6 +5,7 @@ import { getWeb3 } from '~/logic/wallets/getWeb3'
|
||||||
import GnosisSafeSol from '#/GnosisSafe.json'
|
import GnosisSafeSol from '#/GnosisSafe.json'
|
||||||
import ProxyFactorySol from '#/ProxyFactory.json'
|
import ProxyFactorySol from '#/ProxyFactory.json'
|
||||||
import { calculateGasOf, calculateGasPrice } from '~/logic/wallets/ethTransactions'
|
import { calculateGasOf, calculateGasPrice } from '~/logic/wallets/ethTransactions'
|
||||||
|
import { ZERO_ADDRESS } from '~/logic/wallets/ethAddresses'
|
||||||
|
|
||||||
let proxyFactoryMaster
|
let proxyFactoryMaster
|
||||||
let safeMaster
|
let safeMaster
|
||||||
|
@ -61,7 +62,7 @@ export const getSafeMasterContract = async () => {
|
||||||
|
|
||||||
export const deploySafeContract = async (safeAccounts: string[], numConfirmations: number, userAccount: string) => {
|
export const deploySafeContract = async (safeAccounts: string[], numConfirmations: number, userAccount: string) => {
|
||||||
const gnosisSafeData = await safeMaster.contract.methods
|
const gnosisSafeData = await safeMaster.contract.methods
|
||||||
.setup(safeAccounts, numConfirmations, '0x0000000000000000000000000000000000000000', '0x')
|
.setup(safeAccounts, numConfirmations, ZERO_ADDRESS, '0x', ZERO_ADDRESS, 0, ZERO_ADDRESS)
|
||||||
.encodeABI()
|
.encodeABI()
|
||||||
const proxyFactoryData = proxyFactoryMaster.contract.methods
|
const proxyFactoryData = proxyFactoryMaster.contract.methods
|
||||||
.createProxy(safeMaster.address, gnosisSafeData)
|
.createProxy(safeMaster.address, gnosisSafeData)
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
// @flow
|
// @flow
|
||||||
|
export const ZERO_ADDRESS = ' 0x0000000000000000000000000000000000000000'
|
||||||
|
|
||||||
export const sameAddress = (firstAddress: string, secondAddress: string): boolean => {
|
export const sameAddress = (firstAddress: string, secondAddress: string): boolean => {
|
||||||
if (!firstAddress) {
|
if (!firstAddress) {
|
||||||
return false
|
return false
|
||||||
|
|
Loading…
Reference in New Issue