Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@0xsequence/wallet

Package Overview
Dependencies
Maintainers
6
Versions
523
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@0xsequence/wallet - npm Package Compare versions

Comparing version 0.0.0-20241107182529 to 0.0.0-20241114192432

21

dist/0xsequence-wallet.cjs.dev.js

@@ -7,2 +7,3 @@ 'use strict';

var core = require('@0xsequence/core');
var network = require('@0xsequence/network');
var signhub = require('@0xsequence/signhub');

@@ -123,3 +124,4 @@ var utils = require('@0xsequence/utils');

var _options$provider;
if (BigInt(options.chainId) === 0n && !options.coders.signature.supportsNoChainId) {
const chainId = BigInt(options.chainId);
if (chainId === 0n && !options.coders.signature.supportsNoChainId) {
throw new Error(`Sequence version ${options.config.version} doesn't support chainId 0`);

@@ -141,3 +143,3 @@ }

this.address = options.address;
this.chainId = options.chainId;
this.chainId = chainId;
this.relayer = options.relayer;

@@ -209,3 +211,11 @@ this._reader = options.reader;

}
const bundle = Wallet.buildDeployTransaction(this.context, imageHash);
let gasLimit;
switch (this.chainId) {
case BigInt(network.ChainId.SKALE_NEBULA):
gasLimit = 10000000n;
break;
}
console.log('chainId', this.chainId);
console.log('skale-nebula', network.ChainId.SKALE_NEBULA);
const bundle = Wallet.buildDeployTransaction(this.context, imageHash, gasLimit);
if (metadata != null && metadata.includeChildren) {

@@ -235,4 +245,5 @@ const childBundle = await this.orchestrator.buildDeployTransaction(metadata);

}
static buildDeployTransaction(context, imageHash) {
static buildDeployTransaction(context, imageHash, gasLimit = 100000n) {
const factoryInterface = new ethers.ethers.Interface(abi.walletContracts.factory.abi);
console.log('deploy gas limit', gasLimit);
return {

@@ -243,3 +254,3 @@ entrypoint: context.guestModule,

data: factoryInterface.encodeFunctionData(factoryInterface.getFunction('deploy'), [context.mainModule, imageHash]),
gasLimit: 10000000,
gasLimit,
delegateCall: false,

@@ -246,0 +257,0 @@ revertOnError: true,

@@ -7,2 +7,3 @@ 'use strict';

var core = require('@0xsequence/core');
var network = require('@0xsequence/network');
var signhub = require('@0xsequence/signhub');

@@ -123,3 +124,4 @@ var utils = require('@0xsequence/utils');

var _options$provider;
if (BigInt(options.chainId) === 0n && !options.coders.signature.supportsNoChainId) {
const chainId = BigInt(options.chainId);
if (chainId === 0n && !options.coders.signature.supportsNoChainId) {
throw new Error(`Sequence version ${options.config.version} doesn't support chainId 0`);

@@ -141,3 +143,3 @@ }

this.address = options.address;
this.chainId = options.chainId;
this.chainId = chainId;
this.relayer = options.relayer;

@@ -209,3 +211,11 @@ this._reader = options.reader;

}
const bundle = Wallet.buildDeployTransaction(this.context, imageHash);
let gasLimit;
switch (this.chainId) {
case BigInt(network.ChainId.SKALE_NEBULA):
gasLimit = 10000000n;
break;
}
console.log('chainId', this.chainId);
console.log('skale-nebula', network.ChainId.SKALE_NEBULA);
const bundle = Wallet.buildDeployTransaction(this.context, imageHash, gasLimit);
if (metadata != null && metadata.includeChildren) {

@@ -235,4 +245,5 @@ const childBundle = await this.orchestrator.buildDeployTransaction(metadata);

}
static buildDeployTransaction(context, imageHash) {
static buildDeployTransaction(context, imageHash, gasLimit = 100000n) {
const factoryInterface = new ethers.ethers.Interface(abi.walletContracts.factory.abi);
console.log('deploy gas limit', gasLimit);
return {

@@ -243,3 +254,3 @@ entrypoint: context.guestModule,

data: factoryInterface.encodeFunctionData(factoryInterface.getFunction('deploy'), [context.mainModule, imageHash]),
gasLimit: 10000000,
gasLimit,
delegateCall: false,

@@ -246,0 +257,0 @@ revertOnError: true,

import { ethers } from 'ethers';
import { commons } from '@0xsequence/core';
import { ChainId } from '@0xsequence/network';
import { SignerState } from '@0xsequence/signhub';

@@ -118,3 +119,4 @@ import { subDigestOf, encodeTypedDataDigest } from '@0xsequence/utils';

var _options$provider;
if (BigInt(options.chainId) === 0n && !options.coders.signature.supportsNoChainId) {
const chainId = BigInt(options.chainId);
if (chainId === 0n && !options.coders.signature.supportsNoChainId) {
throw new Error(`Sequence version ${options.config.version} doesn't support chainId 0`);

@@ -136,3 +138,3 @@ }

this.address = options.address;
this.chainId = options.chainId;
this.chainId = chainId;
this.relayer = options.relayer;

@@ -204,3 +206,11 @@ this._reader = options.reader;

}
const bundle = Wallet.buildDeployTransaction(this.context, imageHash);
let gasLimit;
switch (this.chainId) {
case BigInt(ChainId.SKALE_NEBULA):
gasLimit = 10000000n;
break;
}
console.log('chainId', this.chainId);
console.log('skale-nebula', ChainId.SKALE_NEBULA);
const bundle = Wallet.buildDeployTransaction(this.context, imageHash, gasLimit);
if (metadata != null && metadata.includeChildren) {

@@ -230,4 +240,5 @@ const childBundle = await this.orchestrator.buildDeployTransaction(metadata);

}
static buildDeployTransaction(context, imageHash) {
static buildDeployTransaction(context, imageHash, gasLimit = 100000n) {
const factoryInterface = new ethers.Interface(walletContracts.factory.abi);
console.log('deploy gas limit', gasLimit);
return {

@@ -238,3 +249,3 @@ entrypoint: context.guestModule,

data: factoryInterface.encodeFunctionData(factoryInterface.getFunction('deploy'), [context.mainModule, imageHash]),
gasLimit: 10000000,
gasLimit,
delegateCall: false,

@@ -241,0 +252,0 @@ revertOnError: true,

@@ -32,3 +32,3 @@ import { ethers } from 'ethers';

address: string;
chainId: ethers.BigNumberish;
chainId: bigint;
relayer?: Relayer;

@@ -52,3 +52,3 @@ coders: {

deploy(metadata?: commons.WalletDeployMetadata): Promise<ethers.TransactionResponse | undefined>;
static buildDeployTransaction(context: commons.context.WalletContext, imageHash: string): commons.transaction.TransactionBundle;
static buildDeployTransaction(context: commons.context.WalletContext, imageHash: string, gasLimit?: ethers.BigNumberish): commons.transaction.TransactionBundle;
buildUpdateConfigurationTransaction(config: Y): Promise<commons.transaction.TransactionBundle>;

@@ -55,0 +55,0 @@ getNonce(space?: ethers.BigNumberish): Promise<number>;

{
"name": "@0xsequence/wallet",
"version": "0.0.0-20241107182529",
"version": "0.0.0-20241114192432",
"description": "wallet sub-package for Sequence",

@@ -15,8 +15,8 @@ "repository": "https://github.com/0xsequence/sequence.js/tree/master/packages/wallet",

"dependencies": {
"@0xsequence/abi": "0.0.0-20241107182529",
"@0xsequence/core": "0.0.0-20241107182529",
"@0xsequence/network": "0.0.0-20241107182529",
"@0xsequence/signhub": "0.0.0-20241107182529",
"@0xsequence/relayer": "0.0.0-20241107182529",
"@0xsequence/utils": "0.0.0-20241107182529"
"@0xsequence/abi": "0.0.0-20241114192432",
"@0xsequence/core": "0.0.0-20241114192432",
"@0xsequence/network": "0.0.0-20241114192432",
"@0xsequence/signhub": "0.0.0-20241114192432",
"@0xsequence/relayer": "0.0.0-20241114192432",
"@0xsequence/utils": "0.0.0-20241114192432"
},

@@ -29,3 +29,3 @@ "devDependencies": {

"web3": "^1.8.1",
"@0xsequence/tests": "0.0.0-20241107182529"
"@0xsequence/tests": "0.0.0-20241114192432"
},

@@ -32,0 +32,0 @@ "files": [

import { ethers } from 'ethers'
import { commons, v1, v2 } from '@0xsequence/core'
import { ChainId } from '@0xsequence/network'
import { SignatureOrchestrator, SignerState, Status } from '@0xsequence/signhub'

@@ -68,3 +69,3 @@ import { encodeTypedDataDigest, subDigestOf } from '@0xsequence/utils'

public address: string
public chainId: ethers.BigNumberish
public chainId: bigint

@@ -82,3 +83,5 @@ public relayer?: Relayer

constructor(options: WalletOptions<T, Y, Z>) {
if (BigInt(options.chainId) === 0n && !options.coders.signature.supportsNoChainId) {
const chainId = BigInt(options.chainId)
if (chainId === 0n && !options.coders.signature.supportsNoChainId) {
throw new Error(`Sequence version ${options.config.version} doesn't support chainId 0`)

@@ -94,3 +97,3 @@ }

this.address = options.address
this.chainId = options.chainId
this.chainId = chainId
this.relayer = options.relayer

@@ -185,3 +188,13 @@

const bundle = Wallet.buildDeployTransaction(this.context, imageHash)
let gasLimit: bigint | undefined
switch (this.chainId) {
case BigInt(ChainId.SKALE_NEBULA):
gasLimit = 10000000n
break
}
console.log('chainId', this.chainId)
console.log('skale-nebula', ChainId.SKALE_NEBULA)
const bundle = Wallet.buildDeployTransaction(this.context, imageHash, gasLimit)
if (metadata?.includeChildren) {

@@ -216,6 +229,9 @@ const childBundle = await this.orchestrator.buildDeployTransaction(metadata)

context: commons.context.WalletContext,
imageHash: string
imageHash: string,
gasLimit: ethers.BigNumberish = 100000n
): commons.transaction.TransactionBundle {
const factoryInterface = new ethers.Interface(walletContracts.factory.abi)
console.log('deploy gas limit', gasLimit)
return {

@@ -227,3 +243,3 @@ entrypoint: context.guestModule,

data: factoryInterface.encodeFunctionData(factoryInterface.getFunction('deploy')!, [context.mainModule, imageHash]),
gasLimit: 10000000,
gasLimit,
delegateCall: false,

@@ -230,0 +246,0 @@ revertOnError: true,

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc