Updated Wallet Version ! Now only 500k gas for Wallet creation
This commit is contained in:
@@ -20,8 +20,10 @@ import { validateUint, validateAddress, validateName } from '~/util/validation';
|
||||
import { ERROR_CODES } from '~/api/transport/error';
|
||||
|
||||
import Contract from '~/api/contract';
|
||||
import Contracts from '~/contracts';
|
||||
import { wallet as walletAbi } from '~/contracts/abi';
|
||||
import { wallet as walletCode } from '~/contracts/code';
|
||||
import { walletLibraryRegKey } from '~/contracts/code/wallet';
|
||||
|
||||
import WalletsUtils from '~/util/wallets';
|
||||
|
||||
@@ -160,14 +162,23 @@ export default class CreateWalletStore {
|
||||
|
||||
const { account, owners, required, daylimit } = this.wallet;
|
||||
|
||||
const options = {
|
||||
data: walletCode,
|
||||
from: account
|
||||
};
|
||||
Contracts
|
||||
.get()
|
||||
.registry
|
||||
.lookupAddress(walletLibraryRegKey)
|
||||
.then((address) => {
|
||||
const walletLibraryAddress = address.replace(/^0x/, '').toLowerCase();
|
||||
const code = walletCode.replace(/(_)+WalletLibrary(_)+/g, walletLibraryAddress);
|
||||
|
||||
this.api
|
||||
.newContract(walletAbi)
|
||||
.deploy(options, [ owners, required, daylimit ], this.onDeploymentState)
|
||||
const options = {
|
||||
data: code,
|
||||
from: account
|
||||
};
|
||||
|
||||
return this.api
|
||||
.newContract(walletAbi)
|
||||
.deploy(options, [ owners, required, daylimit ], this.onDeploymentState);
|
||||
})
|
||||
.then((address) => {
|
||||
this.deployed = true;
|
||||
this.wallet.address = address;
|
||||
|
||||
Reference in New Issue
Block a user