aboutsummaryrefslogtreecommitdiffstats
path: root/packages/abi-gen-wrappers/src/generated-wrappers/asset_proxy_owner.ts
diff options
context:
space:
mode:
authorGreg Hysen <greg.hysen@gmail.com>2018-12-23 09:23:02 +0800
committerGreg Hysen <greg.hysen@gmail.com>2019-01-15 02:49:44 +0800
commitb06f8239e1fe75703f88d34c0d225701406e28c2 (patch)
tree9beb83b64b37fb6ad67d066f089b868a8ad25fcb /packages/abi-gen-wrappers/src/generated-wrappers/asset_proxy_owner.ts
parent7991de9ed0b5f1e8a38097d902eae09cc6b5cf11 (diff)
downloaddexon-0x-contracts-b06f8239e1fe75703f88d34c0d225701406e28c2.tar.gz
dexon-0x-contracts-b06f8239e1fe75703f88d34c0d225701406e28c2.tar.zst
dexon-0x-contracts-b06f8239e1fe75703f88d34c0d225701406e28c2.zip
Finished porting new abi encoder to contracts
Diffstat (limited to 'packages/abi-gen-wrappers/src/generated-wrappers/asset_proxy_owner.ts')
-rw-r--r--packages/abi-gen-wrappers/src/generated-wrappers/asset_proxy_owner.ts1473
1 files changed, 0 insertions, 1473 deletions
diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/asset_proxy_owner.ts b/packages/abi-gen-wrappers/src/generated-wrappers/asset_proxy_owner.ts
deleted file mode 100644
index 4257004fd..000000000
--- a/packages/abi-gen-wrappers/src/generated-wrappers/asset_proxy_owner.ts
+++ /dev/null
@@ -1,1473 +0,0 @@
-// tslint:disable:no-consecutive-blank-lines ordered-imports align trailing-comma whitespace class-name
-// tslint:disable:no-unused-variable
-// tslint:disable:no-unbound-method
-import { BaseContract } from '@0x/base-contract';
-import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types';
-import { BigNumber, classUtils, logUtils } from '@0x/utils';
-import { SimpleContractArtifact } from '@0x/types';
-import { Web3Wrapper } from '@0x/web3-wrapper';
-import * as ethers from 'ethers';
-import * as _ from 'lodash';
-// tslint:enable:no-unused-variable
-
-export type AssetProxyOwnerEventArgs =
- | AssetProxyOwnerAssetProxyRegistrationEventArgs
- | AssetProxyOwnerConfirmationTimeSetEventArgs
- | AssetProxyOwnerTimeLockChangeEventArgs
- | AssetProxyOwnerConfirmationEventArgs
- | AssetProxyOwnerRevocationEventArgs
- | AssetProxyOwnerSubmissionEventArgs
- | AssetProxyOwnerExecutionEventArgs
- | AssetProxyOwnerExecutionFailureEventArgs
- | AssetProxyOwnerDepositEventArgs
- | AssetProxyOwnerOwnerAdditionEventArgs
- | AssetProxyOwnerOwnerRemovalEventArgs
- | AssetProxyOwnerRequirementChangeEventArgs;
-
-export enum AssetProxyOwnerEvents {
- AssetProxyRegistration = 'AssetProxyRegistration',
- ConfirmationTimeSet = 'ConfirmationTimeSet',
- TimeLockChange = 'TimeLockChange',
- Confirmation = 'Confirmation',
- Revocation = 'Revocation',
- Submission = 'Submission',
- Execution = 'Execution',
- ExecutionFailure = 'ExecutionFailure',
- Deposit = 'Deposit',
- OwnerAddition = 'OwnerAddition',
- OwnerRemoval = 'OwnerRemoval',
- RequirementChange = 'RequirementChange',
-}
-
-export interface AssetProxyOwnerAssetProxyRegistrationEventArgs extends DecodedLogArgs {
- assetProxyContract: string;
- isRegistered: boolean;
-}
-
-export interface AssetProxyOwnerConfirmationTimeSetEventArgs extends DecodedLogArgs {
- transactionId: BigNumber;
- confirmationTime: BigNumber;
-}
-
-export interface AssetProxyOwnerTimeLockChangeEventArgs extends DecodedLogArgs {
- secondsTimeLocked: BigNumber;
-}
-
-export interface AssetProxyOwnerConfirmationEventArgs extends DecodedLogArgs {
- sender: string;
- transactionId: BigNumber;
-}
-
-export interface AssetProxyOwnerRevocationEventArgs extends DecodedLogArgs {
- sender: string;
- transactionId: BigNumber;
-}
-
-export interface AssetProxyOwnerSubmissionEventArgs extends DecodedLogArgs {
- transactionId: BigNumber;
-}
-
-export interface AssetProxyOwnerExecutionEventArgs extends DecodedLogArgs {
- transactionId: BigNumber;
-}
-
-export interface AssetProxyOwnerExecutionFailureEventArgs extends DecodedLogArgs {
- transactionId: BigNumber;
-}
-
-export interface AssetProxyOwnerDepositEventArgs extends DecodedLogArgs {
- sender: string;
- value: BigNumber;
-}
-
-export interface AssetProxyOwnerOwnerAdditionEventArgs extends DecodedLogArgs {
- owner: string;
-}
-
-export interface AssetProxyOwnerOwnerRemovalEventArgs extends DecodedLogArgs {
- owner: string;
-}
-
-export interface AssetProxyOwnerRequirementChangeEventArgs extends DecodedLogArgs {
- required: BigNumber;
-}
-
-
-/* istanbul ignore next */
-// tslint:disable:no-parameter-reassignment
-// tslint:disable-next-line:class-name
-export class AssetProxyOwnerContract extends BaseContract {
- public owners = {
- async callAsync(
- index_0: BigNumber,
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<string
- > {
- const self = this as any as AssetProxyOwnerContract;
- const functionSignature = 'owners(uint256)';
- const abiEncoder = self._lookupAbiEncoder(functionSignature);
- const encodedData = abiEncoder.encode([index_0
- ]);
- const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
- {
- to: self.address,
- ...callData,
- data: encodedData,
- },
- self._web3Wrapper.getContractDefaults(),
- );
- const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
- BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
- return resultArray[0];
- },
- };
- public removeOwner = {
- async sendTransactionAsync(
- owner: string,
- txData: Partial<TxData> = {},
- ): Promise<string> {
- const self = this as any as AssetProxyOwnerContract;
- const abiEncoder = self._lookupAbiEncoder('removeOwner(address)');
- const encodedData = abiEncoder.encode([owner
- ], {optimize: false});
- const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
- {
- to: self.address,
- ...txData,
- data: encodedData,
- },
- self._web3Wrapper.getContractDefaults(),
- self.removeOwner.estimateGasAsync.bind(
- self,
- owner
- ),
- );
- const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults);
- return txHash;
- },
- async estimateGasAsync(
- owner: string,
- txData: Partial<TxData> = {},
- ): Promise<number> {
- const self = this as any as AssetProxyOwnerContract;
- const abiEncoder = self._lookupAbiEncoder('removeOwner(address)');
- const encodedData = abiEncoder.encode([owner
- ]);
- const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
- {
- to: self.address,
- ...txData,
- data: encodedData,
- },
- self._web3Wrapper.getContractDefaults(),
- );
- const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
- return gas;
- },
- getABIEncodedTransactionData(
- owner: string,
- ): string {
- const self = this as any as AssetProxyOwnerContract;
- const abiEncoder = self._lookupAbiEncoder('removeOwner(address)');
- const abiEncodedTransactionData = abiEncoder.encode([owner
- ]);
- return abiEncodedTransactionData;
- },
- async callAsync(
- owner: string,
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<void
- > {
- const self = this as any as AssetProxyOwnerContract;
- const functionSignature = 'removeOwner(address)';
- const abiEncoder = self._lookupAbiEncoder(functionSignature);
- const encodedData = abiEncoder.encode([owner
- ]);
- const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
- {
- to: self.address,
- ...callData,
- data: encodedData,
- },
- self._web3Wrapper.getContractDefaults(),
- );
- const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
- BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
- return resultArray;
- },
- };
- public revokeConfirmation = {
- async sendTransactionAsync(
- transactionId: BigNumber,
- txData: Partial<TxData> = {},
- ): Promise<string> {
- const self = this as any as AssetProxyOwnerContract;
- const abiEncoder = self._lookupAbiEncoder('revokeConfirmation(uint256)');
- const encodedData = abiEncoder.encode([transactionId
- ], {optimize: false});
- const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
- {
- to: self.address,
- ...txData,
- data: encodedData,
- },
- self._web3Wrapper.getContractDefaults(),
- self.revokeConfirmation.estimateGasAsync.bind(
- self,
- transactionId
- ),
- );
- const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults);
- return txHash;
- },
- async estimateGasAsync(
- transactionId: BigNumber,
- txData: Partial<TxData> = {},
- ): Promise<number> {
- const self = this as any as AssetProxyOwnerContract;
- const abiEncoder = self._lookupAbiEncoder('revokeConfirmation(uint256)');
- const encodedData = abiEncoder.encode([transactionId
- ]);
- const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
- {
- to: self.address,
- ...txData,
- data: encodedData,
- },
- self._web3Wrapper.getContractDefaults(),
- );
- const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
- return gas;
- },
- getABIEncodedTransactionData(
- transactionId: BigNumber,
- ): string {
- const self = this as any as AssetProxyOwnerContract;
- const abiEncoder = self._lookupAbiEncoder('revokeConfirmation(uint256)');
- const abiEncodedTransactionData = abiEncoder.encode([transactionId
- ]);
- return abiEncodedTransactionData;
- },
- async callAsync(
- transactionId: BigNumber,
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<void
- > {
- const self = this as any as AssetProxyOwnerContract;
- const functionSignature = 'revokeConfirmation(uint256)';
- const abiEncoder = self._lookupAbiEncoder(functionSignature);
- const encodedData = abiEncoder.encode([transactionId
- ]);
- const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
- {
- to: self.address,
- ...callData,
- data: encodedData,
- },
- self._web3Wrapper.getContractDefaults(),
- );
- const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
- BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
- return resultArray;
- },
- };
- public isOwner = {
- async callAsync(
- index_0: string,
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<boolean
- > {
- const self = this as any as AssetProxyOwnerContract;
- const functionSignature = 'isOwner(address)';
- const abiEncoder = self._lookupAbiEncoder(functionSignature);
- const encodedData = abiEncoder.encode([index_0
- ]);
- const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
- {
- to: self.address,
- ...callData,
- data: encodedData,
- },
- self._web3Wrapper.getContractDefaults(),
- );
- const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
- BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
- return resultArray[0];
- },
- };
- public confirmations = {
- async callAsync(
- index_0: BigNumber,
- index_1: string,
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<boolean
- > {
- const self = this as any as AssetProxyOwnerContract;
- const functionSignature = 'confirmations(uint256,address)';
- const abiEncoder = self._lookupAbiEncoder(functionSignature);
- const encodedData = abiEncoder.encode([index_0,
- index_1
- ]);
- const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
- {
- to: self.address,
- ...callData,
- data: encodedData,
- },
- self._web3Wrapper.getContractDefaults(),
- );
- const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
- BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
- return resultArray[0];
- },
- };
- public executeRemoveAuthorizedAddressAtIndex = {
- async sendTransactionAsync(
- transactionId: BigNumber,
- txData: Partial<TxData> = {},
- ): Promise<string> {
- const self = this as any as AssetProxyOwnerContract;
- const abiEncoder = self._lookupAbiEncoder('executeRemoveAuthorizedAddressAtIndex(uint256)');
- const encodedData = abiEncoder.encode([transactionId
- ], {optimize: false});
- const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
- {
- to: self.address,
- ...txData,
- data: encodedData,
- },
- self._web3Wrapper.getContractDefaults(),
- self.executeRemoveAuthorizedAddressAtIndex.estimateGasAsync.bind(
- self,
- transactionId
- ),
- );
- const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults);
- return txHash;
- },
- async estimateGasAsync(
- transactionId: BigNumber,
- txData: Partial<TxData> = {},
- ): Promise<number> {
- const self = this as any as AssetProxyOwnerContract;
- const abiEncoder = self._lookupAbiEncoder('executeRemoveAuthorizedAddressAtIndex(uint256)');
- const encodedData = abiEncoder.encode([transactionId
- ]);
- const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
- {
- to: self.address,
- ...txData,
- data: encodedData,
- },
- self._web3Wrapper.getContractDefaults(),
- );
- const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
- return gas;
- },
- getABIEncodedTransactionData(
- transactionId: BigNumber,
- ): string {
- const self = this as any as AssetProxyOwnerContract;
- const abiEncoder = self._lookupAbiEncoder('executeRemoveAuthorizedAddressAtIndex(uint256)');
- const abiEncodedTransactionData = abiEncoder.encode([transactionId
- ]);
- return abiEncodedTransactionData;
- },
- async callAsync(
- transactionId: BigNumber,
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<void
- > {
- const self = this as any as AssetProxyOwnerContract;
- const functionSignature = 'executeRemoveAuthorizedAddressAtIndex(uint256)';
- const abiEncoder = self._lookupAbiEncoder(functionSignature);
- const encodedData = abiEncoder.encode([transactionId
- ]);
- const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
- {
- to: self.address,
- ...callData,
- data: encodedData,
- },
- self._web3Wrapper.getContractDefaults(),
- );
- const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
- BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
- return resultArray;
- },
- };
- public secondsTimeLocked = {
- async callAsync(
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<BigNumber
- > {
- const self = this as any as AssetProxyOwnerContract;
- const functionSignature = 'secondsTimeLocked()';
- const abiEncoder = self._lookupAbiEncoder(functionSignature);
- const encodedData = abiEncoder.encode([]);
- const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
- {
- to: self.address,
- ...callData,
- data: encodedData,
- },
- self._web3Wrapper.getContractDefaults(),
- );
- const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
- BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
- return resultArray[0];
- },
- };
- public getTransactionCount = {
- async callAsync(
- pending: boolean,
- executed: boolean,
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<BigNumber
- > {
- const self = this as any as AssetProxyOwnerContract;
- const functionSignature = 'getTransactionCount(bool,bool)';
- const abiEncoder = self._lookupAbiEncoder(functionSignature);
- const encodedData = abiEncoder.encode([pending,
- executed
- ]);
- const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
- {
- to: self.address,
- ...callData,
- data: encodedData,
- },
- self._web3Wrapper.getContractDefaults(),
- );
- const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
- BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
- return resultArray[0];
- },
- };
- public registerAssetProxy = {
- async sendTransactionAsync(
- assetProxyContract: string,
- isRegistered: boolean,
- txData: Partial<TxData> = {},
- ): Promise<string> {
- const self = this as any as AssetProxyOwnerContract;
- const abiEncoder = self._lookupAbiEncoder('registerAssetProxy(address,bool)');
- const encodedData = abiEncoder.encode([assetProxyContract,
- isRegistered
- ], {optimize: false});
- const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
- {
- to: self.address,
- ...txData,
- data: encodedData,
- },
- self._web3Wrapper.getContractDefaults(),
- self.registerAssetProxy.estimateGasAsync.bind(
- self,
- assetProxyContract,
- isRegistered
- ),
- );
- const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults);
- return txHash;
- },
- async estimateGasAsync(
- assetProxyContract: string,
- isRegistered: boolean,
- txData: Partial<TxData> = {},
- ): Promise<number> {
- const self = this as any as AssetProxyOwnerContract;
- const abiEncoder = self._lookupAbiEncoder('registerAssetProxy(address,bool)');
- const encodedData = abiEncoder.encode([assetProxyContract,
- isRegistered
- ]);
- const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
- {
- to: self.address,
- ...txData,
- data: encodedData,
- },
- self._web3Wrapper.getContractDefaults(),
- );
- const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
- return gas;
- },
- getABIEncodedTransactionData(
- assetProxyContract: string,
- isRegistered: boolean,
- ): string {
- const self = this as any as AssetProxyOwnerContract;
- const abiEncoder = self._lookupAbiEncoder('registerAssetProxy(address,bool)');
- const abiEncodedTransactionData = abiEncoder.encode([assetProxyContract,
- isRegistered
- ]);
- return abiEncodedTransactionData;
- },
- async callAsync(
- assetProxyContract: string,
- isRegistered: boolean,
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<void
- > {
- const self = this as any as AssetProxyOwnerContract;
- const functionSignature = 'registerAssetProxy(address,bool)';
- const abiEncoder = self._lookupAbiEncoder(functionSignature);
- const encodedData = abiEncoder.encode([assetProxyContract,
- isRegistered
- ]);
- const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
- {
- to: self.address,
- ...callData,
- data: encodedData,
- },
- self._web3Wrapper.getContractDefaults(),
- );
- const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
- BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
- return resultArray;
- },
- };
- public addOwner = {
- async sendTransactionAsync(
- owner: string,
- txData: Partial<TxData> = {},
- ): Promise<string> {
- const self = this as any as AssetProxyOwnerContract;
- const abiEncoder = self._lookupAbiEncoder('addOwner(address)');
- const encodedData = abiEncoder.encode([owner
- ], {optimize: false});
- const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
- {
- to: self.address,
- ...txData,
- data: encodedData,
- },
- self._web3Wrapper.getContractDefaults(),
- self.addOwner.estimateGasAsync.bind(
- self,
- owner
- ),
- );
- const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults);
- return txHash;
- },
- async estimateGasAsync(
- owner: string,
- txData: Partial<TxData> = {},
- ): Promise<number> {
- const self = this as any as AssetProxyOwnerContract;
- const abiEncoder = self._lookupAbiEncoder('addOwner(address)');
- const encodedData = abiEncoder.encode([owner
- ]);
- const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
- {
- to: self.address,
- ...txData,
- data: encodedData,
- },
- self._web3Wrapper.getContractDefaults(),
- );
- const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
- return gas;
- },
- getABIEncodedTransactionData(
- owner: string,
- ): string {
- const self = this as any as AssetProxyOwnerContract;
- const abiEncoder = self._lookupAbiEncoder('addOwner(address)');
- const abiEncodedTransactionData = abiEncoder.encode([owner
- ]);
- return abiEncodedTransactionData;
- },
- async callAsync(
- owner: string,
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<void
- > {
- const self = this as any as AssetProxyOwnerContract;
- const functionSignature = 'addOwner(address)';
- const abiEncoder = self._lookupAbiEncoder(functionSignature);
- const encodedData = abiEncoder.encode([owner
- ]);
- const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
- {
- to: self.address,
- ...callData,
- data: encodedData,
- },
- self._web3Wrapper.getContractDefaults(),
- );
- const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
- BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
- return resultArray;
- },
- };
- public isConfirmed = {
- async callAsync(
- transactionId: BigNumber,
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<boolean
- > {
- const self = this as any as AssetProxyOwnerContract;
- const functionSignature = 'isConfirmed(uint256)';
- const abiEncoder = self._lookupAbiEncoder(functionSignature);
- const encodedData = abiEncoder.encode([transactionId
- ]);
- const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
- {
- to: self.address,
- ...callData,
- data: encodedData,
- },
- self._web3Wrapper.getContractDefaults(),
- );
- const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
- BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
- return resultArray[0];
- },
- };
- public changeTimeLock = {
- async sendTransactionAsync(
- _secondsTimeLocked: BigNumber,
- txData: Partial<TxData> = {},
- ): Promise<string> {
- const self = this as any as AssetProxyOwnerContract;
- const abiEncoder = self._lookupAbiEncoder('changeTimeLock(uint256)');
- const encodedData = abiEncoder.encode([_secondsTimeLocked
- ], {optimize: false});
- const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
- {
- to: self.address,
- ...txData,
- data: encodedData,
- },
- self._web3Wrapper.getContractDefaults(),
- self.changeTimeLock.estimateGasAsync.bind(
- self,
- _secondsTimeLocked
- ),
- );
- const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults);
- return txHash;
- },
- async estimateGasAsync(
- _secondsTimeLocked: BigNumber,
- txData: Partial<TxData> = {},
- ): Promise<number> {
- const self = this as any as AssetProxyOwnerContract;
- const abiEncoder = self._lookupAbiEncoder('changeTimeLock(uint256)');
- const encodedData = abiEncoder.encode([_secondsTimeLocked
- ]);
- const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
- {
- to: self.address,
- ...txData,
- data: encodedData,
- },
- self._web3Wrapper.getContractDefaults(),
- );
- const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
- return gas;
- },
- getABIEncodedTransactionData(
- _secondsTimeLocked: BigNumber,
- ): string {
- const self = this as any as AssetProxyOwnerContract;
- const abiEncoder = self._lookupAbiEncoder('changeTimeLock(uint256)');
- const abiEncodedTransactionData = abiEncoder.encode([_secondsTimeLocked
- ]);
- return abiEncodedTransactionData;
- },
- async callAsync(
- _secondsTimeLocked: BigNumber,
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<void
- > {
- const self = this as any as AssetProxyOwnerContract;
- const functionSignature = 'changeTimeLock(uint256)';
- const abiEncoder = self._lookupAbiEncoder(functionSignature);
- const encodedData = abiEncoder.encode([_secondsTimeLocked
- ]);
- const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
- {
- to: self.address,
- ...callData,
- data: encodedData,
- },
- self._web3Wrapper.getContractDefaults(),
- );
- const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
- BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
- return resultArray;
- },
- };
- public isAssetProxyRegistered = {
- async callAsync(
- index_0: string,
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<boolean
- > {
- const self = this as any as AssetProxyOwnerContract;
- const functionSignature = 'isAssetProxyRegistered(address)';
- const abiEncoder = self._lookupAbiEncoder(functionSignature);
- const encodedData = abiEncoder.encode([index_0
- ]);
- const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
- {
- to: self.address,
- ...callData,
- data: encodedData,
- },
- self._web3Wrapper.getContractDefaults(),
- );
- const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
- BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
- return resultArray[0];
- },
- };
- public getConfirmationCount = {
- async callAsync(
- transactionId: BigNumber,
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<BigNumber
- > {
- const self = this as any as AssetProxyOwnerContract;
- const functionSignature = 'getConfirmationCount(uint256)';
- const abiEncoder = self._lookupAbiEncoder(functionSignature);
- const encodedData = abiEncoder.encode([transactionId
- ]);
- const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
- {
- to: self.address,
- ...callData,
- data: encodedData,
- },
- self._web3Wrapper.getContractDefaults(),
- );
- const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
- BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
- return resultArray[0];
- },
- };
- public transactions = {
- async callAsync(
- index_0: BigNumber,
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<[string, BigNumber, string, boolean]
- > {
- const self = this as any as AssetProxyOwnerContract;
- const functionSignature = 'transactions(uint256)';
- const abiEncoder = self._lookupAbiEncoder(functionSignature);
- const encodedData = abiEncoder.encode([index_0
- ]);
- const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
- {
- to: self.address,
- ...callData,
- data: encodedData,
- },
- self._web3Wrapper.getContractDefaults(),
- );
- const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
- BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
- return resultArray;
- },
- };
- public getOwners = {
- async callAsync(
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<string[]
- > {
- const self = this as any as AssetProxyOwnerContract;
- const functionSignature = 'getOwners()';
- const abiEncoder = self._lookupAbiEncoder(functionSignature);
- const encodedData = abiEncoder.encode([]);
- const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
- {
- to: self.address,
- ...callData,
- data: encodedData,
- },
- self._web3Wrapper.getContractDefaults(),
- );
- const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
- BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
- return resultArray[0];
- },
- };
- public getTransactionIds = {
- async callAsync(
- from: BigNumber,
- to: BigNumber,
- pending: boolean,
- executed: boolean,
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<BigNumber[]
- > {
- const self = this as any as AssetProxyOwnerContract;
- const functionSignature = 'getTransactionIds(uint256,uint256,bool,bool)';
- const abiEncoder = self._lookupAbiEncoder(functionSignature);
- const encodedData = abiEncoder.encode([from,
- to,
- pending,
- executed
- ]);
- const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
- {
- to: self.address,
- ...callData,
- data: encodedData,
- },
- self._web3Wrapper.getContractDefaults(),
- );
- const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
- BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
- return resultArray[0];
- },
- };
- public getConfirmations = {
- async callAsync(
- transactionId: BigNumber,
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<string[]
- > {
- const self = this as any as AssetProxyOwnerContract;
- const functionSignature = 'getConfirmations(uint256)';
- const abiEncoder = self._lookupAbiEncoder(functionSignature);
- const encodedData = abiEncoder.encode([transactionId
- ]);
- const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
- {
- to: self.address,
- ...callData,
- data: encodedData,
- },
- self._web3Wrapper.getContractDefaults(),
- );
- const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
- BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
- return resultArray[0];
- },
- };
- public transactionCount = {
- async callAsync(
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<BigNumber
- > {
- const self = this as any as AssetProxyOwnerContract;
- const functionSignature = 'transactionCount()';
- const abiEncoder = self._lookupAbiEncoder(functionSignature);
- const encodedData = abiEncoder.encode([]);
- const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
- {
- to: self.address,
- ...callData,
- data: encodedData,
- },
- self._web3Wrapper.getContractDefaults(),
- );
- const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
- BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
- return resultArray[0];
- },
- };
- public changeRequirement = {
- async sendTransactionAsync(
- _required: BigNumber,
- txData: Partial<TxData> = {},
- ): Promise<string> {
- const self = this as any as AssetProxyOwnerContract;
- const abiEncoder = self._lookupAbiEncoder('changeRequirement(uint256)');
- const encodedData = abiEncoder.encode([_required
- ], {optimize: false});
- const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
- {
- to: self.address,
- ...txData,
- data: encodedData,
- },
- self._web3Wrapper.getContractDefaults(),
- self.changeRequirement.estimateGasAsync.bind(
- self,
- _required
- ),
- );
- const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults);
- return txHash;
- },
- async estimateGasAsync(
- _required: BigNumber,
- txData: Partial<TxData> = {},
- ): Promise<number> {
- const self = this as any as AssetProxyOwnerContract;
- const abiEncoder = self._lookupAbiEncoder('changeRequirement(uint256)');
- const encodedData = abiEncoder.encode([_required
- ]);
- const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
- {
- to: self.address,
- ...txData,
- data: encodedData,
- },
- self._web3Wrapper.getContractDefaults(),
- );
- const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
- return gas;
- },
- getABIEncodedTransactionData(
- _required: BigNumber,
- ): string {
- const self = this as any as AssetProxyOwnerContract;
- const abiEncoder = self._lookupAbiEncoder('changeRequirement(uint256)');
- const abiEncodedTransactionData = abiEncoder.encode([_required
- ]);
- return abiEncodedTransactionData;
- },
- async callAsync(
- _required: BigNumber,
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<void
- > {
- const self = this as any as AssetProxyOwnerContract;
- const functionSignature = 'changeRequirement(uint256)';
- const abiEncoder = self._lookupAbiEncoder(functionSignature);
- const encodedData = abiEncoder.encode([_required
- ]);
- const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
- {
- to: self.address,
- ...callData,
- data: encodedData,
- },
- self._web3Wrapper.getContractDefaults(),
- );
- const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
- BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
- return resultArray;
- },
- };
- public confirmTransaction = {
- async sendTransactionAsync(
- transactionId: BigNumber,
- txData: Partial<TxData> = {},
- ): Promise<string> {
- const self = this as any as AssetProxyOwnerContract;
- const abiEncoder = self._lookupAbiEncoder('confirmTransaction(uint256)');
- const encodedData = abiEncoder.encode([transactionId
- ], {optimize: false});
- const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
- {
- to: self.address,
- ...txData,
- data: encodedData,
- },
- self._web3Wrapper.getContractDefaults(),
- self.confirmTransaction.estimateGasAsync.bind(
- self,
- transactionId
- ),
- );
- const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults);
- return txHash;
- },
- async estimateGasAsync(
- transactionId: BigNumber,
- txData: Partial<TxData> = {},
- ): Promise<number> {
- const self = this as any as AssetProxyOwnerContract;
- const abiEncoder = self._lookupAbiEncoder('confirmTransaction(uint256)');
- const encodedData = abiEncoder.encode([transactionId
- ]);
- const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
- {
- to: self.address,
- ...txData,
- data: encodedData,
- },
- self._web3Wrapper.getContractDefaults(),
- );
- const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
- return gas;
- },
- getABIEncodedTransactionData(
- transactionId: BigNumber,
- ): string {
- const self = this as any as AssetProxyOwnerContract;
- const abiEncoder = self._lookupAbiEncoder('confirmTransaction(uint256)');
- const abiEncodedTransactionData = abiEncoder.encode([transactionId
- ]);
- return abiEncodedTransactionData;
- },
- async callAsync(
- transactionId: BigNumber,
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<void
- > {
- const self = this as any as AssetProxyOwnerContract;
- const functionSignature = 'confirmTransaction(uint256)';
- const abiEncoder = self._lookupAbiEncoder(functionSignature);
- const encodedData = abiEncoder.encode([transactionId
- ]);
- const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
- {
- to: self.address,
- ...callData,
- data: encodedData,
- },
- self._web3Wrapper.getContractDefaults(),
- );
- const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
- BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
- return resultArray;
- },
- };
- public submitTransaction = {
- async sendTransactionAsync(
- destination: string,
- value: BigNumber,
- data: string,
- txData: Partial<TxData> = {},
- ): Promise<string> {
- const self = this as any as AssetProxyOwnerContract;
- const abiEncoder = self._lookupAbiEncoder('submitTransaction(address,uint256,bytes)');
- const encodedData = abiEncoder.encode([destination,
- value,
- data
- ], {optimize: false});
- const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
- {
- to: self.address,
- ...txData,
- data: encodedData,
- },
- self._web3Wrapper.getContractDefaults(),
- self.submitTransaction.estimateGasAsync.bind(
- self,
- destination,
- value,
- data
- ),
- );
- const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults);
- return txHash;
- },
- async estimateGasAsync(
- destination: string,
- value: BigNumber,
- data: string,
- txData: Partial<TxData> = {},
- ): Promise<number> {
- const self = this as any as AssetProxyOwnerContract;
- const abiEncoder = self._lookupAbiEncoder('submitTransaction(address,uint256,bytes)');
- const encodedData = abiEncoder.encode([destination,
- value,
- data
- ]);
- const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
- {
- to: self.address,
- ...txData,
- data: encodedData,
- },
- self._web3Wrapper.getContractDefaults(),
- );
- const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
- return gas;
- },
- getABIEncodedTransactionData(
- destination: string,
- value: BigNumber,
- data: string,
- ): string {
- const self = this as any as AssetProxyOwnerContract;
- const abiEncoder = self._lookupAbiEncoder('submitTransaction(address,uint256,bytes)');
- const abiEncodedTransactionData = abiEncoder.encode([destination,
- value,
- data
- ]);
- return abiEncodedTransactionData;
- },
- async callAsync(
- destination: string,
- value: BigNumber,
- data: string,
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<BigNumber
- > {
- const self = this as any as AssetProxyOwnerContract;
- const functionSignature = 'submitTransaction(address,uint256,bytes)';
- const abiEncoder = self._lookupAbiEncoder(functionSignature);
- const encodedData = abiEncoder.encode([destination,
- value,
- data
- ]);
- const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
- {
- to: self.address,
- ...callData,
- data: encodedData,
- },
- self._web3Wrapper.getContractDefaults(),
- );
- const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
- BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
- return resultArray[0];
- },
- };
- public confirmationTimes = {
- async callAsync(
- index_0: BigNumber,
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<BigNumber
- > {
- const self = this as any as AssetProxyOwnerContract;
- const functionSignature = 'confirmationTimes(uint256)';
- const abiEncoder = self._lookupAbiEncoder(functionSignature);
- const encodedData = abiEncoder.encode([index_0
- ]);
- const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
- {
- to: self.address,
- ...callData,
- data: encodedData,
- },
- self._web3Wrapper.getContractDefaults(),
- );
- const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
- BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
- return resultArray[0];
- },
- };
- public MAX_OWNER_COUNT = {
- async callAsync(
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<BigNumber
- > {
- const self = this as any as AssetProxyOwnerContract;
- const functionSignature = 'MAX_OWNER_COUNT()';
- const abiEncoder = self._lookupAbiEncoder(functionSignature);
- const encodedData = abiEncoder.encode([]);
- const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
- {
- to: self.address,
- ...callData,
- data: encodedData,
- },
- self._web3Wrapper.getContractDefaults(),
- );
- const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
- BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
- return resultArray[0];
- },
- };
- public required = {
- async callAsync(
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<BigNumber
- > {
- const self = this as any as AssetProxyOwnerContract;
- const functionSignature = 'required()';
- const abiEncoder = self._lookupAbiEncoder(functionSignature);
- const encodedData = abiEncoder.encode([]);
- const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
- {
- to: self.address,
- ...callData,
- data: encodedData,
- },
- self._web3Wrapper.getContractDefaults(),
- );
- const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
- BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
- return resultArray[0];
- },
- };
- public replaceOwner = {
- async sendTransactionAsync(
- owner: string,
- newOwner: string,
- txData: Partial<TxData> = {},
- ): Promise<string> {
- const self = this as any as AssetProxyOwnerContract;
- const abiEncoder = self._lookupAbiEncoder('replaceOwner(address,address)');
- const encodedData = abiEncoder.encode([owner,
- newOwner
- ], {optimize: false});
- const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
- {
- to: self.address,
- ...txData,
- data: encodedData,
- },
- self._web3Wrapper.getContractDefaults(),
- self.replaceOwner.estimateGasAsync.bind(
- self,
- owner,
- newOwner
- ),
- );
- const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults);
- return txHash;
- },
- async estimateGasAsync(
- owner: string,
- newOwner: string,
- txData: Partial<TxData> = {},
- ): Promise<number> {
- const self = this as any as AssetProxyOwnerContract;
- const abiEncoder = self._lookupAbiEncoder('replaceOwner(address,address)');
- const encodedData = abiEncoder.encode([owner,
- newOwner
- ]);
- const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
- {
- to: self.address,
- ...txData,
- data: encodedData,
- },
- self._web3Wrapper.getContractDefaults(),
- );
- const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
- return gas;
- },
- getABIEncodedTransactionData(
- owner: string,
- newOwner: string,
- ): string {
- const self = this as any as AssetProxyOwnerContract;
- const abiEncoder = self._lookupAbiEncoder('replaceOwner(address,address)');
- const abiEncodedTransactionData = abiEncoder.encode([owner,
- newOwner
- ]);
- return abiEncodedTransactionData;
- },
- async callAsync(
- owner: string,
- newOwner: string,
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<void
- > {
- const self = this as any as AssetProxyOwnerContract;
- const functionSignature = 'replaceOwner(address,address)';
- const abiEncoder = self._lookupAbiEncoder(functionSignature);
- const encodedData = abiEncoder.encode([owner,
- newOwner
- ]);
- const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
- {
- to: self.address,
- ...callData,
- data: encodedData,
- },
- self._web3Wrapper.getContractDefaults(),
- );
- const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
- BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
- return resultArray;
- },
- };
- public executeTransaction = {
- async sendTransactionAsync(
- transactionId: BigNumber,
- txData: Partial<TxData> = {},
- ): Promise<string> {
- const self = this as any as AssetProxyOwnerContract;
- const abiEncoder = self._lookupAbiEncoder('executeTransaction(uint256)');
- const encodedData = abiEncoder.encode([transactionId
- ], {optimize: false});
- const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
- {
- to: self.address,
- ...txData,
- data: encodedData,
- },
- self._web3Wrapper.getContractDefaults(),
- self.executeTransaction.estimateGasAsync.bind(
- self,
- transactionId
- ),
- );
- const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults);
- return txHash;
- },
- async estimateGasAsync(
- transactionId: BigNumber,
- txData: Partial<TxData> = {},
- ): Promise<number> {
- const self = this as any as AssetProxyOwnerContract;
- const abiEncoder = self._lookupAbiEncoder('executeTransaction(uint256)');
- const encodedData = abiEncoder.encode([transactionId
- ]);
- const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
- {
- to: self.address,
- ...txData,
- data: encodedData,
- },
- self._web3Wrapper.getContractDefaults(),
- );
- const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
- return gas;
- },
- getABIEncodedTransactionData(
- transactionId: BigNumber,
- ): string {
- const self = this as any as AssetProxyOwnerContract;
- const abiEncoder = self._lookupAbiEncoder('executeTransaction(uint256)');
- const abiEncodedTransactionData = abiEncoder.encode([transactionId
- ]);
- return abiEncodedTransactionData;
- },
- async callAsync(
- transactionId: BigNumber,
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<void
- > {
- const self = this as any as AssetProxyOwnerContract;
- const functionSignature = 'executeTransaction(uint256)';
- const abiEncoder = self._lookupAbiEncoder(functionSignature);
- const encodedData = abiEncoder.encode([transactionId
- ]);
- const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
- {
- to: self.address,
- ...callData,
- data: encodedData,
- },
- self._web3Wrapper.getContractDefaults(),
- );
- const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
- BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
- return resultArray;
- },
- };
- public static async deployFrom0xArtifactAsync(
- artifact: ContractArtifact | SimpleContractArtifact,
- provider: Provider,
- txDefaults: Partial<TxData>,
- _owners: string[],
- _assetProxyContracts: string[],
- _required: BigNumber,
- _secondsTimeLocked: BigNumber,
- ): Promise<AssetProxyOwnerContract> {
- if (_.isUndefined(artifact.compilerOutput)) {
- throw new Error('Compiler output not found in the artifact file');
- }
- const bytecode = artifact.compilerOutput.evm.bytecode.object;
- const abi = artifact.compilerOutput.abi;
- return AssetProxyOwnerContract.deployAsync(bytecode, abi, provider, txDefaults, _owners,
-_assetProxyContracts,
-_required,
-_secondsTimeLocked
-);
- }
- public static async deployAsync(
- bytecode: string,
- abi: ContractAbi,
- provider: Provider,
- txDefaults: Partial<TxData>,
- _owners: string[],
- _assetProxyContracts: string[],
- _required: BigNumber,
- _secondsTimeLocked: BigNumber,
- ): Promise<AssetProxyOwnerContract> {
- const constructorAbi = BaseContract._lookupConstructorAbi(abi);
- [_owners,
-_assetProxyContracts,
-_required,
-_secondsTimeLocked
-] = BaseContract._formatABIDataItemList(
- constructorAbi.inputs,
- [_owners,
-_assetProxyContracts,
-_required,
-_secondsTimeLocked
-],
- BaseContract._bigNumberToString,
- );
- const iface = new ethers.utils.Interface(abi);
- const deployInfo = iface.deployFunction;
- const txData = deployInfo.encode(bytecode, [_owners,
-_assetProxyContracts,
-_required,
-_secondsTimeLocked
-]);
- const web3Wrapper = new Web3Wrapper(provider);
- const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
- {data: txData},
- txDefaults,
- web3Wrapper.estimateGasAsync.bind(web3Wrapper),
- );
- const txHash = await web3Wrapper.sendTransactionAsync(txDataWithDefaults);
- logUtils.log(`transactionHash: ${txHash}`);
- const txReceipt = await web3Wrapper.awaitTransactionSuccessAsync(txHash);
- logUtils.log(`AssetProxyOwner successfully deployed at ${txReceipt.contractAddress}`);
- const contractInstance = new AssetProxyOwnerContract(abi, txReceipt.contractAddress as string, provider, txDefaults);
- contractInstance.constructorArgs = [_owners,
-_assetProxyContracts,
-_required,
-_secondsTimeLocked
-];
- return contractInstance;
- }
- constructor(abi: ContractAbi, address: string, provider: Provider, txDefaults?: Partial<TxData>) {
- super('AssetProxyOwner', abi, address, provider, txDefaults);
- classUtils.bindAll(this, ['_abiEncoderByFunctionSignature', 'address', 'abi', '_web3Wrapper']);
- }
-} // tslint:disable:max-file-line-count
-// tslint:enable:no-unbound-method