Compare commits
45 Commits
@0x/migrat
...
@0x/contra
Author | SHA1 | Date | |
---|---|---|---|
|
ec92cea598 | ||
|
0e25f8ba32 | ||
|
23602ec6b4 | ||
|
f4da2a129d | ||
|
ab6938f614 | ||
|
09ec6d637b | ||
|
703e8e06a3 | ||
|
47f30d097a | ||
|
5c18b394a4 | ||
|
fb5afafbbe | ||
|
b3f71af850 | ||
|
093fb6e68d | ||
|
a8ae2b7355 | ||
|
d45f64ab06 | ||
|
050343c97a | ||
|
64f5aaccd7 | ||
|
856472452a | ||
|
f06e7a511e | ||
|
f6bd8c939c | ||
|
d09040d1d3 | ||
|
00fcdbd43a | ||
|
4dfd91e2df | ||
|
50f86dd61b | ||
|
9c219159c6 | ||
|
e1195a3444 | ||
|
7fe4a03683 | ||
|
803505cacc | ||
|
e05e118bd2 | ||
|
c883f5ea41 | ||
|
0567b3332b | ||
|
cc2833b372 | ||
|
0165d67dc1 | ||
|
1a4489b96a | ||
|
1ecc4a14ca | ||
|
9eba6d7146 | ||
|
3724ac4b67 | ||
|
d912175a7a | ||
|
5f23eee6dc | ||
|
5fe607557d | ||
|
5d6584b0eb | ||
|
7bdb77d93f | ||
|
2530d47fde | ||
|
c5c8506cc6 | ||
|
dbef531d66 | ||
|
4e9c9ca079 |
@@ -28,7 +28,7 @@ jobs:
|
||||
name: yarn
|
||||
command: yarn --frozen-lockfile --ignore-engines install || yarn --frozen-lockfile --ignore-engines install
|
||||
- setup_remote_docker
|
||||
- run: yarn build:ci:no_website
|
||||
- run: yarn build:ci
|
||||
- run: yarn build:ts
|
||||
- save_cache:
|
||||
key: repo-{{ .Environment.CIRCLE_SHA1 }}
|
||||
@@ -38,16 +38,6 @@ jobs:
|
||||
path: ~/repo/packages/abi-gen/test-cli/output
|
||||
- store_artifacts:
|
||||
path: ~/repo/packages/abi-gen-wrappers/generated_docs
|
||||
build-website:
|
||||
resource_class: medium+
|
||||
docker:
|
||||
- image: nikolaik/python-nodejs:python3.7-nodejs8
|
||||
working_directory: ~/repo
|
||||
steps:
|
||||
- restore_cache:
|
||||
keys:
|
||||
- repo-{{ .Environment.CIRCLE_SHA1 }}
|
||||
- run: cd packages/website && yarn build:prod
|
||||
test-contracts-ganache:
|
||||
resource_class: medium+
|
||||
docker:
|
||||
@@ -292,6 +282,7 @@ jobs:
|
||||
./install
|
||||
./lint
|
||||
static-tests:
|
||||
resource_class: large
|
||||
working_directory: ~/repo
|
||||
docker:
|
||||
- image: nikolaik/python-nodejs:python3.7-nodejs8
|
||||
@@ -382,9 +373,6 @@ workflows:
|
||||
main:
|
||||
jobs:
|
||||
- build
|
||||
- build-website:
|
||||
requires:
|
||||
- build
|
||||
- test-contracts-ganache:
|
||||
requires:
|
||||
- build
|
||||
|
2
.github/autolabeler.yml
vendored
2
.github/autolabeler.yml
vendored
@@ -13,7 +13,6 @@ contracts: ['contracts']
|
||||
@0x/instant: ['packages/instant']
|
||||
@0x/abi-gen-templates: ['packages/abi-gen-templates']
|
||||
@0x/abi-gen: ['packages/abi-gen']
|
||||
@0x/website: ['packages/website']
|
||||
@0x/sol-coverage: ['packages/sol-coverage']
|
||||
@0x/sol-profiler: ['packages/sol-profiler']
|
||||
@0x/sol-trace: ['packages/sol-trace']
|
||||
@@ -34,6 +33,5 @@ contracts: ['contracts']
|
||||
@0x/ethereum-types: ['ethereum-types']
|
||||
@0x/connect: ['packages/connect']
|
||||
@0x/fill-scenarios: ['packages/fill-scenarios']
|
||||
@0x/dev-tools-pages: ['packages/dev-tools-pages']
|
||||
@0x/testnet-faucets: ['packages/testnet-faucets']
|
||||
@0x/monorepo-scripts: ['packages/monorepo-scripts']
|
||||
|
6
.gitignore
vendored
6
.gitignore
vendored
@@ -78,9 +78,6 @@ TODO.md
|
||||
# VSCode file
|
||||
.vscode
|
||||
|
||||
packages/website/public/bundle*
|
||||
packages/dev-tools-pages/public/bundle*
|
||||
|
||||
# server cli
|
||||
packages/testnet-faucets/server/
|
||||
|
||||
@@ -154,5 +151,4 @@ python-packages/json_schemas/src/zero_ex/json_schemas/schemas
|
||||
# Doc README copy
|
||||
packages/*/docs/README.md
|
||||
|
||||
# Tool MDX files authoritatively live on S3
|
||||
packages/website/mdx/tools/*
|
||||
.DS_Store
|
||||
|
@@ -28,7 +28,6 @@ lib
|
||||
/packages/json-schemas/schemas
|
||||
/python-packages/json_schemas/src/zero_ex/json_schemas/schemas
|
||||
/packages/sra-spec/public/
|
||||
/packages/dev-tools-pages/ts/**/data.json
|
||||
package.json
|
||||
scripts/postpublish_utils.js
|
||||
packages/sol-coverage/test/fixtures/artifacts
|
||||
@@ -39,4 +38,3 @@ packages/abi-gen/test-cli/fixtures/artifacts/AbiGenDummy.json
|
||||
packages/abi-gen/test-cli/fixtures/artifacts/LibDummy.json
|
||||
packages/abi-gen/test-cli/fixtures/artifacts/TestLibDummy.json
|
||||
packages/*/docs
|
||||
packages/website/mdx/tools
|
||||
|
@@ -7,7 +7,6 @@
|
||||
# Website
|
||||
packages/asset-buyer/ @BMillman19 @fragosti @steveklebanoff
|
||||
packages/instant/ @BMillman19 @fragosti @steveklebanoff
|
||||
packages/website/ @BMillman19 @fragosti @fabioberger @steveklebanoff
|
||||
|
||||
# Dev tools & setup
|
||||
.circleci/ @LogvinovLeon
|
||||
|
@@ -29,9 +29,9 @@ ALL PRs should be opened against `development`.
|
||||
|
||||
Branch names should be prefixed with `fix`, `feature` or `refactor`.
|
||||
|
||||
- e.g `fix/broken-wiki-link`
|
||||
- e.g `fix/missing-import`
|
||||
- If the PR only edits a single package, add it's name too
|
||||
- e.g `fix/website/broken-wiki-link`
|
||||
- e.g `fix/subproviders/missing-import`
|
||||
|
||||
### CHANGELOGs
|
||||
|
||||
|
@@ -100,7 +100,6 @@ These packages are all under development. See [/contracts/README.md](/contracts/
|
||||
| -------------------------------------------------- | -------------------------------------------------------------------------------- |
|
||||
| [`@0x/instant`](/packages/instant) | A free and flexible way to offer simple crypto purchasing in any app or website. |
|
||||
| [`@0x/testnet-faucets`](/packages/testnet-faucets) | A faucet micro-service that dispenses test ERC20 tokens or Ether |
|
||||
| [`@0x/website`](/packages/website) | 0x website |
|
||||
|
||||
## Usage
|
||||
|
||||
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1568744790,
|
||||
"version": "2.2.8",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1567521715,
|
||||
"version": "2.2.7",
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v2.2.8 - _September 17, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v2.2.7 - _September 3, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/contracts-asset-proxy",
|
||||
"version": "2.2.7",
|
||||
"version": "2.2.8",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -47,11 +47,11 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/contracts/protocol/README.md",
|
||||
"devDependencies": {
|
||||
"@0x/abi-gen": "^4.2.0",
|
||||
"@0x/contracts-gen": "^1.0.14",
|
||||
"@0x/contracts-test-utils": "^3.1.15",
|
||||
"@0x/dev-utils": "^2.3.2",
|
||||
"@0x/sol-compiler": "^3.1.14",
|
||||
"@0x/abi-gen": "^4.2.1",
|
||||
"@0x/contracts-gen": "^1.0.15",
|
||||
"@0x/contracts-test-utils": "^3.1.16",
|
||||
"@0x/dev-utils": "^2.3.3",
|
||||
"@0x/sol-compiler": "^3.1.15",
|
||||
"@0x/tslint-config": "^3.0.1",
|
||||
"@types/lodash": "4.14.104",
|
||||
"@types/mocha": "^5.2.7",
|
||||
@@ -69,17 +69,17 @@
|
||||
"typescript": "3.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0x/base-contract": "^5.3.3",
|
||||
"@0x/contracts-erc1155": "^1.1.14",
|
||||
"@0x/contracts-erc20": "^2.2.13",
|
||||
"@0x/contracts-erc721": "^2.1.14",
|
||||
"@0x/contracts-utils": "^3.2.3",
|
||||
"@0x/order-utils": "^8.3.1",
|
||||
"@0x/types": "^2.4.2",
|
||||
"@0x/typescript-typings": "^4.2.5",
|
||||
"@0x/utils": "^4.5.1",
|
||||
"@0x/web3-wrapper": "^6.0.12",
|
||||
"ethereum-types": "^2.1.5",
|
||||
"@0x/base-contract": "^5.4.0",
|
||||
"@0x/contracts-erc1155": "^1.1.15",
|
||||
"@0x/contracts-erc20": "^2.2.14",
|
||||
"@0x/contracts-erc721": "^2.1.15",
|
||||
"@0x/contracts-utils": "^3.2.4",
|
||||
"@0x/order-utils": "^8.4.0",
|
||||
"@0x/types": "^2.4.3",
|
||||
"@0x/typescript-typings": "^4.3.0",
|
||||
"@0x/utils": "^4.5.2",
|
||||
"@0x/web3-wrapper": "^6.0.13",
|
||||
"ethereum-types": "^2.1.6",
|
||||
"ethereumjs-util": "^5.1.1",
|
||||
"lodash": "^4.17.11"
|
||||
},
|
||||
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1568744790,
|
||||
"version": "2.0.13",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1567521715,
|
||||
"version": "2.0.12",
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v2.0.13 - _September 17, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v2.0.12 - _September 3, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/contracts-coordinator",
|
||||
"version": "2.0.12",
|
||||
"version": "2.0.13",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -47,11 +47,11 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/contracts/extensions/README.md",
|
||||
"devDependencies": {
|
||||
"@0x/abi-gen": "^4.2.0",
|
||||
"@0x/contracts-gen": "^1.0.14",
|
||||
"@0x/contracts-test-utils": "^3.1.15",
|
||||
"@0x/dev-utils": "^2.3.2",
|
||||
"@0x/sol-compiler": "^3.1.14",
|
||||
"@0x/abi-gen": "^4.2.1",
|
||||
"@0x/contracts-gen": "^1.0.15",
|
||||
"@0x/contracts-test-utils": "^3.1.16",
|
||||
"@0x/dev-utils": "^2.3.3",
|
||||
"@0x/sol-compiler": "^3.1.15",
|
||||
"@0x/tslint-config": "^3.0.1",
|
||||
"@types/lodash": "4.14.104",
|
||||
"@types/mocha": "^5.2.7",
|
||||
@@ -69,18 +69,18 @@
|
||||
"typescript": "3.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0x/base-contract": "^5.3.3",
|
||||
"@0x/contracts-asset-proxy": "^2.2.7",
|
||||
"@0x/contracts-erc20": "^2.2.13",
|
||||
"@0x/contracts-exchange": "^2.1.13",
|
||||
"@0x/contracts-exchange-libs": "^3.0.7",
|
||||
"@0x/contracts-utils": "^3.2.3",
|
||||
"@0x/order-utils": "^8.3.1",
|
||||
"@0x/types": "^2.4.2",
|
||||
"@0x/typescript-typings": "^4.2.5",
|
||||
"@0x/utils": "^4.5.1",
|
||||
"@0x/web3-wrapper": "^6.0.12",
|
||||
"ethereum-types": "^2.1.5",
|
||||
"@0x/base-contract": "^5.4.0",
|
||||
"@0x/contracts-asset-proxy": "^2.2.8",
|
||||
"@0x/contracts-erc20": "^2.2.14",
|
||||
"@0x/contracts-exchange": "^2.1.14",
|
||||
"@0x/contracts-exchange-libs": "^3.0.8",
|
||||
"@0x/contracts-utils": "^3.2.4",
|
||||
"@0x/order-utils": "^8.4.0",
|
||||
"@0x/types": "^2.4.3",
|
||||
"@0x/typescript-typings": "^4.3.0",
|
||||
"@0x/utils": "^4.5.2",
|
||||
"@0x/web3-wrapper": "^6.0.13",
|
||||
"ethereum-types": "^2.1.6",
|
||||
"ethereumjs-util": "^5.1.1",
|
||||
"lodash": "^4.17.11"
|
||||
},
|
||||
|
@@ -104,8 +104,7 @@ describe('Mixins tests', () => {
|
||||
transaction.signature.length - 2,
|
||||
)}${illegalSignatureByte}`;
|
||||
const transactionHash = transactionHashUtils.getTransactionHashHex(transaction);
|
||||
expectContractCallFailedAsync(
|
||||
mixins.getSignerAddress.callAsync(transactionHash, transaction.signature),
|
||||
expect(mixins.getSignerAddress.callAsync(transactionHash, transaction.signature)).to.be.rejectedWith(
|
||||
RevertReason.SignatureIllegal,
|
||||
);
|
||||
});
|
||||
@@ -115,8 +114,7 @@ describe('Mixins tests', () => {
|
||||
const invalidSignatureByte = ethUtil.toBuffer(SignatureType.Invalid).toString('hex');
|
||||
transaction.signature = `0x${invalidSignatureByte}`;
|
||||
const transactionHash = transactionHashUtils.getTransactionHashHex(transaction);
|
||||
expectContractCallFailedAsync(
|
||||
mixins.getSignerAddress.callAsync(transactionHash, transaction.signature),
|
||||
expect(mixins.getSignerAddress.callAsync(transactionHash, transaction.signature)).to.be.rejectedWith(
|
||||
RevertReason.SignatureInvalid,
|
||||
);
|
||||
});
|
||||
@@ -129,8 +127,7 @@ describe('Mixins tests', () => {
|
||||
transaction.signature.length - 2,
|
||||
)}${invalidSignatureByte}`;
|
||||
const transactionHash = transactionHashUtils.getTransactionHashHex(transaction);
|
||||
expectContractCallFailedAsync(
|
||||
mixins.getSignerAddress.callAsync(transactionHash, transaction.signature),
|
||||
expect(mixins.getSignerAddress.callAsync(transactionHash, transaction.signature)).to.be.rejectedWith(
|
||||
RevertReason.SignatureUnsupported,
|
||||
);
|
||||
});
|
||||
@@ -193,8 +190,7 @@ describe('Mixins tests', () => {
|
||||
});
|
||||
it('should revert if data is less than 4 bytes long', async () => {
|
||||
const data = '0x010203';
|
||||
await expectContractCallFailedAsync(
|
||||
mixins.decodeOrdersFromFillData.callAsync(data),
|
||||
expect(mixins.decodeOrdersFromFillData.callAsync(data)).to.be.rejectedWith(
|
||||
RevertReason.LibBytesGreaterOrEqualTo4LengthRequired,
|
||||
);
|
||||
});
|
||||
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1568744790,
|
||||
"version": "0.0.10",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1567521715,
|
||||
"version": "0.0.9",
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v0.0.10 - _September 17, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v0.0.9 - _September 3, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/contracts-dev-utils",
|
||||
"version": "0.0.9",
|
||||
"version": "0.0.10",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -47,11 +47,11 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/contracts/dev-utils/README.md",
|
||||
"devDependencies": {
|
||||
"@0x/abi-gen": "^4.2.0",
|
||||
"@0x/contracts-gen": "^1.0.14",
|
||||
"@0x/contracts-test-utils": "^3.1.15",
|
||||
"@0x/dev-utils": "^2.3.2",
|
||||
"@0x/sol-compiler": "^3.1.14",
|
||||
"@0x/abi-gen": "^4.2.1",
|
||||
"@0x/contracts-gen": "^1.0.15",
|
||||
"@0x/contracts-test-utils": "^3.1.16",
|
||||
"@0x/dev-utils": "^2.3.3",
|
||||
"@0x/sol-compiler": "^3.1.15",
|
||||
"@0x/tslint-config": "^3.0.1",
|
||||
"@types/lodash": "4.14.104",
|
||||
"@types/mocha": "^5.2.7",
|
||||
@@ -69,20 +69,20 @@
|
||||
"typescript": "3.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0x/base-contract": "^5.3.3",
|
||||
"@0x/contracts-asset-proxy": "^2.2.7",
|
||||
"@0x/contracts-erc1155": "^1.1.14",
|
||||
"@0x/contracts-erc20": "^2.2.13",
|
||||
"@0x/contracts-erc721": "^2.1.14",
|
||||
"@0x/contracts-exchange": "^2.1.13",
|
||||
"@0x/contracts-exchange-libs": "^3.0.7",
|
||||
"@0x/contracts-utils": "^3.2.3",
|
||||
"@0x/order-utils": "^8.3.1",
|
||||
"@0x/types": "^2.4.2",
|
||||
"@0x/typescript-typings": "^4.2.5",
|
||||
"@0x/utils": "^4.5.1",
|
||||
"@0x/web3-wrapper": "^6.0.12",
|
||||
"ethereum-types": "^2.1.5",
|
||||
"@0x/base-contract": "^5.4.0",
|
||||
"@0x/contracts-asset-proxy": "^2.2.8",
|
||||
"@0x/contracts-erc1155": "^1.1.15",
|
||||
"@0x/contracts-erc20": "^2.2.14",
|
||||
"@0x/contracts-erc721": "^2.1.15",
|
||||
"@0x/contracts-exchange": "^2.1.14",
|
||||
"@0x/contracts-exchange-libs": "^3.0.8",
|
||||
"@0x/contracts-utils": "^3.2.4",
|
||||
"@0x/order-utils": "^8.4.0",
|
||||
"@0x/types": "^2.4.3",
|
||||
"@0x/typescript-typings": "^4.3.0",
|
||||
"@0x/utils": "^4.5.2",
|
||||
"@0x/web3-wrapper": "^6.0.13",
|
||||
"ethereum-types": "^2.1.6",
|
||||
"ethereumjs-util": "^5.1.1"
|
||||
},
|
||||
"publishConfig": {
|
||||
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1568744790,
|
||||
"version": "1.1.15",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1567521715,
|
||||
"version": "1.1.14",
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v1.1.15 - _September 17, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.1.14 - _September 3, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/contracts-erc1155",
|
||||
"version": "1.1.14",
|
||||
"version": "1.1.15",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -47,10 +47,10 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/contracts/tokens/README.md",
|
||||
"devDependencies": {
|
||||
"@0x/abi-gen": "^4.2.0",
|
||||
"@0x/contracts-gen": "^1.0.14",
|
||||
"@0x/dev-utils": "^2.3.2",
|
||||
"@0x/sol-compiler": "^3.1.14",
|
||||
"@0x/abi-gen": "^4.2.1",
|
||||
"@0x/contracts-gen": "^1.0.15",
|
||||
"@0x/dev-utils": "^2.3.3",
|
||||
"@0x/sol-compiler": "^3.1.15",
|
||||
"@0x/tslint-config": "^3.0.1",
|
||||
"@types/lodash": "4.14.104",
|
||||
"@types/mocha": "^5.2.7",
|
||||
@@ -68,14 +68,14 @@
|
||||
"typescript": "3.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0x/base-contract": "^5.3.3",
|
||||
"@0x/contracts-test-utils": "^3.1.15",
|
||||
"@0x/contracts-utils": "^3.2.3",
|
||||
"@0x/types": "^2.4.2",
|
||||
"@0x/typescript-typings": "^4.2.5",
|
||||
"@0x/utils": "^4.5.1",
|
||||
"@0x/web3-wrapper": "^6.0.12",
|
||||
"ethereum-types": "^2.1.5",
|
||||
"@0x/base-contract": "^5.4.0",
|
||||
"@0x/contracts-test-utils": "^3.1.16",
|
||||
"@0x/contracts-utils": "^3.2.4",
|
||||
"@0x/types": "^2.4.3",
|
||||
"@0x/typescript-typings": "^4.3.0",
|
||||
"@0x/utils": "^4.5.2",
|
||||
"@0x/web3-wrapper": "^6.0.13",
|
||||
"ethereum-types": "^2.1.6",
|
||||
"lodash": "^4.17.11"
|
||||
},
|
||||
"publishConfig": {
|
||||
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1568744790,
|
||||
"version": "2.2.14",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1567521715,
|
||||
"version": "2.2.13",
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v2.2.14 - _September 17, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v2.2.13 - _September 3, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/contracts-erc20",
|
||||
"version": "2.2.13",
|
||||
"version": "2.2.14",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -47,11 +47,11 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/contracts/tokens/README.md",
|
||||
"devDependencies": {
|
||||
"@0x/abi-gen": "^4.2.0",
|
||||
"@0x/contracts-gen": "^1.0.14",
|
||||
"@0x/contracts-test-utils": "^3.1.15",
|
||||
"@0x/dev-utils": "^2.3.2",
|
||||
"@0x/sol-compiler": "^3.1.14",
|
||||
"@0x/abi-gen": "^4.2.1",
|
||||
"@0x/contracts-gen": "^1.0.15",
|
||||
"@0x/contracts-test-utils": "^3.1.16",
|
||||
"@0x/dev-utils": "^2.3.3",
|
||||
"@0x/sol-compiler": "^3.1.15",
|
||||
"@0x/tslint-config": "^3.0.1",
|
||||
"@types/lodash": "4.14.104",
|
||||
"@types/mocha": "^5.2.7",
|
||||
@@ -69,13 +69,13 @@
|
||||
"typescript": "3.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0x/base-contract": "^5.3.3",
|
||||
"@0x/contracts-utils": "^3.2.3",
|
||||
"@0x/types": "^2.4.2",
|
||||
"@0x/typescript-typings": "^4.2.5",
|
||||
"@0x/utils": "^4.5.1",
|
||||
"@0x/web3-wrapper": "^6.0.12",
|
||||
"ethereum-types": "^2.1.5",
|
||||
"@0x/base-contract": "^5.4.0",
|
||||
"@0x/contracts-utils": "^3.2.4",
|
||||
"@0x/types": "^2.4.3",
|
||||
"@0x/typescript-typings": "^4.3.0",
|
||||
"@0x/utils": "^4.5.2",
|
||||
"@0x/web3-wrapper": "^6.0.13",
|
||||
"ethereum-types": "^2.1.6",
|
||||
"lodash": "^4.17.11"
|
||||
},
|
||||
"publishConfig": {
|
||||
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1568744790,
|
||||
"version": "2.1.15",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1567521715,
|
||||
"version": "2.1.14",
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v2.1.15 - _September 17, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v2.1.14 - _September 3, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/contracts-erc721",
|
||||
"version": "2.1.14",
|
||||
"version": "2.1.15",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -47,11 +47,11 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/contracts/tokens/README.md",
|
||||
"devDependencies": {
|
||||
"@0x/abi-gen": "^4.2.0",
|
||||
"@0x/contracts-gen": "^1.0.14",
|
||||
"@0x/contracts-test-utils": "^3.1.15",
|
||||
"@0x/dev-utils": "^2.3.2",
|
||||
"@0x/sol-compiler": "^3.1.14",
|
||||
"@0x/abi-gen": "^4.2.1",
|
||||
"@0x/contracts-gen": "^1.0.15",
|
||||
"@0x/contracts-test-utils": "^3.1.16",
|
||||
"@0x/dev-utils": "^2.3.3",
|
||||
"@0x/sol-compiler": "^3.1.15",
|
||||
"@0x/tslint-config": "^3.0.1",
|
||||
"@types/lodash": "4.14.104",
|
||||
"@types/mocha": "^5.2.7",
|
||||
@@ -69,13 +69,13 @@
|
||||
"typescript": "3.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0x/base-contract": "^5.3.3",
|
||||
"@0x/contracts-utils": "^3.2.3",
|
||||
"@0x/types": "^2.4.2",
|
||||
"@0x/typescript-typings": "^4.2.5",
|
||||
"@0x/utils": "^4.5.1",
|
||||
"@0x/web3-wrapper": "^6.0.12",
|
||||
"ethereum-types": "^2.1.5",
|
||||
"@0x/base-contract": "^5.4.0",
|
||||
"@0x/contracts-utils": "^3.2.4",
|
||||
"@0x/types": "^2.4.3",
|
||||
"@0x/typescript-typings": "^4.3.0",
|
||||
"@0x/utils": "^4.5.2",
|
||||
"@0x/web3-wrapper": "^6.0.13",
|
||||
"ethereum-types": "^2.1.6",
|
||||
"lodash": "^4.17.11"
|
||||
},
|
||||
"publishConfig": {
|
||||
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1568744790,
|
||||
"version": "3.0.12",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1567521715,
|
||||
"version": "3.0.11",
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v3.0.12 - _September 17, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v3.0.11 - _September 3, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/contracts-exchange-forwarder",
|
||||
"version": "3.0.11",
|
||||
"version": "3.0.12",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -46,11 +46,11 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/contracts/extensions/README.md",
|
||||
"devDependencies": {
|
||||
"@0x/abi-gen": "^4.2.0",
|
||||
"@0x/contracts-gen": "^1.0.14",
|
||||
"@0x/contracts-test-utils": "^3.1.15",
|
||||
"@0x/dev-utils": "^2.3.2",
|
||||
"@0x/sol-compiler": "^3.1.14",
|
||||
"@0x/abi-gen": "^4.2.1",
|
||||
"@0x/contracts-gen": "^1.0.15",
|
||||
"@0x/contracts-test-utils": "^3.1.16",
|
||||
"@0x/dev-utils": "^2.3.3",
|
||||
"@0x/sol-compiler": "^3.1.15",
|
||||
"@0x/tslint-config": "^3.0.1",
|
||||
"@types/lodash": "4.14.104",
|
||||
"@types/mocha": "^5.2.7",
|
||||
@@ -68,19 +68,19 @@
|
||||
"typescript": "3.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0x/base-contract": "^5.3.3",
|
||||
"@0x/contracts-asset-proxy": "^2.2.7",
|
||||
"@0x/contracts-erc20": "^2.2.13",
|
||||
"@0x/contracts-erc721": "^2.1.14",
|
||||
"@0x/contracts-exchange": "^2.1.13",
|
||||
"@0x/contracts-exchange-libs": "^3.0.7",
|
||||
"@0x/contracts-utils": "^3.2.3",
|
||||
"@0x/order-utils": "^8.3.1",
|
||||
"@0x/types": "^2.4.2",
|
||||
"@0x/typescript-typings": "^4.2.5",
|
||||
"@0x/utils": "^4.5.1",
|
||||
"@0x/web3-wrapper": "^6.0.12",
|
||||
"ethereum-types": "^2.1.5",
|
||||
"@0x/base-contract": "^5.4.0",
|
||||
"@0x/contracts-asset-proxy": "^2.2.8",
|
||||
"@0x/contracts-erc20": "^2.2.14",
|
||||
"@0x/contracts-erc721": "^2.1.15",
|
||||
"@0x/contracts-exchange": "^2.1.14",
|
||||
"@0x/contracts-exchange-libs": "^3.0.8",
|
||||
"@0x/contracts-utils": "^3.2.4",
|
||||
"@0x/order-utils": "^8.4.0",
|
||||
"@0x/types": "^2.4.3",
|
||||
"@0x/typescript-typings": "^4.3.0",
|
||||
"@0x/utils": "^4.5.2",
|
||||
"@0x/web3-wrapper": "^6.0.13",
|
||||
"ethereum-types": "^2.1.6",
|
||||
"lodash": "^4.17.11"
|
||||
},
|
||||
"publishConfig": {
|
||||
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1568744790,
|
||||
"version": "3.0.8",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1567521715,
|
||||
"version": "3.0.7",
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v3.0.8 - _September 17, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v3.0.7 - _September 3, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/contracts-exchange-libs",
|
||||
"version": "3.0.7",
|
||||
"version": "3.0.8",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -47,11 +47,11 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/contracts/libs/README.md",
|
||||
"devDependencies": {
|
||||
"@0x/abi-gen": "^4.2.0",
|
||||
"@0x/contracts-gen": "^1.0.14",
|
||||
"@0x/contracts-test-utils": "^3.1.15",
|
||||
"@0x/dev-utils": "^2.3.2",
|
||||
"@0x/sol-compiler": "^3.1.14",
|
||||
"@0x/abi-gen": "^4.2.1",
|
||||
"@0x/contracts-gen": "^1.0.15",
|
||||
"@0x/contracts-test-utils": "^3.1.16",
|
||||
"@0x/dev-utils": "^2.3.3",
|
||||
"@0x/sol-compiler": "^3.1.15",
|
||||
"@0x/tslint-config": "^3.0.1",
|
||||
"@types/lodash": "4.14.104",
|
||||
"@types/mocha": "^5.2.7",
|
||||
@@ -69,14 +69,14 @@
|
||||
"typescript": "3.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0x/base-contract": "^5.3.3",
|
||||
"@0x/contracts-utils": "^3.2.3",
|
||||
"@0x/order-utils": "^8.3.1",
|
||||
"@0x/types": "^2.4.2",
|
||||
"@0x/typescript-typings": "^4.2.5",
|
||||
"@0x/utils": "^4.5.1",
|
||||
"@0x/web3-wrapper": "^6.0.12",
|
||||
"ethereum-types": "^2.1.5",
|
||||
"@0x/base-contract": "^5.4.0",
|
||||
"@0x/contracts-utils": "^3.2.4",
|
||||
"@0x/order-utils": "^8.4.0",
|
||||
"@0x/types": "^2.4.3",
|
||||
"@0x/typescript-typings": "^4.3.0",
|
||||
"@0x/utils": "^4.5.2",
|
||||
"@0x/web3-wrapper": "^6.0.13",
|
||||
"ethereum-types": "^2.1.6",
|
||||
"lodash": "^4.17.11"
|
||||
},
|
||||
"publishConfig": {
|
||||
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1568744790,
|
||||
"version": "2.1.14",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1567521715,
|
||||
"version": "2.1.13",
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v2.1.14 - _September 17, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v2.1.13 - _September 3, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/contracts-exchange",
|
||||
"version": "2.1.13",
|
||||
"version": "2.1.14",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -47,11 +47,11 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/contracts/protocol/README.md",
|
||||
"devDependencies": {
|
||||
"@0x/abi-gen": "^4.2.0",
|
||||
"@0x/contracts-gen": "^1.0.14",
|
||||
"@0x/contracts-test-utils": "^3.1.15",
|
||||
"@0x/dev-utils": "^2.3.2",
|
||||
"@0x/sol-compiler": "^3.1.14",
|
||||
"@0x/abi-gen": "^4.2.1",
|
||||
"@0x/contracts-gen": "^1.0.15",
|
||||
"@0x/contracts-test-utils": "^3.1.16",
|
||||
"@0x/dev-utils": "^2.3.3",
|
||||
"@0x/sol-compiler": "^3.1.15",
|
||||
"@0x/tslint-config": "^3.0.1",
|
||||
"@types/lodash": "4.14.104",
|
||||
"@types/mocha": "^5.2.7",
|
||||
@@ -69,19 +69,19 @@
|
||||
"typescript": "3.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0x/base-contract": "^5.3.3",
|
||||
"@0x/contracts-asset-proxy": "^2.2.7",
|
||||
"@0x/contracts-erc1155": "^1.1.14",
|
||||
"@0x/contracts-erc20": "^2.2.13",
|
||||
"@0x/contracts-erc721": "^2.1.14",
|
||||
"@0x/contracts-exchange-libs": "^3.0.7",
|
||||
"@0x/contracts-utils": "^3.2.3",
|
||||
"@0x/order-utils": "^8.3.1",
|
||||
"@0x/types": "^2.4.2",
|
||||
"@0x/typescript-typings": "^4.2.5",
|
||||
"@0x/utils": "^4.5.1",
|
||||
"@0x/web3-wrapper": "^6.0.12",
|
||||
"ethereum-types": "^2.1.5",
|
||||
"@0x/base-contract": "^5.4.0",
|
||||
"@0x/contracts-asset-proxy": "^2.2.8",
|
||||
"@0x/contracts-erc1155": "^1.1.15",
|
||||
"@0x/contracts-erc20": "^2.2.14",
|
||||
"@0x/contracts-erc721": "^2.1.15",
|
||||
"@0x/contracts-exchange-libs": "^3.0.8",
|
||||
"@0x/contracts-utils": "^3.2.4",
|
||||
"@0x/order-utils": "^8.4.0",
|
||||
"@0x/types": "^2.4.3",
|
||||
"@0x/typescript-typings": "^4.3.0",
|
||||
"@0x/utils": "^4.5.2",
|
||||
"@0x/web3-wrapper": "^6.0.13",
|
||||
"ethereum-types": "^2.1.6",
|
||||
"ethereumjs-util": "^5.1.1",
|
||||
"lodash": "^4.17.11"
|
||||
},
|
||||
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1568744790,
|
||||
"version": "4.0.8",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1567521715,
|
||||
"version": "4.0.7",
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v4.0.8 - _September 17, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v4.0.7 - _September 3, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -18,7 +18,7 @@
|
||||
|
||||
pragma solidity ^0.5.5;
|
||||
|
||||
import "@0x/contract-utils/contracts/src/interfaces/IOwnable.sol";
|
||||
import "@0x/contracts-utils/contracts/src/interfaces/IOwnable.sol";
|
||||
import "./IMatchOrders.sol";
|
||||
import "./IAssets.sol";
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/contracts-extensions",
|
||||
"version": "4.0.7",
|
||||
"version": "4.0.8",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -47,11 +47,11 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/contracts/extensions/README.md",
|
||||
"devDependencies": {
|
||||
"@0x/abi-gen": "^4.2.0",
|
||||
"@0x/contracts-gen": "^1.0.14",
|
||||
"@0x/contracts-test-utils": "^3.1.15",
|
||||
"@0x/dev-utils": "^2.3.2",
|
||||
"@0x/sol-compiler": "^3.1.14",
|
||||
"@0x/abi-gen": "^4.2.1",
|
||||
"@0x/contracts-gen": "^1.0.15",
|
||||
"@0x/contracts-test-utils": "^3.1.16",
|
||||
"@0x/dev-utils": "^2.3.3",
|
||||
"@0x/sol-compiler": "^3.1.15",
|
||||
"@0x/tslint-config": "^3.0.1",
|
||||
"@types/lodash": "4.14.104",
|
||||
"@types/mocha": "^5.2.7",
|
||||
@@ -69,19 +69,19 @@
|
||||
"typescript": "3.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0x/base-contract": "^5.3.3",
|
||||
"@0x/contracts-asset-proxy": "^2.2.7",
|
||||
"@0x/contracts-erc20": "^2.2.13",
|
||||
"@0x/contracts-erc721": "^2.1.14",
|
||||
"@0x/contracts-exchange": "^2.1.13",
|
||||
"@0x/contracts-exchange-libs": "^3.0.7",
|
||||
"@0x/contracts-utils": "^3.2.3",
|
||||
"@0x/order-utils": "^8.3.1",
|
||||
"@0x/types": "^2.4.2",
|
||||
"@0x/typescript-typings": "^4.2.5",
|
||||
"@0x/utils": "^4.5.1",
|
||||
"@0x/web3-wrapper": "^6.0.12",
|
||||
"ethereum-types": "^2.1.5",
|
||||
"@0x/base-contract": "^5.4.0",
|
||||
"@0x/contracts-asset-proxy": "^2.2.8",
|
||||
"@0x/contracts-erc20": "^2.2.14",
|
||||
"@0x/contracts-erc721": "^2.1.15",
|
||||
"@0x/contracts-exchange": "^2.1.14",
|
||||
"@0x/contracts-exchange-libs": "^3.0.8",
|
||||
"@0x/contracts-utils": "^3.2.4",
|
||||
"@0x/order-utils": "^8.4.0",
|
||||
"@0x/types": "^2.4.3",
|
||||
"@0x/typescript-typings": "^4.3.0",
|
||||
"@0x/utils": "^4.5.2",
|
||||
"@0x/web3-wrapper": "^6.0.13",
|
||||
"ethereum-types": "^2.1.6",
|
||||
"lodash": "^4.17.11"
|
||||
},
|
||||
"publishConfig": {
|
||||
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1568744790,
|
||||
"version": "3.1.14",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1567521715,
|
||||
"version": "3.1.13",
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v3.1.14 - _September 17, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v3.1.13 - _September 3, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/contracts-multisig",
|
||||
"version": "3.1.13",
|
||||
"version": "3.1.14",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -47,11 +47,11 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/contracts/multisig/README.md",
|
||||
"devDependencies": {
|
||||
"@0x/abi-gen": "^4.2.0",
|
||||
"@0x/contracts-gen": "^1.0.14",
|
||||
"@0x/contracts-test-utils": "^3.1.15",
|
||||
"@0x/dev-utils": "^2.3.2",
|
||||
"@0x/sol-compiler": "^3.1.14",
|
||||
"@0x/abi-gen": "^4.2.1",
|
||||
"@0x/contracts-gen": "^1.0.15",
|
||||
"@0x/contracts-test-utils": "^3.1.16",
|
||||
"@0x/dev-utils": "^2.3.3",
|
||||
"@0x/sol-compiler": "^3.1.15",
|
||||
"@0x/tslint-config": "^3.0.1",
|
||||
"@types/lodash": "4.14.104",
|
||||
"@types/mocha": "^5.2.7",
|
||||
@@ -69,15 +69,15 @@
|
||||
"typescript": "3.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0x/base-contract": "^5.3.3",
|
||||
"@0x/contracts-asset-proxy": "^2.2.7",
|
||||
"@0x/contracts-erc20": "^2.2.13",
|
||||
"@0x/base-contract": "^5.4.0",
|
||||
"@0x/contracts-asset-proxy": "^2.2.8",
|
||||
"@0x/contracts-erc20": "^2.2.14",
|
||||
"@0x/contracts-utils": "2.0.1",
|
||||
"@0x/types": "^2.4.2",
|
||||
"@0x/typescript-typings": "^4.2.5",
|
||||
"@0x/utils": "^4.5.1",
|
||||
"@0x/web3-wrapper": "^6.0.12",
|
||||
"ethereum-types": "^2.1.5",
|
||||
"@0x/types": "^2.4.3",
|
||||
"@0x/typescript-typings": "^4.3.0",
|
||||
"@0x/utils": "^4.5.2",
|
||||
"@0x/web3-wrapper": "^6.0.13",
|
||||
"ethereum-types": "^2.1.6",
|
||||
"lodash": "^4.17.11"
|
||||
},
|
||||
"publishConfig": {
|
||||
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1568744790,
|
||||
"version": "3.1.16",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1567521715,
|
||||
"version": "3.1.15",
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v3.1.16 - _September 17, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v3.1.15 - _September 3, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/contracts-test-utils",
|
||||
"version": "3.1.15",
|
||||
"version": "3.1.16",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -42,18 +42,18 @@
|
||||
"typescript": "3.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0x/dev-utils": "^2.3.2",
|
||||
"@0x/order-utils": "^8.3.1",
|
||||
"@0x/sol-compiler": "^3.1.14",
|
||||
"@0x/sol-coverage": "^3.0.11",
|
||||
"@0x/sol-profiler": "^3.1.13",
|
||||
"@0x/sol-trace": "^2.0.19",
|
||||
"@0x/subproviders": "^5.0.3",
|
||||
"@0x/dev-utils": "^2.3.3",
|
||||
"@0x/order-utils": "^8.4.0",
|
||||
"@0x/sol-compiler": "^3.1.15",
|
||||
"@0x/sol-coverage": "^3.0.12",
|
||||
"@0x/sol-profiler": "^3.1.14",
|
||||
"@0x/sol-trace": "^2.0.20",
|
||||
"@0x/subproviders": "^5.0.4",
|
||||
"@0x/tslint-config": "^3.0.1",
|
||||
"@0x/types": "^2.4.2",
|
||||
"@0x/typescript-typings": "^4.2.5",
|
||||
"@0x/utils": "^4.5.1",
|
||||
"@0x/web3-wrapper": "^6.0.12",
|
||||
"@0x/types": "^2.4.3",
|
||||
"@0x/typescript-typings": "^4.3.0",
|
||||
"@0x/utils": "^4.5.2",
|
||||
"@0x/web3-wrapper": "^6.0.13",
|
||||
"@types/bn.js": "^4.11.0",
|
||||
"@types/js-combinatorics": "^0.5.29",
|
||||
"@types/lodash": "4.14.104",
|
||||
@@ -63,7 +63,7 @@
|
||||
"chai-as-promised": "^7.1.0",
|
||||
"chai-bignumber": "^3.0.0",
|
||||
"dirty-chai": "^2.0.1",
|
||||
"ethereum-types": "^2.1.5",
|
||||
"ethereum-types": "^2.1.6",
|
||||
"ethereumjs-util": "^5.1.1",
|
||||
"ethers": "~4.0.4",
|
||||
"js-combinatorics": "^0.5.3",
|
||||
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1568744790,
|
||||
"version": "3.2.4",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1567521715,
|
||||
"version": "3.2.3",
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v3.2.4 - _September 17, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v3.2.3 - _September 3, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/contracts-utils",
|
||||
"version": "3.2.3",
|
||||
"version": "3.2.4",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -47,11 +47,11 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/contracts/utils/README.md",
|
||||
"devDependencies": {
|
||||
"@0x/abi-gen": "^4.2.0",
|
||||
"@0x/contracts-gen": "^1.0.14",
|
||||
"@0x/contracts-test-utils": "^3.1.15",
|
||||
"@0x/dev-utils": "^2.3.2",
|
||||
"@0x/sol-compiler": "^3.1.14",
|
||||
"@0x/abi-gen": "^4.2.1",
|
||||
"@0x/contracts-gen": "^1.0.15",
|
||||
"@0x/contracts-test-utils": "^3.1.16",
|
||||
"@0x/dev-utils": "^2.3.3",
|
||||
"@0x/sol-compiler": "^3.1.15",
|
||||
"@0x/tslint-config": "^3.0.1",
|
||||
"@types/bn.js": "^4.11.0",
|
||||
"@types/lodash": "4.14.104",
|
||||
@@ -70,14 +70,14 @@
|
||||
"typescript": "3.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0x/base-contract": "^5.3.3",
|
||||
"@0x/order-utils": "^8.3.1",
|
||||
"@0x/types": "^2.4.2",
|
||||
"@0x/typescript-typings": "^4.2.5",
|
||||
"@0x/utils": "^4.5.1",
|
||||
"@0x/web3-wrapper": "^6.0.12",
|
||||
"@0x/base-contract": "^5.4.0",
|
||||
"@0x/order-utils": "^8.4.0",
|
||||
"@0x/types": "^2.4.3",
|
||||
"@0x/typescript-typings": "^4.3.0",
|
||||
"@0x/utils": "^4.5.2",
|
||||
"@0x/web3-wrapper": "^6.0.13",
|
||||
"bn.js": "^4.11.8",
|
||||
"ethereum-types": "^2.1.5",
|
||||
"ethereum-types": "^2.1.6",
|
||||
"ethereumjs-util": "^5.1.1",
|
||||
"lodash": "^4.17.11"
|
||||
},
|
||||
|
@@ -1,11 +1,4 @@
|
||||
import {
|
||||
addressUtils,
|
||||
chaiSetup,
|
||||
expectContractCallFailedAsync,
|
||||
provider,
|
||||
txDefaults,
|
||||
web3Wrapper,
|
||||
} from '@0x/contracts-test-utils';
|
||||
import { addressUtils, chaiSetup, provider, txDefaults, web3Wrapper } from '@0x/contracts-test-utils';
|
||||
import { BlockchainLifecycle } from '@0x/dev-utils';
|
||||
import { RevertReason } from '@0x/types';
|
||||
import { BigNumber } from '@0x/utils';
|
||||
@@ -55,8 +48,7 @@ describe('LibAddressArray', () => {
|
||||
const arr = _.times(3, () => addressUtils.generatePseudoRandomAddress());
|
||||
const addr = addressUtils.generatePseudoRandomAddress();
|
||||
const freeMemOffset = new BigNumber(-1);
|
||||
return expectContractCallFailedAsync(
|
||||
lib.testAppendRealloc.callAsync(arr, freeMemOffset, addr),
|
||||
return expect(lib.testAppendRealloc.callAsync(arr, freeMemOffset, addr)).to.be.rejectedWith(
|
||||
RevertReason.InvalidFreeMemoryPtr,
|
||||
);
|
||||
});
|
||||
|
@@ -1,12 +1,4 @@
|
||||
import {
|
||||
chaiSetup,
|
||||
constants,
|
||||
expectContractCallFailedAsync,
|
||||
provider,
|
||||
txDefaults,
|
||||
typeEncodingUtils,
|
||||
web3Wrapper,
|
||||
} from '@0x/contracts-test-utils';
|
||||
import { chaiSetup, constants, provider, txDefaults, typeEncodingUtils, web3Wrapper } from '@0x/contracts-test-utils';
|
||||
import { BlockchainLifecycle } from '@0x/dev-utils';
|
||||
import { generatePseudoRandomSalt } from '@0x/order-utils';
|
||||
import { RevertReason } from '@0x/types';
|
||||
@@ -111,8 +103,7 @@ describe('LibBytes', () => {
|
||||
|
||||
describe('popLastByte', () => {
|
||||
it('should revert if length is 0', async () => {
|
||||
return expectContractCallFailedAsync(
|
||||
libBytes.publicPopLastByte.callAsync(constants.NULL_BYTES),
|
||||
expect(libBytes.publicPopLastByte.callAsync(constants.NULL_BYTES)).to.be.rejectedWith(
|
||||
RevertReason.LibBytesGreaterThanZeroLengthRequired,
|
||||
);
|
||||
});
|
||||
@@ -133,8 +124,7 @@ describe('LibBytes', () => {
|
||||
|
||||
describe('popLast20Bytes', () => {
|
||||
it('should revert if length is less than 20', async () => {
|
||||
return expectContractCallFailedAsync(
|
||||
libBytes.publicPopLast20Bytes.callAsync(byteArrayShorterThan20Bytes),
|
||||
expect(libBytes.publicPopLast20Bytes.callAsync(byteArrayShorterThan20Bytes)).to.be.rejectedWith(
|
||||
RevertReason.LibBytesGreaterOrEqualTo20LengthRequired,
|
||||
);
|
||||
});
|
||||
@@ -208,10 +198,9 @@ describe('LibBytes', () => {
|
||||
|
||||
describe('deepCopyBytes', () => {
|
||||
it('should revert if dest is shorter than source', async () => {
|
||||
return expectContractCallFailedAsync(
|
||||
return expect(
|
||||
libBytes.publicDeepCopyBytes.callAsync(byteArrayShorterThan32Bytes, byteArrayLongerThan32Bytes),
|
||||
RevertReason.LibBytesGreaterOrEqualToSourceBytesLengthRequired,
|
||||
);
|
||||
).to.be.rejectedWith(RevertReason.LibBytesGreaterOrEqualToSourceBytesLengthRequired);
|
||||
});
|
||||
it('should overwrite dest with source if source and dest have equal length', async () => {
|
||||
const zeroedByteArrayLongerThan32Bytes = `0x${_.repeat('0', byteArrayLongerThan32Bytes.length - 2)}`;
|
||||
@@ -261,16 +250,14 @@ describe('LibBytes', () => {
|
||||
it('should fail if the byte array is too short to hold an address', async () => {
|
||||
const shortByteArray = '0xabcdef';
|
||||
const offset = new BigNumber(0);
|
||||
return expectContractCallFailedAsync(
|
||||
libBytes.publicReadAddress.callAsync(shortByteArray, offset),
|
||||
return expect(libBytes.publicReadAddress.callAsync(shortByteArray, offset)).to.be.rejectedWith(
|
||||
RevertReason.LibBytesGreaterOrEqualTo20LengthRequired,
|
||||
);
|
||||
});
|
||||
it('should fail if the length between the offset and end of the byte array is too short to hold an address', async () => {
|
||||
const byteArray = testAddress;
|
||||
const badOffset = new BigNumber(ethUtil.toBuffer(byteArray).byteLength);
|
||||
return expectContractCallFailedAsync(
|
||||
libBytes.publicReadAddress.callAsync(byteArray, badOffset),
|
||||
return expect(libBytes.publicReadAddress.callAsync(byteArray, badOffset)).to.be.rejectedWith(
|
||||
RevertReason.LibBytesGreaterOrEqualTo20LengthRequired,
|
||||
);
|
||||
});
|
||||
@@ -305,16 +292,14 @@ describe('LibBytes', () => {
|
||||
});
|
||||
it('should fail if the byte array is too short to hold an address', async () => {
|
||||
const offset = new BigNumber(0);
|
||||
return expectContractCallFailedAsync(
|
||||
return expect(
|
||||
libBytes.publicWriteAddress.callAsync(byteArrayShorterThan20Bytes, offset, testAddress),
|
||||
RevertReason.LibBytesGreaterOrEqualTo20LengthRequired,
|
||||
);
|
||||
).to.be.rejectedWith(RevertReason.LibBytesGreaterOrEqualTo20LengthRequired);
|
||||
});
|
||||
it('should fail if the length between the offset and end of the byte array is too short to hold an address', async () => {
|
||||
const byteArray = byteArrayLongerThan32Bytes;
|
||||
const badOffset = new BigNumber(ethUtil.toBuffer(byteArray).byteLength);
|
||||
return expectContractCallFailedAsync(
|
||||
libBytes.publicWriteAddress.callAsync(byteArray, badOffset, testAddress),
|
||||
return expect(libBytes.publicWriteAddress.callAsync(byteArray, badOffset, testAddress)).to.be.rejectedWith(
|
||||
RevertReason.LibBytesGreaterOrEqualTo20LengthRequired,
|
||||
);
|
||||
});
|
||||
@@ -337,15 +322,13 @@ describe('LibBytes', () => {
|
||||
});
|
||||
it('should fail if the byte array is too short to hold a bytes32', async () => {
|
||||
const offset = new BigNumber(0);
|
||||
return expectContractCallFailedAsync(
|
||||
libBytes.publicReadBytes32.callAsync(byteArrayShorterThan32Bytes, offset),
|
||||
return expect(libBytes.publicReadBytes32.callAsync(byteArrayShorterThan32Bytes, offset)).to.be.rejectedWith(
|
||||
RevertReason.LibBytesGreaterOrEqualTo32LengthRequired,
|
||||
);
|
||||
});
|
||||
it('should fail if the length between the offset and end of the byte array is too short to hold a bytes32', async () => {
|
||||
const badOffset = new BigNumber(ethUtil.toBuffer(testBytes32).byteLength);
|
||||
return expectContractCallFailedAsync(
|
||||
libBytes.publicReadBytes32.callAsync(testBytes32, badOffset),
|
||||
return expect(libBytes.publicReadBytes32.callAsync(testBytes32, badOffset)).to.be.rejectedWith(
|
||||
RevertReason.LibBytesGreaterOrEqualTo32LengthRequired,
|
||||
);
|
||||
});
|
||||
@@ -380,16 +363,14 @@ describe('LibBytes', () => {
|
||||
});
|
||||
it('should fail if the byte array is too short to hold a bytes32', async () => {
|
||||
const offset = new BigNumber(0);
|
||||
return expectContractCallFailedAsync(
|
||||
return expect(
|
||||
libBytes.publicWriteBytes32.callAsync(byteArrayShorterThan32Bytes, offset, testBytes32),
|
||||
RevertReason.LibBytesGreaterOrEqualTo32LengthRequired,
|
||||
);
|
||||
).to.be.rejectedWith(RevertReason.LibBytesGreaterOrEqualTo32LengthRequired);
|
||||
});
|
||||
it('should fail if the length between the offset and end of the byte array is too short to hold a bytes32', async () => {
|
||||
const byteArray = byteArrayLongerThan32Bytes;
|
||||
const badOffset = new BigNumber(ethUtil.toBuffer(byteArray).byteLength);
|
||||
return expectContractCallFailedAsync(
|
||||
libBytes.publicWriteBytes32.callAsync(byteArray, badOffset, testBytes32),
|
||||
return expect(libBytes.publicWriteBytes32.callAsync(byteArray, badOffset, testBytes32)).to.be.rejectedWith(
|
||||
RevertReason.LibBytesGreaterOrEqualTo32LengthRequired,
|
||||
);
|
||||
});
|
||||
@@ -416,8 +397,7 @@ describe('LibBytes', () => {
|
||||
});
|
||||
it('should fail if the byte array is too short to hold a uint256', async () => {
|
||||
const offset = new BigNumber(0);
|
||||
return expectContractCallFailedAsync(
|
||||
libBytes.publicReadUint256.callAsync(byteArrayShorterThan32Bytes, offset),
|
||||
return expect(libBytes.publicReadUint256.callAsync(byteArrayShorterThan32Bytes, offset)).to.be.rejectedWith(
|
||||
RevertReason.LibBytesGreaterOrEqualTo32LengthRequired,
|
||||
);
|
||||
});
|
||||
@@ -426,8 +406,7 @@ describe('LibBytes', () => {
|
||||
const testUint256AsBuffer = ethUtil.toBuffer(formattedTestUint256);
|
||||
const byteArray = ethUtil.bufferToHex(testUint256AsBuffer);
|
||||
const badOffset = new BigNumber(testUint256AsBuffer.byteLength);
|
||||
return expectContractCallFailedAsync(
|
||||
libBytes.publicReadUint256.callAsync(byteArray, badOffset),
|
||||
return expect(libBytes.publicReadUint256.callAsync(byteArray, badOffset)).to.be.rejectedWith(
|
||||
RevertReason.LibBytesGreaterOrEqualTo32LengthRequired,
|
||||
);
|
||||
});
|
||||
@@ -466,16 +445,14 @@ describe('LibBytes', () => {
|
||||
});
|
||||
it('should fail if the byte array is too short to hold a uint256', async () => {
|
||||
const offset = new BigNumber(0);
|
||||
return expectContractCallFailedAsync(
|
||||
return expect(
|
||||
libBytes.publicWriteUint256.callAsync(byteArrayShorterThan32Bytes, offset, testUint256),
|
||||
RevertReason.LibBytesGreaterOrEqualTo32LengthRequired,
|
||||
);
|
||||
).to.be.rejectedWith(RevertReason.LibBytesGreaterOrEqualTo32LengthRequired);
|
||||
});
|
||||
it('should fail if the length between the offset and end of the byte array is too short to hold a uint256', async () => {
|
||||
const byteArray = byteArrayLongerThan32Bytes;
|
||||
const badOffset = new BigNumber(ethUtil.toBuffer(byteArray).byteLength);
|
||||
return expectContractCallFailedAsync(
|
||||
libBytes.publicWriteUint256.callAsync(byteArray, badOffset, testUint256),
|
||||
return expect(libBytes.publicWriteUint256.callAsync(byteArray, badOffset, testUint256)).to.be.rejectedWith(
|
||||
RevertReason.LibBytesGreaterOrEqualTo32LengthRequired,
|
||||
);
|
||||
});
|
||||
@@ -486,8 +463,7 @@ describe('LibBytes', () => {
|
||||
it('should revert if byte array has a length < 4', async () => {
|
||||
const byteArrayLessThan4Bytes = '0x010101';
|
||||
const offset = new BigNumber(0);
|
||||
return expectContractCallFailedAsync(
|
||||
libBytes.publicReadBytes4.callAsync(byteArrayLessThan4Bytes, offset),
|
||||
return expect(libBytes.publicReadBytes4.callAsync(byteArrayLessThan4Bytes, offset)).to.be.rejectedWith(
|
||||
RevertReason.LibBytesGreaterOrEqualTo4LengthRequired,
|
||||
);
|
||||
});
|
||||
@@ -512,8 +488,7 @@ describe('LibBytes', () => {
|
||||
});
|
||||
it('should fail if the length between the offset and end of the byte array is too short to hold a bytes4', async () => {
|
||||
const badOffset = new BigNumber(ethUtil.toBuffer(testBytes4).byteLength);
|
||||
return expectContractCallFailedAsync(
|
||||
libBytes.publicReadBytes4.callAsync(testBytes4, badOffset),
|
||||
return expect(libBytes.publicReadBytes4.callAsync(testBytes4, badOffset)).to.be.rejectedWith(
|
||||
RevertReason.LibBytesGreaterOrEqualTo4LengthRequired,
|
||||
);
|
||||
});
|
||||
@@ -562,29 +537,25 @@ describe('LibBytes', () => {
|
||||
it('should fail if the byte array is too short to hold the length of a nested byte array', async () => {
|
||||
// The length of the nested array is 32 bytes. By storing less than 32 bytes, a length cannot be read.
|
||||
const offset = new BigNumber(0);
|
||||
return expectContractCallFailedAsync(
|
||||
return expect(
|
||||
libBytes.publicReadBytesWithLength.callAsync(byteArrayShorterThan32Bytes, offset),
|
||||
RevertReason.LibBytesGreaterOrEqualTo32LengthRequired,
|
||||
);
|
||||
).to.be.rejectedWith(RevertReason.LibBytesGreaterOrEqualTo32LengthRequired);
|
||||
});
|
||||
it('should fail if we store a nested byte array length, without a nested byte array', async () => {
|
||||
const offset = new BigNumber(0);
|
||||
return expectContractCallFailedAsync(
|
||||
libBytes.publicReadBytesWithLength.callAsync(testBytes32, offset),
|
||||
return expect(libBytes.publicReadBytesWithLength.callAsync(testBytes32, offset)).to.be.rejectedWith(
|
||||
RevertReason.LibBytesGreaterOrEqualToNestedBytesLengthRequired,
|
||||
);
|
||||
});
|
||||
it('should fail if the length between the offset and end of the byte array is too short to hold the length of a nested byte array', async () => {
|
||||
const badOffset = new BigNumber(ethUtil.toBuffer(byteArrayShorterThan32Bytes).byteLength);
|
||||
return expectContractCallFailedAsync(
|
||||
return expect(
|
||||
libBytes.publicReadBytesWithLength.callAsync(byteArrayShorterThan32Bytes, badOffset),
|
||||
RevertReason.LibBytesGreaterOrEqualTo32LengthRequired,
|
||||
);
|
||||
).to.be.rejectedWith(RevertReason.LibBytesGreaterOrEqualTo32LengthRequired);
|
||||
});
|
||||
it('should fail if the length between the offset and end of the byte array is too short to hold the nested byte array', async () => {
|
||||
const badOffset = new BigNumber(ethUtil.toBuffer(testBytes32).byteLength);
|
||||
return expectContractCallFailedAsync(
|
||||
libBytes.publicReadBytesWithLength.callAsync(testBytes32, badOffset),
|
||||
return expect(libBytes.publicReadBytesWithLength.callAsync(testBytes32, badOffset)).to.be.rejectedWith(
|
||||
RevertReason.LibBytesGreaterOrEqualTo32LengthRequired,
|
||||
);
|
||||
});
|
||||
@@ -695,18 +666,16 @@ describe('LibBytes', () => {
|
||||
it('should fail if the byte array is too short to hold the length of a nested byte array', async () => {
|
||||
const offset = new BigNumber(0);
|
||||
const emptyByteArray = ethUtil.bufferToHex(new Buffer(1));
|
||||
return expectContractCallFailedAsync(
|
||||
return expect(
|
||||
libBytes.publicWriteBytesWithLength.callAsync(emptyByteArray, offset, longData),
|
||||
RevertReason.LibBytesGreaterOrEqualToNestedBytesLengthRequired,
|
||||
);
|
||||
).to.be.rejectedWith(RevertReason.LibBytesGreaterOrEqualToNestedBytesLengthRequired);
|
||||
});
|
||||
it('should fail if the length between the offset and end of the byte array is too short to hold the length of a nested byte array', async () => {
|
||||
const emptyByteArray = ethUtil.bufferToHex(new Buffer(shortTestBytesAsBuffer.byteLength));
|
||||
const badOffset = new BigNumber(ethUtil.toBuffer(shortTestBytesAsBuffer).byteLength);
|
||||
return expectContractCallFailedAsync(
|
||||
return expect(
|
||||
libBytes.publicWriteBytesWithLength.callAsync(emptyByteArray, badOffset, shortData),
|
||||
RevertReason.LibBytesGreaterOrEqualToNestedBytesLengthRequired,
|
||||
);
|
||||
).to.be.rejectedWith(RevertReason.LibBytesGreaterOrEqualToNestedBytesLengthRequired);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -880,8 +849,7 @@ describe('LibBytes', () => {
|
||||
it('should revert if from > to', async () => {
|
||||
const from = new BigNumber(1);
|
||||
const to = new BigNumber(0);
|
||||
expectContractCallFailedAsync(
|
||||
libBytes.publicSlice.callAsync(byteArrayLongerThan32Bytes, from, to),
|
||||
expect(libBytes.publicSlice.callAsync(byteArrayLongerThan32Bytes, from, to)).to.be.rejectedWith(
|
||||
RevertReason.FromLessThanToRequired,
|
||||
);
|
||||
});
|
||||
@@ -904,8 +872,7 @@ describe('LibBytes', () => {
|
||||
const byteLen = (byteArrayLongerThan32Bytes.length - 2) / 2;
|
||||
const from = new BigNumber(0);
|
||||
const to = new BigNumber(byteLen).plus(1);
|
||||
expectContractCallFailedAsync(
|
||||
libBytes.publicSlice.callAsync(byteArrayLongerThan32Bytes, from, to),
|
||||
expect(libBytes.publicSlice.callAsync(byteArrayLongerThan32Bytes, from, to)).to.be.rejectedWith(
|
||||
RevertReason.ToLessThanLengthRequired,
|
||||
);
|
||||
});
|
||||
@@ -931,8 +898,7 @@ describe('LibBytes', () => {
|
||||
it('should revert if from > to', async () => {
|
||||
const from = new BigNumber(1);
|
||||
const to = new BigNumber(0);
|
||||
expectContractCallFailedAsync(
|
||||
libBytes.publicSliceDestructive.callAsync(byteArrayLongerThan32Bytes, from, to),
|
||||
expect(libBytes.publicSliceDestructive.callAsync(byteArrayLongerThan32Bytes, from, to)).to.be.rejectedWith(
|
||||
RevertReason.FromLessThanToRequired,
|
||||
);
|
||||
});
|
||||
@@ -953,8 +919,7 @@ describe('LibBytes', () => {
|
||||
const byteLen = (byteArrayLongerThan32Bytes.length - 2) / 2;
|
||||
const from = new BigNumber(0);
|
||||
const to = new BigNumber(byteLen).plus(1);
|
||||
expectContractCallFailedAsync(
|
||||
libBytes.publicSliceDestructive.callAsync(byteArrayLongerThan32Bytes, from, to),
|
||||
expect(libBytes.publicSliceDestructive.callAsync(byteArrayLongerThan32Bytes, from, to)).to.be.rejectedWith(
|
||||
RevertReason.ToLessThanLengthRequired,
|
||||
);
|
||||
});
|
||||
|
14
package.json
14
package.json
@@ -18,7 +18,7 @@
|
||||
"test:installation": "node ./packages/monorepo-scripts/lib/test_installation.js",
|
||||
"test:installation:local": "IS_LOCAL_PUBLISH=true node ./packages/monorepo-scripts/lib/test_installation.js",
|
||||
"test:publish:circleci": "yarn npm-cli-login -u test -p test -e test@example.com -r http://localhost:4873 && IS_LOCAL_PUBLISH=true run-s script:publish test:installation:local",
|
||||
"run:publish": "run-s install:all build:monorepo_scripts script:prepublish_checks rebuild:no_website script:publish",
|
||||
"run:publish": "run-s install:all build:monorepo_scripts script:prepublish_checks rebuild script:publish",
|
||||
"run:publish:local": "IS_LOCAL_PUBLISH=true yarn run:publish",
|
||||
"script:prepublish_checks": "node ./packages/monorepo-scripts/lib/prepublish_checks.js",
|
||||
"script:publish": "node ./packages/monorepo-scripts/lib/publish.js",
|
||||
@@ -26,8 +26,7 @@
|
||||
"wsrun": "wsrun",
|
||||
"lerna": "lerna",
|
||||
"build": "lerna link && wsrun build $PKG --fast-exit -r --stages --exclude-missing",
|
||||
"build:no_website": "lerna link && wsrun build $PKG --fast-exit -r --stages --exclude @0x/website --exclude-missing",
|
||||
"build:ci:no_website": "lerna link && wsrun build:ci $PKG --fast-exit -r --stages --exclude @0x/website --exclude-missing",
|
||||
"build:ci": "lerna link && wsrun build:ci $PKG --fast-exit -r --stages --exclude-missing",
|
||||
"build:contracts": "lerna link && wsrun build -p ${npm_package_config_contractsPackages} -c --fast-exit -r --stages --exclude-missing",
|
||||
"build:monorepo_scripts": "PKG=@0x/monorepo-scripts yarn build",
|
||||
"build:ts": "tsc -b",
|
||||
@@ -39,11 +38,10 @@
|
||||
"contracts:watch": "wsrun watch $PKG --parallel --exclude-missing",
|
||||
"remove_node_modules": "lerna clean --yes; rm -rf node_modules",
|
||||
"rebuild": "run-s clean build",
|
||||
"rebuild:no_website": "run-s clean build:no_website",
|
||||
"test": "wsrun test $PKG --fast-exit --serial --exclude-missing",
|
||||
"test:contracts": "wsrun test -p ${npm_package_config_contractsPackages} -c --fast-exit --serial --exclude-missing",
|
||||
"generate_doc": "node ./packages/monorepo-scripts/lib/doc_generate.js",
|
||||
"upload_md_docs": "wsrun s3:sync_md_docs --exclude-missing",
|
||||
"upload_md_docs": "aws s3 rm --recursive s3://docs-markdown; wsrun s3:sync_md_docs --exclude-missing",
|
||||
"diff_md_docs:ci": "wsrun diff_docs --exclude-missing",
|
||||
"test:generate_docs:circleci": "for i in ${npm_package_config_packagesWithDocPages}; do yarn generate_doc --package $i || break -1; done;",
|
||||
"bundlewatch": "bundlewatch",
|
||||
@@ -54,17 +52,17 @@
|
||||
"mnemonic": "concert load couple harbor equip island argue ramp clarify fence smart topic",
|
||||
"packagesWithDocPages": "contract-wrappers 0x.js connect json-schemas subproviders web3-wrapper order-utils sol-compiler sol-coverage sol-profiler sol-trace ethereum-types asset-buyer asset-swapper migrations",
|
||||
"ignoreDependencyVersions": "@types/styled-components @types/node",
|
||||
"ignoreDependencyVersionsForPackage": "website instant dev-tools-pages contract-wrappers"
|
||||
"ignoreDependencyVersionsForPackage": "instant contract-wrappers"
|
||||
},
|
||||
"bundlewatch": {
|
||||
"files": [
|
||||
{
|
||||
"path": "packages/0x.js/_bundles/index.min.js",
|
||||
"maxSize": "800kB"
|
||||
"maxSize": "1150kB"
|
||||
},
|
||||
{
|
||||
"path": "packages/instant/umd/instant.js",
|
||||
"maxSize": "1000kB"
|
||||
"maxSize": "1350kB"
|
||||
}
|
||||
],
|
||||
"ci": {
|
||||
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1568744790,
|
||||
"version": "7.0.2",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1567521715,
|
||||
"version": "7.0.1",
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v7.0.2 - _September 17, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v7.0.1 - _September 3, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -49,6 +49,33 @@ Download the UMD module from our [releases page](https://github.com/0xProject/0x
|
||||
<script type="text/javascript" src="0x.js"></script>
|
||||
```
|
||||
|
||||
#### Webpack config
|
||||
|
||||
If bundling your project with [Webpack](https://webpack.js.org/), add the following to your `webpack.config.js`:
|
||||
|
||||
If building for web:
|
||||
|
||||
```js
|
||||
node: {
|
||||
fs: 'empty';
|
||||
}
|
||||
```
|
||||
|
||||
If building a node library:
|
||||
|
||||
```js
|
||||
externals: {
|
||||
fs: true;
|
||||
}
|
||||
```
|
||||
|
||||
`ContractWrappers` uses WebAssembly to simulate Ethereum calls. This toolchain involves generated 'glue' code that requires the `fs` built-in, but won't actually use it in a web environment. We tell Webpack not to resolve them since we won't need them. The specific dependency is [here](https://github.com/ethereumjs/rustbn.js/blob/master/lib/index.asm.js).
|
||||
|
||||
Also see:
|
||||
|
||||
- https://webpack.js.org/configuration/externals
|
||||
- https://webpack.js.org/configuration/node
|
||||
|
||||
## Contributing
|
||||
|
||||
We strongly recommend that the community help us make improvements and determine the future direction of 0x protocol. To report bugs within this package, please create an issue in this repository.
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "0x.js",
|
||||
"version": "7.0.1",
|
||||
"version": "7.0.2",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -46,10 +46,10 @@
|
||||
},
|
||||
"license": "Apache-2.0",
|
||||
"devDependencies": {
|
||||
"@0x/contract-addresses": "^3.1.0",
|
||||
"@0x/dev-utils": "^2.3.2",
|
||||
"@0x/migrations": "^4.3.1",
|
||||
"@0x/ts-doc-gen": "^0.0.21",
|
||||
"@0x/contract-addresses": "^3.2.0",
|
||||
"@0x/dev-utils": "^2.3.3",
|
||||
"@0x/migrations": "^4.3.2",
|
||||
"@0x/ts-doc-gen": "^0.0.22",
|
||||
"@0x/tslint-config": "^3.0.1",
|
||||
"@types/lodash": "4.14.104",
|
||||
"@types/mocha": "^5.2.7",
|
||||
@@ -69,6 +69,7 @@
|
||||
"shx": "^0.2.2",
|
||||
"sinon": "^4.0.0",
|
||||
"source-map-support": "^0.5.0",
|
||||
"terser-webpack-plugin": "^2.0.1",
|
||||
"tslint": "5.11.0",
|
||||
"typedoc": "^0.15.0",
|
||||
"typescript": "3.0.1",
|
||||
@@ -76,19 +77,19 @@
|
||||
"webpack": "^4.20.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0x/abi-gen-wrappers": "^5.3.1",
|
||||
"@0x/assert": "^2.1.5",
|
||||
"@0x/asset-swapper": "^1.0.3",
|
||||
"@0x/base-contract": "^5.3.3",
|
||||
"@0x/contract-wrappers": "^12.0.0",
|
||||
"@0x/order-utils": "^8.3.1",
|
||||
"@0x/subproviders": "^5.0.3",
|
||||
"@0x/types": "^2.4.2",
|
||||
"@0x/typescript-typings": "^4.2.5",
|
||||
"@0x/utils": "^4.5.1",
|
||||
"@0x/web3-wrapper": "^6.0.12",
|
||||
"@0x/abi-gen-wrappers": "^5.3.2",
|
||||
"@0x/assert": "^2.1.6",
|
||||
"@0x/asset-swapper": "^2.0.0",
|
||||
"@0x/base-contract": "^5.4.0",
|
||||
"@0x/contract-wrappers": "^12.1.0",
|
||||
"@0x/order-utils": "^8.4.0",
|
||||
"@0x/subproviders": "^5.0.4",
|
||||
"@0x/types": "^2.4.3",
|
||||
"@0x/typescript-typings": "^4.3.0",
|
||||
"@0x/utils": "^4.5.2",
|
||||
"@0x/web3-wrapper": "^6.0.13",
|
||||
"@types/web3-provider-engine": "^14.0.0",
|
||||
"ethereum-types": "^2.1.5",
|
||||
"ethereum-types": "^2.1.6",
|
||||
"ethers": "~4.0.4",
|
||||
"lodash": "^4.17.11",
|
||||
"web3-provider-engine": "14.0.6"
|
||||
|
@@ -39,6 +39,13 @@ module.exports = {
|
||||
}),
|
||||
],
|
||||
},
|
||||
// This supports the ethereumjs-vm dependency in `@0x/base-contract`
|
||||
// The .wasm 'glue' code generated by Emscripten requires these node builtins,
|
||||
// but won't actually use them in a web environment. We tell Webpack to not resolve those
|
||||
// require statements since we know we won't need them.
|
||||
externals: {
|
||||
fs: true,
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
|
@@ -1,4 +1,14 @@
|
||||
[
|
||||
{
|
||||
"version": "5.3.2",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Redirect `callAsync` to use local EVM instead of eth_call for pure functions",
|
||||
"pr": 2108
|
||||
}
|
||||
],
|
||||
"timestamp": 1568744790
|
||||
},
|
||||
{
|
||||
"timestamp": 1567521715,
|
||||
"version": "5.3.1",
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v5.3.2 - _September 17, 2019_
|
||||
|
||||
* Redirect `callAsync` to use local EVM instead of eth_call for pure functions (#2108)
|
||||
|
||||
## v5.3.1 - _September 3, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/abi-gen-wrappers",
|
||||
"version": "5.3.1",
|
||||
"version": "5.3.2",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -33,22 +33,22 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/packages/abi-gen-wrappers/README.md",
|
||||
"devDependencies": {
|
||||
"@0x/abi-gen": "^4.2.0",
|
||||
"@0x/assert": "^2.1.5",
|
||||
"@0x/json-schemas": "^4.0.1",
|
||||
"@0x/abi-gen": "^4.2.1",
|
||||
"@0x/assert": "^2.1.6",
|
||||
"@0x/json-schemas": "^4.0.2",
|
||||
"@0x/tslint-config": "^3.0.1",
|
||||
"@0x/types": "^2.4.2",
|
||||
"@0x/utils": "^4.5.1",
|
||||
"@0x/web3-wrapper": "^6.0.12",
|
||||
"ethereum-types": "^2.1.5",
|
||||
"@0x/types": "^2.4.3",
|
||||
"@0x/utils": "^4.5.2",
|
||||
"@0x/web3-wrapper": "^6.0.13",
|
||||
"ethereum-types": "^2.1.6",
|
||||
"ethers": "~4.0.4",
|
||||
"lodash": "^4.17.11",
|
||||
"shx": "^0.2.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0x/base-contract": "^5.3.3",
|
||||
"@0x/contract-addresses": "^3.1.0",
|
||||
"@0x/contract-artifacts": "^2.2.1"
|
||||
"@0x/base-contract": "^5.4.0",
|
||||
"@0x/contract-addresses": "^3.2.0",
|
||||
"@0x/contract-artifacts": "^2.2.2"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -57,19 +57,9 @@ export class CoordinatorContract extends BaseContract {
|
||||
}
|
||||
const self = (this as any) as CoordinatorContract;
|
||||
const encodedData = self._strictEncodeArguments('getSignerAddress(bytes32,bytes)', [hash, signature]);
|
||||
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
|
||||
{
|
||||
to: self.address,
|
||||
...callData,
|
||||
data: encodedData,
|
||||
},
|
||||
self._web3Wrapper.getContractDefaults(),
|
||||
);
|
||||
callDataWithDefaults.from = callDataWithDefaults.from
|
||||
? callDataWithDefaults.from.toLowerCase()
|
||||
: callDataWithDefaults.from;
|
||||
const encodedDataBytes = Buffer.from(encodedData.substr(2), 'hex');
|
||||
|
||||
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
|
||||
const rawCallResult = await self.evmExecAsync(encodedDataBytes);
|
||||
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
|
||||
const abiEncoder = self._lookupAbiEncoder('getSignerAddress(bytes32,bytes)');
|
||||
// tslint:disable boolean-naming
|
||||
@@ -83,6 +73,7 @@ export class CoordinatorContract extends BaseContract {
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @param hash Any 32 byte hash.
|
||||
* @param signature Proof that the hash has been signed by signer.
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(hash: string, signature: string): string {
|
||||
assert.isString('hash', hash);
|
||||
@@ -94,6 +85,11 @@ export class CoordinatorContract extends BaseContract {
|
||||
]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): string {
|
||||
const self = (this as any) as CoordinatorContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('getSignerAddress(bytes32,bytes)');
|
||||
@@ -101,6 +97,11 @@ export class CoordinatorContract extends BaseContract {
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<string>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): string {
|
||||
const self = (this as any) as CoordinatorContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('getSignerAddress(bytes32,bytes)');
|
||||
@@ -162,6 +163,7 @@ export class CoordinatorContract extends BaseContract {
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @param transaction 0x transaction containing salt, signerAddress, and data.
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(transaction: { salt: BigNumber; signerAddress: string; data: string }): string {
|
||||
const self = (this as any) as CoordinatorContract;
|
||||
@@ -171,13 +173,27 @@ export class CoordinatorContract extends BaseContract {
|
||||
);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): string {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): { salt: BigNumber; signerAddress: string; data: string } {
|
||||
const self = (this as any) as CoordinatorContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('getTransactionHash((uint256,address,bytes))');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<string>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<{
|
||||
salt: BigNumber;
|
||||
signerAddress: string;
|
||||
data: string;
|
||||
}>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): string {
|
||||
const self = (this as any) as CoordinatorContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('getTransactionHash((uint256,address,bytes))');
|
||||
@@ -247,6 +263,7 @@ export class CoordinatorContract extends BaseContract {
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @param approval Coordinator approval message containing the transaction
|
||||
* hash, transaction signature, and expiration of the approval.
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(approval: {
|
||||
txOrigin: string;
|
||||
@@ -261,13 +278,35 @@ export class CoordinatorContract extends BaseContract {
|
||||
);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): string {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(
|
||||
callData: string,
|
||||
): {
|
||||
txOrigin: string;
|
||||
transactionHash: string;
|
||||
transactionSignature: string;
|
||||
approvalExpirationTimeSeconds: BigNumber;
|
||||
} {
|
||||
const self = (this as any) as CoordinatorContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('getCoordinatorApprovalHash((address,bytes32,bytes,uint256))');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<string>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<{
|
||||
txOrigin: string;
|
||||
transactionHash: string;
|
||||
transactionSignature: string;
|
||||
approvalExpirationTimeSeconds: BigNumber;
|
||||
}>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): string {
|
||||
const self = (this as any) as CoordinatorContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('getCoordinatorApprovalHash((address,bytes32,bytes,uint256))');
|
||||
@@ -444,6 +483,32 @@ export class CoordinatorContract extends BaseContract {
|
||||
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
|
||||
return gas;
|
||||
},
|
||||
async validateAndSendTransactionAsync(
|
||||
transaction: { salt: BigNumber; signerAddress: string; data: string },
|
||||
txOrigin: string,
|
||||
transactionSignature: string,
|
||||
approvalExpirationTimeSeconds: BigNumber[],
|
||||
approvalSignatures: string[],
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
await (this as any).executeTransaction.callAsync(
|
||||
transaction,
|
||||
txOrigin,
|
||||
transactionSignature,
|
||||
approvalExpirationTimeSeconds,
|
||||
approvalSignatures,
|
||||
txData,
|
||||
);
|
||||
const txHash = await (this as any).executeTransaction.sendTransactionAsync(
|
||||
transaction,
|
||||
txOrigin,
|
||||
transactionSignature,
|
||||
approvalExpirationTimeSeconds,
|
||||
approvalSignatures,
|
||||
txData,
|
||||
);
|
||||
return txHash;
|
||||
},
|
||||
/**
|
||||
* Sends a read-only call to the contract method. Returns the result that would happen if one were to send an
|
||||
* Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas
|
||||
@@ -525,6 +590,7 @@ export class CoordinatorContract extends BaseContract {
|
||||
* for which each corresponding approval signature expires.
|
||||
* @param approvalSignatures Array of signatures that correspond to the
|
||||
* feeRecipients of each order in the transaction's Exchange calldata.
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(
|
||||
transaction: { salt: BigNumber; signerAddress: string; data: string },
|
||||
@@ -550,15 +616,29 @@ export class CoordinatorContract extends BaseContract {
|
||||
);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(
|
||||
callData: string,
|
||||
): [{ salt: BigNumber; signerAddress: string; data: string }, string, string, BigNumber[], string[]] {
|
||||
const self = (this as any) as CoordinatorContract;
|
||||
const abiEncoder = self._lookupAbiEncoder(
|
||||
'executeTransaction((uint256,address,bytes),address,bytes,uint256[],bytes[])',
|
||||
);
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<
|
||||
[{ salt: BigNumber; signerAddress: string; data: string }, string, string, BigNumber[], string[]]
|
||||
>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): void {
|
||||
const self = (this as any) as CoordinatorContract;
|
||||
const abiEncoder = self._lookupAbiEncoder(
|
||||
@@ -568,32 +648,6 @@ export class CoordinatorContract extends BaseContract {
|
||||
const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<void>(returnData);
|
||||
return abiDecodedReturnData;
|
||||
},
|
||||
async validateAndSendTransactionAsync(
|
||||
transaction: { salt: BigNumber; signerAddress: string; data: string },
|
||||
txOrigin: string,
|
||||
transactionSignature: string,
|
||||
approvalExpirationTimeSeconds: BigNumber[],
|
||||
approvalSignatures: string[],
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
await (this as any).executeTransaction.callAsync(
|
||||
transaction,
|
||||
txOrigin,
|
||||
transactionSignature,
|
||||
approvalExpirationTimeSeconds,
|
||||
approvalSignatures,
|
||||
txData,
|
||||
);
|
||||
const txHash = await (this as any).executeTransaction.sendTransactionAsync(
|
||||
transaction,
|
||||
txOrigin,
|
||||
transactionSignature,
|
||||
approvalExpirationTimeSeconds,
|
||||
approvalSignatures,
|
||||
txData,
|
||||
);
|
||||
return txHash;
|
||||
},
|
||||
};
|
||||
public EIP712_EXCHANGE_DOMAIN_HASH = {
|
||||
/**
|
||||
@@ -636,19 +690,30 @@ export class CoordinatorContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(): string {
|
||||
const self = (this as any) as CoordinatorContract;
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('EIP712_EXCHANGE_DOMAIN_HASH()', []);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): string {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
const self = (this as any) as CoordinatorContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('EIP712_EXCHANGE_DOMAIN_HASH()');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<string>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): string {
|
||||
const self = (this as any) as CoordinatorContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('EIP712_EXCHANGE_DOMAIN_HASH()');
|
||||
@@ -743,6 +808,7 @@ export class CoordinatorContract extends BaseContract {
|
||||
* for which each corresponding approval signature expires.
|
||||
* @param approvalSignatures Array of signatures that correspond to the
|
||||
* feeRecipients of each order in the transaction's Exchange calldata.
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(
|
||||
transaction: { salt: BigNumber; signerAddress: string; data: string },
|
||||
@@ -768,15 +834,29 @@ export class CoordinatorContract extends BaseContract {
|
||||
);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(
|
||||
callData: string,
|
||||
): [{ salt: BigNumber; signerAddress: string; data: string }, string, string, BigNumber[], string[]] {
|
||||
const self = (this as any) as CoordinatorContract;
|
||||
const abiEncoder = self._lookupAbiEncoder(
|
||||
'assertValidCoordinatorApprovals((uint256,address,bytes),address,bytes,uint256[],bytes[])',
|
||||
);
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<
|
||||
[{ salt: BigNumber; signerAddress: string; data: string }, string, string, BigNumber[], string[]]
|
||||
>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): void {
|
||||
const self = (this as any) as CoordinatorContract;
|
||||
const abiEncoder = self._lookupAbiEncoder(
|
||||
@@ -829,19 +909,9 @@ export class CoordinatorContract extends BaseContract {
|
||||
}
|
||||
const self = (this as any) as CoordinatorContract;
|
||||
const encodedData = self._strictEncodeArguments('decodeOrdersFromFillData(bytes)', [data]);
|
||||
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
|
||||
{
|
||||
to: self.address,
|
||||
...callData,
|
||||
data: encodedData,
|
||||
},
|
||||
self._web3Wrapper.getContractDefaults(),
|
||||
);
|
||||
callDataWithDefaults.from = callDataWithDefaults.from
|
||||
? callDataWithDefaults.from.toLowerCase()
|
||||
: callDataWithDefaults.from;
|
||||
const encodedDataBytes = Buffer.from(encodedData.substr(2), 'hex');
|
||||
|
||||
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
|
||||
const rawCallResult = await self.evmExecAsync(encodedDataBytes);
|
||||
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
|
||||
const abiEncoder = self._lookupAbiEncoder('decodeOrdersFromFillData(bytes)');
|
||||
// tslint:disable boolean-naming
|
||||
@@ -869,6 +939,7 @@ export class CoordinatorContract extends BaseContract {
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @param data Exchange calldata representing a fill method.
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(data: string): string {
|
||||
assert.isString('data', data);
|
||||
@@ -876,43 +947,23 @@ export class CoordinatorContract extends BaseContract {
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('decodeOrdersFromFillData(bytes)', [data]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(
|
||||
callData: string,
|
||||
): Array<{
|
||||
makerAddress: string;
|
||||
takerAddress: string;
|
||||
feeRecipientAddress: string;
|
||||
senderAddress: string;
|
||||
makerAssetAmount: BigNumber;
|
||||
takerAssetAmount: BigNumber;
|
||||
makerFee: BigNumber;
|
||||
takerFee: BigNumber;
|
||||
expirationTimeSeconds: BigNumber;
|
||||
salt: BigNumber;
|
||||
makerAssetData: string;
|
||||
takerAssetData: string;
|
||||
}> {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): string {
|
||||
const self = (this as any) as CoordinatorContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('decodeOrdersFromFillData(bytes)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<
|
||||
Array<{
|
||||
makerAddress: string;
|
||||
takerAddress: string;
|
||||
feeRecipientAddress: string;
|
||||
senderAddress: string;
|
||||
makerAssetAmount: BigNumber;
|
||||
takerAssetAmount: BigNumber;
|
||||
makerFee: BigNumber;
|
||||
takerFee: BigNumber;
|
||||
expirationTimeSeconds: BigNumber;
|
||||
salt: BigNumber;
|
||||
makerAssetData: string;
|
||||
takerAssetData: string;
|
||||
}>
|
||||
>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<string>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(
|
||||
returnData: string,
|
||||
): Array<{
|
||||
@@ -992,19 +1043,30 @@ export class CoordinatorContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(): string {
|
||||
const self = (this as any) as CoordinatorContract;
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('EIP712_COORDINATOR_DOMAIN_HASH()', []);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): string {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
const self = (this as any) as CoordinatorContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('EIP712_COORDINATOR_DOMAIN_HASH()');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<string>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): string {
|
||||
const self = (this as any) as CoordinatorContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('EIP712_COORDINATOR_DOMAIN_HASH()');
|
||||
|
@@ -131,6 +131,14 @@ export class CoordinatorRegistryContract extends BaseContract {
|
||||
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
|
||||
return gas;
|
||||
},
|
||||
async validateAndSendTransactionAsync(
|
||||
coordinatorEndpoint: string,
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
await (this as any).setCoordinatorEndpoint.callAsync(coordinatorEndpoint, txData);
|
||||
const txHash = await (this as any).setCoordinatorEndpoint.sendTransactionAsync(coordinatorEndpoint, txData);
|
||||
return txHash;
|
||||
},
|
||||
/**
|
||||
* Sends a read-only call to the contract method. Returns the result that would happen if one were to send an
|
||||
* Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas
|
||||
@@ -178,6 +186,7 @@ export class CoordinatorRegistryContract extends BaseContract {
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @param coordinatorEndpoint endpoint of the Coordinator.
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(coordinatorEndpoint: string): string {
|
||||
assert.isString('coordinatorEndpoint', coordinatorEndpoint);
|
||||
@@ -187,13 +196,23 @@ export class CoordinatorRegistryContract extends BaseContract {
|
||||
]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): [string] {
|
||||
const self = (this as any) as CoordinatorRegistryContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('setCoordinatorEndpoint(string)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<[string]>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): void {
|
||||
const self = (this as any) as CoordinatorRegistryContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('setCoordinatorEndpoint(string)');
|
||||
@@ -201,14 +220,6 @@ export class CoordinatorRegistryContract extends BaseContract {
|
||||
const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<void>(returnData);
|
||||
return abiDecodedReturnData;
|
||||
},
|
||||
async validateAndSendTransactionAsync(
|
||||
coordinatorEndpoint: string,
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
await (this as any).setCoordinatorEndpoint.callAsync(coordinatorEndpoint, txData);
|
||||
const txHash = await (this as any).setCoordinatorEndpoint.sendTransactionAsync(coordinatorEndpoint, txData);
|
||||
return txHash;
|
||||
},
|
||||
};
|
||||
/**
|
||||
* Gets the endpoint for a Coordinator.
|
||||
@@ -263,6 +274,7 @@ export class CoordinatorRegistryContract extends BaseContract {
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @param coordinatorOperator operator of the Coordinator endpoint.
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(coordinatorOperator: string): string {
|
||||
assert.isString('coordinatorOperator', coordinatorOperator);
|
||||
@@ -272,6 +284,11 @@ export class CoordinatorRegistryContract extends BaseContract {
|
||||
]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): string {
|
||||
const self = (this as any) as CoordinatorRegistryContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('getCoordinatorEndpoint(address)');
|
||||
@@ -279,6 +296,11 @@ export class CoordinatorRegistryContract extends BaseContract {
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<string>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): string {
|
||||
const self = (this as any) as CoordinatorRegistryContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('getCoordinatorEndpoint(address)');
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -95,19 +95,30 @@ export class DummyERC20TokenContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(): string {
|
||||
const self = (this as any) as DummyERC20TokenContract;
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('name()', []);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): string {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
const self = (this as any) as DummyERC20TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('name()');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<string>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): string {
|
||||
const self = (this as any) as DummyERC20TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('name()');
|
||||
@@ -222,6 +233,15 @@ export class DummyERC20TokenContract extends BaseContract {
|
||||
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
|
||||
return gas;
|
||||
},
|
||||
async validateAndSendTransactionAsync(
|
||||
_spender: string,
|
||||
_value: BigNumber,
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
await (this as any).approve.callAsync(_spender, _value, txData);
|
||||
const txHash = await (this as any).approve.sendTransactionAsync(_spender, _value, txData);
|
||||
return txHash;
|
||||
},
|
||||
/**
|
||||
* Sends a read-only call to the contract method. Returns the result that would happen if one were to send an
|
||||
* Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas
|
||||
@@ -277,6 +297,7 @@ export class DummyERC20TokenContract extends BaseContract {
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @param _spender The address of the account able to transfer the tokens
|
||||
* @param _value The amount of wei to be approved for transfer
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(_spender: string, _value: BigNumber): string {
|
||||
assert.isString('_spender', _spender);
|
||||
@@ -288,13 +309,23 @@ export class DummyERC20TokenContract extends BaseContract {
|
||||
]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): boolean {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): string {
|
||||
const self = (this as any) as DummyERC20TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('approve(address,uint256)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<boolean>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<string>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): boolean {
|
||||
const self = (this as any) as DummyERC20TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('approve(address,uint256)');
|
||||
@@ -302,15 +333,6 @@ export class DummyERC20TokenContract extends BaseContract {
|
||||
const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<boolean>(returnData);
|
||||
return abiDecodedReturnData;
|
||||
},
|
||||
async validateAndSendTransactionAsync(
|
||||
_spender: string,
|
||||
_value: BigNumber,
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
await (this as any).approve.callAsync(_spender, _value, txData);
|
||||
const txHash = await (this as any).approve.sendTransactionAsync(_spender, _value, txData);
|
||||
return txHash;
|
||||
},
|
||||
};
|
||||
/**
|
||||
* Query total supply of token
|
||||
@@ -357,19 +379,30 @@ export class DummyERC20TokenContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(): string {
|
||||
const self = (this as any) as DummyERC20TokenContract;
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('totalSupply()', []);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): BigNumber {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
const self = (this as any) as DummyERC20TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('totalSupply()');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<BigNumber>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): BigNumber {
|
||||
const self = (this as any) as DummyERC20TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('totalSupply()');
|
||||
@@ -500,6 +533,16 @@ export class DummyERC20TokenContract extends BaseContract {
|
||||
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
|
||||
return gas;
|
||||
},
|
||||
async validateAndSendTransactionAsync(
|
||||
_from: string,
|
||||
_to: string,
|
||||
_value: BigNumber,
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
await (this as any).transferFrom.callAsync(_from, _to, _value, txData);
|
||||
const txHash = await (this as any).transferFrom.sendTransactionAsync(_from, _to, _value, txData);
|
||||
return txHash;
|
||||
},
|
||||
/**
|
||||
* Sends a read-only call to the contract method. Returns the result that would happen if one were to send an
|
||||
* Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas
|
||||
@@ -560,6 +603,7 @@ export class DummyERC20TokenContract extends BaseContract {
|
||||
* @param _from Address to transfer from.
|
||||
* @param _to Address to transfer to.
|
||||
* @param _value Amount to transfer.
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(_from: string, _to: string, _value: BigNumber): string {
|
||||
assert.isString('_from', _from);
|
||||
@@ -573,13 +617,23 @@ export class DummyERC20TokenContract extends BaseContract {
|
||||
]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): boolean {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): string {
|
||||
const self = (this as any) as DummyERC20TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('transferFrom(address,address,uint256)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<boolean>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<string>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): boolean {
|
||||
const self = (this as any) as DummyERC20TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('transferFrom(address,address,uint256)');
|
||||
@@ -587,16 +641,6 @@ export class DummyERC20TokenContract extends BaseContract {
|
||||
const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<boolean>(returnData);
|
||||
return abiDecodedReturnData;
|
||||
},
|
||||
async validateAndSendTransactionAsync(
|
||||
_from: string,
|
||||
_to: string,
|
||||
_value: BigNumber,
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
await (this as any).transferFrom.callAsync(_from, _to, _value, txData);
|
||||
const txHash = await (this as any).transferFrom.sendTransactionAsync(_from, _to, _value, txData);
|
||||
return txHash;
|
||||
},
|
||||
};
|
||||
public decimals = {
|
||||
/**
|
||||
@@ -639,19 +683,30 @@ export class DummyERC20TokenContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(): string {
|
||||
const self = (this as any) as DummyERC20TokenContract;
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('decimals()', []);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): BigNumber {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
const self = (this as any) as DummyERC20TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('decimals()');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<BigNumber>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): BigNumber {
|
||||
const self = (this as any) as DummyERC20TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('decimals()');
|
||||
@@ -712,6 +767,7 @@ export class DummyERC20TokenContract extends BaseContract {
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @param _owner The address from which the balance will be retrieved
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(_owner: string): string {
|
||||
assert.isString('_owner', _owner);
|
||||
@@ -719,13 +775,23 @@ export class DummyERC20TokenContract extends BaseContract {
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('balanceOf(address)', [_owner.toLowerCase()]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): BigNumber {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): string {
|
||||
const self = (this as any) as DummyERC20TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('balanceOf(address)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<BigNumber>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<string>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): BigNumber {
|
||||
const self = (this as any) as DummyERC20TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('balanceOf(address)');
|
||||
@@ -775,19 +841,30 @@ export class DummyERC20TokenContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(): string {
|
||||
const self = (this as any) as DummyERC20TokenContract;
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('owner()', []);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): string {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
const self = (this as any) as DummyERC20TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('owner()');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<string>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): string {
|
||||
const self = (this as any) as DummyERC20TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('owner()');
|
||||
@@ -837,19 +914,30 @@ export class DummyERC20TokenContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(): string {
|
||||
const self = (this as any) as DummyERC20TokenContract;
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('symbol()', []);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): string {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
const self = (this as any) as DummyERC20TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('symbol()');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<string>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): string {
|
||||
const self = (this as any) as DummyERC20TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('symbol()');
|
||||
@@ -943,6 +1031,14 @@ export class DummyERC20TokenContract extends BaseContract {
|
||||
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
|
||||
return gas;
|
||||
},
|
||||
async validateAndSendTransactionAsync(
|
||||
_value: BigNumber,
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
await (this as any).mint.callAsync(_value, txData);
|
||||
const txHash = await (this as any).mint.sendTransactionAsync(_value, txData);
|
||||
return txHash;
|
||||
},
|
||||
/**
|
||||
* Sends a read-only call to the contract method. Returns the result that would happen if one were to send an
|
||||
* Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas
|
||||
@@ -986,6 +1082,7 @@ export class DummyERC20TokenContract extends BaseContract {
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @param _value Amount of tokens to mint
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(_value: BigNumber): string {
|
||||
assert.isBigNumber('_value', _value);
|
||||
@@ -993,13 +1090,23 @@ export class DummyERC20TokenContract extends BaseContract {
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('mint(uint256)', [_value]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): [BigNumber] {
|
||||
const self = (this as any) as DummyERC20TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('mint(uint256)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<[BigNumber]>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): void {
|
||||
const self = (this as any) as DummyERC20TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('mint(uint256)');
|
||||
@@ -1007,14 +1114,6 @@ export class DummyERC20TokenContract extends BaseContract {
|
||||
const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<void>(returnData);
|
||||
return abiDecodedReturnData;
|
||||
},
|
||||
async validateAndSendTransactionAsync(
|
||||
_value: BigNumber,
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
await (this as any).mint.callAsync(_value, txData);
|
||||
const txHash = await (this as any).mint.sendTransactionAsync(_value, txData);
|
||||
return txHash;
|
||||
},
|
||||
};
|
||||
/**
|
||||
* send `value` token to `to` from `msg.sender`
|
||||
@@ -1112,6 +1211,15 @@ export class DummyERC20TokenContract extends BaseContract {
|
||||
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
|
||||
return gas;
|
||||
},
|
||||
async validateAndSendTransactionAsync(
|
||||
_to: string,
|
||||
_value: BigNumber,
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
await (this as any).transfer.callAsync(_to, _value, txData);
|
||||
const txHash = await (this as any).transfer.sendTransactionAsync(_to, _value, txData);
|
||||
return txHash;
|
||||
},
|
||||
/**
|
||||
* Sends a read-only call to the contract method. Returns the result that would happen if one were to send an
|
||||
* Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas
|
||||
@@ -1164,6 +1272,7 @@ export class DummyERC20TokenContract extends BaseContract {
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @param _to The address of the recipient
|
||||
* @param _value The amount of token to be transferred
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(_to: string, _value: BigNumber): string {
|
||||
assert.isString('_to', _to);
|
||||
@@ -1175,13 +1284,23 @@ export class DummyERC20TokenContract extends BaseContract {
|
||||
]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): boolean {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): string {
|
||||
const self = (this as any) as DummyERC20TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('transfer(address,uint256)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<boolean>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<string>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): boolean {
|
||||
const self = (this as any) as DummyERC20TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('transfer(address,uint256)');
|
||||
@@ -1189,15 +1308,6 @@ export class DummyERC20TokenContract extends BaseContract {
|
||||
const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<boolean>(returnData);
|
||||
return abiDecodedReturnData;
|
||||
},
|
||||
async validateAndSendTransactionAsync(
|
||||
_to: string,
|
||||
_value: BigNumber,
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
await (this as any).transfer.callAsync(_to, _value, txData);
|
||||
const txHash = await (this as any).transfer.sendTransactionAsync(_to, _value, txData);
|
||||
return txHash;
|
||||
},
|
||||
};
|
||||
public allowance = {
|
||||
/**
|
||||
@@ -1255,6 +1365,7 @@ export class DummyERC20TokenContract extends BaseContract {
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @param _owner The address of the account owning tokens
|
||||
* @param _spender The address of the account able to transfer the tokens
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(_owner: string, _spender: string): string {
|
||||
assert.isString('_owner', _owner);
|
||||
@@ -1266,13 +1377,23 @@ export class DummyERC20TokenContract extends BaseContract {
|
||||
]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): BigNumber {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): string {
|
||||
const self = (this as any) as DummyERC20TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('allowance(address,address)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<BigNumber>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<string>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): BigNumber {
|
||||
const self = (this as any) as DummyERC20TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('allowance(address,address)');
|
||||
@@ -1387,6 +1508,15 @@ export class DummyERC20TokenContract extends BaseContract {
|
||||
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
|
||||
return gas;
|
||||
},
|
||||
async validateAndSendTransactionAsync(
|
||||
_target: string,
|
||||
_value: BigNumber,
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
await (this as any).setBalance.callAsync(_target, _value, txData);
|
||||
const txHash = await (this as any).setBalance.sendTransactionAsync(_target, _value, txData);
|
||||
return txHash;
|
||||
},
|
||||
/**
|
||||
* Sends a read-only call to the contract method. Returns the result that would happen if one were to send an
|
||||
* Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas
|
||||
@@ -1441,6 +1571,7 @@ export class DummyERC20TokenContract extends BaseContract {
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @param _target Address or which balance will be updated
|
||||
* @param _value New balance of target address
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(_target: string, _value: BigNumber): string {
|
||||
assert.isString('_target', _target);
|
||||
@@ -1452,13 +1583,23 @@ export class DummyERC20TokenContract extends BaseContract {
|
||||
]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): [string, BigNumber] {
|
||||
const self = (this as any) as DummyERC20TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('setBalance(address,uint256)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<[string, BigNumber]>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): void {
|
||||
const self = (this as any) as DummyERC20TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('setBalance(address,uint256)');
|
||||
@@ -1466,15 +1607,6 @@ export class DummyERC20TokenContract extends BaseContract {
|
||||
const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<void>(returnData);
|
||||
return abiDecodedReturnData;
|
||||
},
|
||||
async validateAndSendTransactionAsync(
|
||||
_target: string,
|
||||
_value: BigNumber,
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
await (this as any).setBalance.callAsync(_target, _value, txData);
|
||||
const txHash = await (this as any).setBalance.sendTransactionAsync(_target, _value, txData);
|
||||
return txHash;
|
||||
},
|
||||
};
|
||||
public transferOwnership = {
|
||||
/**
|
||||
@@ -1555,6 +1687,11 @@ export class DummyERC20TokenContract extends BaseContract {
|
||||
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
|
||||
return gas;
|
||||
},
|
||||
async validateAndSendTransactionAsync(newOwner: string, txData?: Partial<TxData> | undefined): Promise<string> {
|
||||
await (this as any).transferOwnership.callAsync(newOwner, txData);
|
||||
const txHash = await (this as any).transferOwnership.sendTransactionAsync(newOwner, txData);
|
||||
return txHash;
|
||||
},
|
||||
/**
|
||||
* Sends a read-only call to the contract method. Returns the result that would happen if one were to send an
|
||||
* Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas
|
||||
@@ -1596,6 +1733,7 @@ export class DummyERC20TokenContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(newOwner: string): string {
|
||||
assert.isString('newOwner', newOwner);
|
||||
@@ -1605,13 +1743,23 @@ export class DummyERC20TokenContract extends BaseContract {
|
||||
]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): [string] {
|
||||
const self = (this as any) as DummyERC20TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('transferOwnership(address)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<[string]>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): void {
|
||||
const self = (this as any) as DummyERC20TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('transferOwnership(address)');
|
||||
@@ -1619,11 +1767,6 @@ export class DummyERC20TokenContract extends BaseContract {
|
||||
const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<void>(returnData);
|
||||
return abiDecodedReturnData;
|
||||
},
|
||||
async validateAndSendTransactionAsync(newOwner: string, txData?: Partial<TxData> | undefined): Promise<string> {
|
||||
await (this as any).transferOwnership.callAsync(newOwner, txData);
|
||||
const txHash = await (this as any).transferOwnership.sendTransactionAsync(newOwner, txData);
|
||||
return txHash;
|
||||
},
|
||||
};
|
||||
public MAX_MINT_AMOUNT = {
|
||||
/**
|
||||
@@ -1666,19 +1809,30 @@ export class DummyERC20TokenContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(): string {
|
||||
const self = (this as any) as DummyERC20TokenContract;
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('MAX_MINT_AMOUNT()', []);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): BigNumber {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
const self = (this as any) as DummyERC20TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('MAX_MINT_AMOUNT()');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<BigNumber>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): BigNumber {
|
||||
const self = (this as any) as DummyERC20TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('MAX_MINT_AMOUNT()');
|
||||
|
@@ -105,19 +105,30 @@ export class DummyERC721TokenContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(): string {
|
||||
const self = (this as any) as DummyERC721TokenContract;
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('name()', []);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): string {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
const self = (this as any) as DummyERC721TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('name()');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<string>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): string {
|
||||
const self = (this as any) as DummyERC721TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('name()');
|
||||
@@ -178,6 +189,7 @@ export class DummyERC721TokenContract extends BaseContract {
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @param _tokenId The NFT to find the approved address for
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(_tokenId: BigNumber): string {
|
||||
assert.isBigNumber('_tokenId', _tokenId);
|
||||
@@ -185,13 +197,23 @@ export class DummyERC721TokenContract extends BaseContract {
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('getApproved(uint256)', [_tokenId]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): string {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): BigNumber {
|
||||
const self = (this as any) as DummyERC721TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('getApproved(uint256)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<string>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<BigNumber>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): string {
|
||||
const self = (this as any) as DummyERC721TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('getApproved(uint256)');
|
||||
@@ -308,6 +330,15 @@ export class DummyERC721TokenContract extends BaseContract {
|
||||
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
|
||||
return gas;
|
||||
},
|
||||
async validateAndSendTransactionAsync(
|
||||
_approved: string,
|
||||
_tokenId: BigNumber,
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
await (this as any).approve.callAsync(_approved, _tokenId, txData);
|
||||
const txHash = await (this as any).approve.sendTransactionAsync(_approved, _tokenId, txData);
|
||||
return txHash;
|
||||
},
|
||||
/**
|
||||
* Sends a read-only call to the contract method. Returns the result that would happen if one were to send an
|
||||
* Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas
|
||||
@@ -362,6 +393,7 @@ export class DummyERC721TokenContract extends BaseContract {
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @param _approved The new approved NFT controller
|
||||
* @param _tokenId The NFT to approve
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(_approved: string, _tokenId: BigNumber): string {
|
||||
assert.isString('_approved', _approved);
|
||||
@@ -373,13 +405,23 @@ export class DummyERC721TokenContract extends BaseContract {
|
||||
]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): [string, BigNumber] {
|
||||
const self = (this as any) as DummyERC721TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('approve(address,uint256)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<[string, BigNumber]>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): void {
|
||||
const self = (this as any) as DummyERC721TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('approve(address,uint256)');
|
||||
@@ -387,15 +429,6 @@ export class DummyERC721TokenContract extends BaseContract {
|
||||
const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<void>(returnData);
|
||||
return abiDecodedReturnData;
|
||||
},
|
||||
async validateAndSendTransactionAsync(
|
||||
_approved: string,
|
||||
_tokenId: BigNumber,
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
await (this as any).approve.callAsync(_approved, _tokenId, txData);
|
||||
const txHash = await (this as any).approve.sendTransactionAsync(_approved, _tokenId, txData);
|
||||
return txHash;
|
||||
},
|
||||
};
|
||||
/**
|
||||
* Throws unless `msg.sender` is the current owner, an authorized
|
||||
@@ -522,6 +555,16 @@ export class DummyERC721TokenContract extends BaseContract {
|
||||
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
|
||||
return gas;
|
||||
},
|
||||
async validateAndSendTransactionAsync(
|
||||
_from: string,
|
||||
_to: string,
|
||||
_tokenId: BigNumber,
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
await (this as any).transferFrom.callAsync(_from, _to, _tokenId, txData);
|
||||
const txHash = await (this as any).transferFrom.sendTransactionAsync(_from, _to, _tokenId, txData);
|
||||
return txHash;
|
||||
},
|
||||
/**
|
||||
* Sends a read-only call to the contract method. Returns the result that would happen if one were to send an
|
||||
* Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas
|
||||
@@ -581,6 +624,7 @@ export class DummyERC721TokenContract extends BaseContract {
|
||||
* @param _from The current owner of the NFT
|
||||
* @param _to The new owner
|
||||
* @param _tokenId The NFT to transfer
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(_from: string, _to: string, _tokenId: BigNumber): string {
|
||||
assert.isString('_from', _from);
|
||||
@@ -594,13 +638,23 @@ export class DummyERC721TokenContract extends BaseContract {
|
||||
]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): [string, string, BigNumber] {
|
||||
const self = (this as any) as DummyERC721TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('transferFrom(address,address,uint256)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<[string, string, BigNumber]>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): void {
|
||||
const self = (this as any) as DummyERC721TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('transferFrom(address,address,uint256)');
|
||||
@@ -608,16 +662,6 @@ export class DummyERC721TokenContract extends BaseContract {
|
||||
const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<void>(returnData);
|
||||
return abiDecodedReturnData;
|
||||
},
|
||||
async validateAndSendTransactionAsync(
|
||||
_from: string,
|
||||
_to: string,
|
||||
_tokenId: BigNumber,
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
await (this as any).transferFrom.callAsync(_from, _to, _tokenId, txData);
|
||||
const txHash = await (this as any).transferFrom.sendTransactionAsync(_from, _to, _tokenId, txData);
|
||||
return txHash;
|
||||
},
|
||||
};
|
||||
/**
|
||||
* Function to mint a new token
|
||||
@@ -720,6 +764,15 @@ export class DummyERC721TokenContract extends BaseContract {
|
||||
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
|
||||
return gas;
|
||||
},
|
||||
async validateAndSendTransactionAsync(
|
||||
_to: string,
|
||||
_tokenId: BigNumber,
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
await (this as any).mint.callAsync(_to, _tokenId, txData);
|
||||
const txHash = await (this as any).mint.sendTransactionAsync(_to, _tokenId, txData);
|
||||
return txHash;
|
||||
},
|
||||
/**
|
||||
* Sends a read-only call to the contract method. Returns the result that would happen if one were to send an
|
||||
* Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas
|
||||
@@ -771,6 +824,7 @@ export class DummyERC721TokenContract extends BaseContract {
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @param _to Address of the beneficiary that will own the minted token
|
||||
* @param _tokenId ID of the token to be minted by the msg.sender
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(_to: string, _tokenId: BigNumber): string {
|
||||
assert.isString('_to', _to);
|
||||
@@ -782,13 +836,23 @@ export class DummyERC721TokenContract extends BaseContract {
|
||||
]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): [string, BigNumber] {
|
||||
const self = (this as any) as DummyERC721TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('mint(address,uint256)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<[string, BigNumber]>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): void {
|
||||
const self = (this as any) as DummyERC721TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('mint(address,uint256)');
|
||||
@@ -796,15 +860,6 @@ export class DummyERC721TokenContract extends BaseContract {
|
||||
const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<void>(returnData);
|
||||
return abiDecodedReturnData;
|
||||
},
|
||||
async validateAndSendTransactionAsync(
|
||||
_to: string,
|
||||
_tokenId: BigNumber,
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
await (this as any).mint.callAsync(_to, _tokenId, txData);
|
||||
const txHash = await (this as any).mint.sendTransactionAsync(_to, _tokenId, txData);
|
||||
return txHash;
|
||||
},
|
||||
};
|
||||
/**
|
||||
* This works identically to the other function with an extra data parameter,
|
||||
@@ -929,6 +984,16 @@ export class DummyERC721TokenContract extends BaseContract {
|
||||
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
|
||||
return gas;
|
||||
},
|
||||
async validateAndSendTransactionAsync(
|
||||
_from: string,
|
||||
_to: string,
|
||||
_tokenId: BigNumber,
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
await (this as any).safeTransferFrom1.callAsync(_from, _to, _tokenId, txData);
|
||||
const txHash = await (this as any).safeTransferFrom1.sendTransactionAsync(_from, _to, _tokenId, txData);
|
||||
return txHash;
|
||||
},
|
||||
/**
|
||||
* Sends a read-only call to the contract method. Returns the result that would happen if one were to send an
|
||||
* Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas
|
||||
@@ -988,6 +1053,7 @@ export class DummyERC721TokenContract extends BaseContract {
|
||||
* @param _from The current owner of the NFT
|
||||
* @param _to The new owner
|
||||
* @param _tokenId The NFT to transfer
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(_from: string, _to: string, _tokenId: BigNumber): string {
|
||||
assert.isString('_from', _from);
|
||||
@@ -1001,13 +1067,23 @@ export class DummyERC721TokenContract extends BaseContract {
|
||||
]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): [string, string, BigNumber] {
|
||||
const self = (this as any) as DummyERC721TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('safeTransferFrom(address,address,uint256)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<[string, string, BigNumber]>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): void {
|
||||
const self = (this as any) as DummyERC721TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('safeTransferFrom(address,address,uint256)');
|
||||
@@ -1015,16 +1091,6 @@ export class DummyERC721TokenContract extends BaseContract {
|
||||
const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<void>(returnData);
|
||||
return abiDecodedReturnData;
|
||||
},
|
||||
async validateAndSendTransactionAsync(
|
||||
_from: string,
|
||||
_to: string,
|
||||
_tokenId: BigNumber,
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
await (this as any).safeTransferFrom1.callAsync(_from, _to, _tokenId, txData);
|
||||
const txHash = await (this as any).safeTransferFrom1.sendTransactionAsync(_from, _to, _tokenId, txData);
|
||||
return txHash;
|
||||
},
|
||||
};
|
||||
/**
|
||||
* NFTs assigned to zero address are considered invalid, and queries
|
||||
@@ -1079,6 +1145,7 @@ export class DummyERC721TokenContract extends BaseContract {
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @param _tokenId The identifier for an NFT
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(_tokenId: BigNumber): string {
|
||||
assert.isBigNumber('_tokenId', _tokenId);
|
||||
@@ -1086,13 +1153,23 @@ export class DummyERC721TokenContract extends BaseContract {
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('ownerOf(uint256)', [_tokenId]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): string {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): BigNumber {
|
||||
const self = (this as any) as DummyERC721TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('ownerOf(uint256)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<string>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<BigNumber>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): string {
|
||||
const self = (this as any) as DummyERC721TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('ownerOf(uint256)');
|
||||
@@ -1154,6 +1231,7 @@ export class DummyERC721TokenContract extends BaseContract {
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @param _owner An address for whom to query the balance
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(_owner: string): string {
|
||||
assert.isString('_owner', _owner);
|
||||
@@ -1161,13 +1239,23 @@ export class DummyERC721TokenContract extends BaseContract {
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('balanceOf(address)', [_owner.toLowerCase()]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): BigNumber {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): string {
|
||||
const self = (this as any) as DummyERC721TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('balanceOf(address)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<BigNumber>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<string>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): BigNumber {
|
||||
const self = (this as any) as DummyERC721TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('balanceOf(address)');
|
||||
@@ -1217,19 +1305,30 @@ export class DummyERC721TokenContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(): string {
|
||||
const self = (this as any) as DummyERC721TokenContract;
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('owner()', []);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): string {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
const self = (this as any) as DummyERC721TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('owner()');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<string>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): string {
|
||||
const self = (this as any) as DummyERC721TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('owner()');
|
||||
@@ -1279,19 +1378,30 @@ export class DummyERC721TokenContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(): string {
|
||||
const self = (this as any) as DummyERC721TokenContract;
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('symbol()', []);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): string {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
const self = (this as any) as DummyERC721TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('symbol()');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<string>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): string {
|
||||
const self = (this as any) as DummyERC721TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('symbol()');
|
||||
@@ -1401,6 +1511,15 @@ export class DummyERC721TokenContract extends BaseContract {
|
||||
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
|
||||
return gas;
|
||||
},
|
||||
async validateAndSendTransactionAsync(
|
||||
_owner: string,
|
||||
_tokenId: BigNumber,
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
await (this as any).burn.callAsync(_owner, _tokenId, txData);
|
||||
const txHash = await (this as any).burn.sendTransactionAsync(_owner, _tokenId, txData);
|
||||
return txHash;
|
||||
},
|
||||
/**
|
||||
* Sends a read-only call to the contract method. Returns the result that would happen if one were to send an
|
||||
* Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas
|
||||
@@ -1452,6 +1571,7 @@ export class DummyERC721TokenContract extends BaseContract {
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @param _owner Owner of token with given token ID
|
||||
* @param _tokenId ID of the token to be burned by the msg.sender
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(_owner: string, _tokenId: BigNumber): string {
|
||||
assert.isString('_owner', _owner);
|
||||
@@ -1463,13 +1583,23 @@ export class DummyERC721TokenContract extends BaseContract {
|
||||
]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): [string, BigNumber] {
|
||||
const self = (this as any) as DummyERC721TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('burn(address,uint256)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<[string, BigNumber]>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): void {
|
||||
const self = (this as any) as DummyERC721TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('burn(address,uint256)');
|
||||
@@ -1477,15 +1607,6 @@ export class DummyERC721TokenContract extends BaseContract {
|
||||
const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<void>(returnData);
|
||||
return abiDecodedReturnData;
|
||||
},
|
||||
async validateAndSendTransactionAsync(
|
||||
_owner: string,
|
||||
_tokenId: BigNumber,
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
await (this as any).burn.callAsync(_owner, _tokenId, txData);
|
||||
const txHash = await (this as any).burn.sendTransactionAsync(_owner, _tokenId, txData);
|
||||
return txHash;
|
||||
},
|
||||
};
|
||||
/**
|
||||
* Emits the ApprovalForAll event. The contract MUST allow
|
||||
@@ -1598,6 +1719,15 @@ export class DummyERC721TokenContract extends BaseContract {
|
||||
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
|
||||
return gas;
|
||||
},
|
||||
async validateAndSendTransactionAsync(
|
||||
_operator: string,
|
||||
_approved: boolean,
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
await (this as any).setApprovalForAll.callAsync(_operator, _approved, txData);
|
||||
const txHash = await (this as any).setApprovalForAll.sendTransactionAsync(_operator, _approved, txData);
|
||||
return txHash;
|
||||
},
|
||||
/**
|
||||
* Sends a read-only call to the contract method. Returns the result that would happen if one were to send an
|
||||
* Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas
|
||||
@@ -1652,6 +1782,7 @@ export class DummyERC721TokenContract extends BaseContract {
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @param _operator Address to add to the set of authorized operators
|
||||
* @param _approved True if the operator is approved, false to revoke approval
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(_operator: string, _approved: boolean): string {
|
||||
assert.isString('_operator', _operator);
|
||||
@@ -1663,13 +1794,23 @@ export class DummyERC721TokenContract extends BaseContract {
|
||||
]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): [string, boolean] {
|
||||
const self = (this as any) as DummyERC721TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('setApprovalForAll(address,bool)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<[string, boolean]>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): void {
|
||||
const self = (this as any) as DummyERC721TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('setApprovalForAll(address,bool)');
|
||||
@@ -1677,15 +1818,6 @@ export class DummyERC721TokenContract extends BaseContract {
|
||||
const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<void>(returnData);
|
||||
return abiDecodedReturnData;
|
||||
},
|
||||
async validateAndSendTransactionAsync(
|
||||
_operator: string,
|
||||
_approved: boolean,
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
await (this as any).setApprovalForAll.callAsync(_operator, _approved, txData);
|
||||
const txHash = await (this as any).setApprovalForAll.sendTransactionAsync(_operator, _approved, txData);
|
||||
return txHash;
|
||||
},
|
||||
};
|
||||
/**
|
||||
* Throws unless `msg.sender` is the current owner, an authorized
|
||||
@@ -1833,6 +1965,23 @@ export class DummyERC721TokenContract extends BaseContract {
|
||||
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
|
||||
return gas;
|
||||
},
|
||||
async validateAndSendTransactionAsync(
|
||||
_from: string,
|
||||
_to: string,
|
||||
_tokenId: BigNumber,
|
||||
_data: string,
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
await (this as any).safeTransferFrom2.callAsync(_from, _to, _tokenId, _data, txData);
|
||||
const txHash = await (this as any).safeTransferFrom2.sendTransactionAsync(
|
||||
_from,
|
||||
_to,
|
||||
_tokenId,
|
||||
_data,
|
||||
txData,
|
||||
);
|
||||
return txHash;
|
||||
},
|
||||
/**
|
||||
* Sends a read-only call to the contract method. Returns the result that would happen if one were to send an
|
||||
* Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas
|
||||
@@ -1897,6 +2046,7 @@ export class DummyERC721TokenContract extends BaseContract {
|
||||
* @param _to The new owner
|
||||
* @param _tokenId The NFT to transfer
|
||||
* @param _data Additional data with no specified format, sent in call to `_to`
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(_from: string, _to: string, _tokenId: BigNumber, _data: string): string {
|
||||
assert.isString('_from', _from);
|
||||
@@ -1910,13 +2060,23 @@ export class DummyERC721TokenContract extends BaseContract {
|
||||
);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): [string, string, BigNumber, string] {
|
||||
const self = (this as any) as DummyERC721TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('safeTransferFrom(address,address,uint256,bytes)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<[string, string, BigNumber, string]>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): void {
|
||||
const self = (this as any) as DummyERC721TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('safeTransferFrom(address,address,uint256,bytes)');
|
||||
@@ -1924,23 +2084,6 @@ export class DummyERC721TokenContract extends BaseContract {
|
||||
const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<void>(returnData);
|
||||
return abiDecodedReturnData;
|
||||
},
|
||||
async validateAndSendTransactionAsync(
|
||||
_from: string,
|
||||
_to: string,
|
||||
_tokenId: BigNumber,
|
||||
_data: string,
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
await (this as any).safeTransferFrom2.callAsync(_from, _to, _tokenId, _data, txData);
|
||||
const txHash = await (this as any).safeTransferFrom2.sendTransactionAsync(
|
||||
_from,
|
||||
_to,
|
||||
_tokenId,
|
||||
_data,
|
||||
txData,
|
||||
);
|
||||
return txHash;
|
||||
},
|
||||
};
|
||||
public isApprovedForAll = {
|
||||
/**
|
||||
@@ -1998,6 +2141,7 @@ export class DummyERC721TokenContract extends BaseContract {
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @param _owner The address that owns the NFTs
|
||||
* @param _operator The address that acts on behalf of the owner
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(_owner: string, _operator: string): string {
|
||||
assert.isString('_owner', _owner);
|
||||
@@ -2009,13 +2153,23 @@ export class DummyERC721TokenContract extends BaseContract {
|
||||
]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): boolean {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): string {
|
||||
const self = (this as any) as DummyERC721TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('isApprovedForAll(address,address)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<boolean>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<string>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): boolean {
|
||||
const self = (this as any) as DummyERC721TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('isApprovedForAll(address,address)');
|
||||
@@ -2103,6 +2257,11 @@ export class DummyERC721TokenContract extends BaseContract {
|
||||
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
|
||||
return gas;
|
||||
},
|
||||
async validateAndSendTransactionAsync(newOwner: string, txData?: Partial<TxData> | undefined): Promise<string> {
|
||||
await (this as any).transferOwnership.callAsync(newOwner, txData);
|
||||
const txHash = await (this as any).transferOwnership.sendTransactionAsync(newOwner, txData);
|
||||
return txHash;
|
||||
},
|
||||
/**
|
||||
* Sends a read-only call to the contract method. Returns the result that would happen if one were to send an
|
||||
* Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas
|
||||
@@ -2144,6 +2303,7 @@ export class DummyERC721TokenContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(newOwner: string): string {
|
||||
assert.isString('newOwner', newOwner);
|
||||
@@ -2153,13 +2313,23 @@ export class DummyERC721TokenContract extends BaseContract {
|
||||
]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): [string] {
|
||||
const self = (this as any) as DummyERC721TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('transferOwnership(address)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<[string]>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): void {
|
||||
const self = (this as any) as DummyERC721TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('transferOwnership(address)');
|
||||
@@ -2167,11 +2337,6 @@ export class DummyERC721TokenContract extends BaseContract {
|
||||
const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<void>(returnData);
|
||||
return abiDecodedReturnData;
|
||||
},
|
||||
async validateAndSendTransactionAsync(newOwner: string, txData?: Partial<TxData> | undefined): Promise<string> {
|
||||
await (this as any).transferOwnership.callAsync(newOwner, txData);
|
||||
const txHash = await (this as any).transferOwnership.sendTransactionAsync(newOwner, txData);
|
||||
return txHash;
|
||||
},
|
||||
};
|
||||
private readonly _subscriptionManager: SubscriptionManager<DummyERC721TokenEventArgs, DummyERC721TokenEvents>;
|
||||
public static async deployFrom0xArtifactAsync(
|
||||
|
@@ -161,6 +161,27 @@ export class DutchAuctionContract extends BaseContract {
|
||||
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
|
||||
return gas;
|
||||
},
|
||||
async validateAndSendTransactionAsync(
|
||||
order: {
|
||||
makerAddress: string;
|
||||
takerAddress: string;
|
||||
feeRecipientAddress: string;
|
||||
senderAddress: string;
|
||||
makerAssetAmount: BigNumber;
|
||||
takerAssetAmount: BigNumber;
|
||||
makerFee: BigNumber;
|
||||
takerFee: BigNumber;
|
||||
expirationTimeSeconds: BigNumber;
|
||||
salt: BigNumber;
|
||||
makerAssetData: string;
|
||||
takerAssetData: string;
|
||||
},
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
await (this as any).getAuctionDetails.callAsync(order, txData);
|
||||
const txHash = await (this as any).getAuctionDetails.sendTransactionAsync(order, txData);
|
||||
return txHash;
|
||||
},
|
||||
/**
|
||||
* Sends a read-only call to the contract method. Returns the result that would happen if one were to send an
|
||||
* Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas
|
||||
@@ -240,6 +261,7 @@ export class DutchAuctionContract extends BaseContract {
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @param order The sell order
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(order: {
|
||||
makerAddress: string;
|
||||
@@ -262,15 +284,26 @@ export class DutchAuctionContract extends BaseContract {
|
||||
);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(
|
||||
callData: string,
|
||||
): {
|
||||
beginTimeSeconds: BigNumber;
|
||||
endTimeSeconds: BigNumber;
|
||||
beginAmount: BigNumber;
|
||||
endAmount: BigNumber;
|
||||
currentAmount: BigNumber;
|
||||
currentTimeSeconds: BigNumber;
|
||||
makerAddress: string;
|
||||
takerAddress: string;
|
||||
feeRecipientAddress: string;
|
||||
senderAddress: string;
|
||||
makerAssetAmount: BigNumber;
|
||||
takerAssetAmount: BigNumber;
|
||||
makerFee: BigNumber;
|
||||
takerFee: BigNumber;
|
||||
expirationTimeSeconds: BigNumber;
|
||||
salt: BigNumber;
|
||||
makerAssetData: string;
|
||||
takerAssetData: string;
|
||||
} {
|
||||
const self = (this as any) as DutchAuctionContract;
|
||||
const abiEncoder = self._lookupAbiEncoder(
|
||||
@@ -278,15 +311,26 @@ export class DutchAuctionContract extends BaseContract {
|
||||
);
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<{
|
||||
beginTimeSeconds: BigNumber;
|
||||
endTimeSeconds: BigNumber;
|
||||
beginAmount: BigNumber;
|
||||
endAmount: BigNumber;
|
||||
currentAmount: BigNumber;
|
||||
currentTimeSeconds: BigNumber;
|
||||
makerAddress: string;
|
||||
takerAddress: string;
|
||||
feeRecipientAddress: string;
|
||||
senderAddress: string;
|
||||
makerAssetAmount: BigNumber;
|
||||
takerAssetAmount: BigNumber;
|
||||
makerFee: BigNumber;
|
||||
takerFee: BigNumber;
|
||||
expirationTimeSeconds: BigNumber;
|
||||
salt: BigNumber;
|
||||
makerAssetData: string;
|
||||
takerAssetData: string;
|
||||
}>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(
|
||||
returnData: string,
|
||||
): {
|
||||
@@ -312,27 +356,6 @@ export class DutchAuctionContract extends BaseContract {
|
||||
}>(returnData);
|
||||
return abiDecodedReturnData;
|
||||
},
|
||||
async validateAndSendTransactionAsync(
|
||||
order: {
|
||||
makerAddress: string;
|
||||
takerAddress: string;
|
||||
feeRecipientAddress: string;
|
||||
senderAddress: string;
|
||||
makerAssetAmount: BigNumber;
|
||||
takerAssetAmount: BigNumber;
|
||||
makerFee: BigNumber;
|
||||
takerFee: BigNumber;
|
||||
expirationTimeSeconds: BigNumber;
|
||||
salt: BigNumber;
|
||||
makerAssetData: string;
|
||||
takerAssetData: string;
|
||||
},
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
await (this as any).getAuctionDetails.callAsync(order, txData);
|
||||
const txHash = await (this as any).getAuctionDetails.sendTransactionAsync(order, txData);
|
||||
return txHash;
|
||||
},
|
||||
};
|
||||
/**
|
||||
* Matches the buy and sell orders at an amount given the following: the current block time, the auction
|
||||
@@ -556,6 +579,49 @@ export class DutchAuctionContract extends BaseContract {
|
||||
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
|
||||
return gas;
|
||||
},
|
||||
async validateAndSendTransactionAsync(
|
||||
buyOrder: {
|
||||
makerAddress: string;
|
||||
takerAddress: string;
|
||||
feeRecipientAddress: string;
|
||||
senderAddress: string;
|
||||
makerAssetAmount: BigNumber;
|
||||
takerAssetAmount: BigNumber;
|
||||
makerFee: BigNumber;
|
||||
takerFee: BigNumber;
|
||||
expirationTimeSeconds: BigNumber;
|
||||
salt: BigNumber;
|
||||
makerAssetData: string;
|
||||
takerAssetData: string;
|
||||
},
|
||||
sellOrder: {
|
||||
makerAddress: string;
|
||||
takerAddress: string;
|
||||
feeRecipientAddress: string;
|
||||
senderAddress: string;
|
||||
makerAssetAmount: BigNumber;
|
||||
takerAssetAmount: BigNumber;
|
||||
makerFee: BigNumber;
|
||||
takerFee: BigNumber;
|
||||
expirationTimeSeconds: BigNumber;
|
||||
salt: BigNumber;
|
||||
makerAssetData: string;
|
||||
takerAssetData: string;
|
||||
},
|
||||
buySignature: string,
|
||||
sellSignature: string,
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
await (this as any).matchOrders.callAsync(buyOrder, sellOrder, buySignature, sellSignature, txData);
|
||||
const txHash = await (this as any).matchOrders.sendTransactionAsync(
|
||||
buyOrder,
|
||||
sellOrder,
|
||||
buySignature,
|
||||
sellSignature,
|
||||
txData,
|
||||
);
|
||||
return txHash;
|
||||
},
|
||||
/**
|
||||
* Sends a read-only call to the contract method. Returns the result that would happen if one were to send an
|
||||
* Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas
|
||||
@@ -677,6 +743,7 @@ export class DutchAuctionContract extends BaseContract {
|
||||
* the end of the auction).
|
||||
* @param buySignature Proof that order was created by the buyer.
|
||||
* @param sellSignature Proof that order was created by the seller.
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(
|
||||
buyOrder: {
|
||||
@@ -719,22 +786,26 @@ export class DutchAuctionContract extends BaseContract {
|
||||
);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(
|
||||
callData: string,
|
||||
): {
|
||||
left: {
|
||||
makerAssetFilledAmount: BigNumber;
|
||||
takerAssetFilledAmount: BigNumber;
|
||||
makerFeePaid: BigNumber;
|
||||
takerFeePaid: BigNumber;
|
||||
};
|
||||
right: {
|
||||
makerAssetFilledAmount: BigNumber;
|
||||
takerAssetFilledAmount: BigNumber;
|
||||
makerFeePaid: BigNumber;
|
||||
takerFeePaid: BigNumber;
|
||||
};
|
||||
leftMakerAssetSpreadAmount: BigNumber;
|
||||
makerAddress: string;
|
||||
takerAddress: string;
|
||||
feeRecipientAddress: string;
|
||||
senderAddress: string;
|
||||
makerAssetAmount: BigNumber;
|
||||
takerAssetAmount: BigNumber;
|
||||
makerFee: BigNumber;
|
||||
takerFee: BigNumber;
|
||||
expirationTimeSeconds: BigNumber;
|
||||
salt: BigNumber;
|
||||
makerAssetData: string;
|
||||
takerAssetData: string;
|
||||
} {
|
||||
const self = (this as any) as DutchAuctionContract;
|
||||
const abiEncoder = self._lookupAbiEncoder(
|
||||
@@ -742,22 +813,26 @@ export class DutchAuctionContract extends BaseContract {
|
||||
);
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<{
|
||||
left: {
|
||||
makerAssetFilledAmount: BigNumber;
|
||||
takerAssetFilledAmount: BigNumber;
|
||||
makerFeePaid: BigNumber;
|
||||
takerFeePaid: BigNumber;
|
||||
};
|
||||
right: {
|
||||
makerAssetFilledAmount: BigNumber;
|
||||
takerAssetFilledAmount: BigNumber;
|
||||
makerFeePaid: BigNumber;
|
||||
takerFeePaid: BigNumber;
|
||||
};
|
||||
leftMakerAssetSpreadAmount: BigNumber;
|
||||
makerAddress: string;
|
||||
takerAddress: string;
|
||||
feeRecipientAddress: string;
|
||||
senderAddress: string;
|
||||
makerAssetAmount: BigNumber;
|
||||
takerAssetAmount: BigNumber;
|
||||
makerFee: BigNumber;
|
||||
takerFee: BigNumber;
|
||||
expirationTimeSeconds: BigNumber;
|
||||
salt: BigNumber;
|
||||
makerAssetData: string;
|
||||
takerAssetData: string;
|
||||
}>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(
|
||||
returnData: string,
|
||||
): {
|
||||
@@ -797,49 +872,6 @@ export class DutchAuctionContract extends BaseContract {
|
||||
}>(returnData);
|
||||
return abiDecodedReturnData;
|
||||
},
|
||||
async validateAndSendTransactionAsync(
|
||||
buyOrder: {
|
||||
makerAddress: string;
|
||||
takerAddress: string;
|
||||
feeRecipientAddress: string;
|
||||
senderAddress: string;
|
||||
makerAssetAmount: BigNumber;
|
||||
takerAssetAmount: BigNumber;
|
||||
makerFee: BigNumber;
|
||||
takerFee: BigNumber;
|
||||
expirationTimeSeconds: BigNumber;
|
||||
salt: BigNumber;
|
||||
makerAssetData: string;
|
||||
takerAssetData: string;
|
||||
},
|
||||
sellOrder: {
|
||||
makerAddress: string;
|
||||
takerAddress: string;
|
||||
feeRecipientAddress: string;
|
||||
senderAddress: string;
|
||||
makerAssetAmount: BigNumber;
|
||||
takerAssetAmount: BigNumber;
|
||||
makerFee: BigNumber;
|
||||
takerFee: BigNumber;
|
||||
expirationTimeSeconds: BigNumber;
|
||||
salt: BigNumber;
|
||||
makerAssetData: string;
|
||||
takerAssetData: string;
|
||||
},
|
||||
buySignature: string,
|
||||
sellSignature: string,
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
await (this as any).matchOrders.callAsync(buyOrder, sellOrder, buySignature, sellSignature, txData);
|
||||
const txHash = await (this as any).matchOrders.sendTransactionAsync(
|
||||
buyOrder,
|
||||
sellOrder,
|
||||
buySignature,
|
||||
sellSignature,
|
||||
txData,
|
||||
);
|
||||
return txHash;
|
||||
},
|
||||
};
|
||||
public static async deployFrom0xArtifactAsync(
|
||||
artifact: ContractArtifact | SimpleContractArtifact,
|
||||
|
@@ -139,6 +139,11 @@ export class ERC1155ProxyContract extends BaseContract {
|
||||
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
|
||||
return gas;
|
||||
},
|
||||
async validateAndSendTransactionAsync(target: string, txData?: Partial<TxData> | undefined): Promise<string> {
|
||||
await (this as any).addAuthorizedAddress.callAsync(target, txData);
|
||||
const txHash = await (this as any).addAuthorizedAddress.sendTransactionAsync(target, txData);
|
||||
return txHash;
|
||||
},
|
||||
/**
|
||||
* Sends a read-only call to the contract method. Returns the result that would happen if one were to send an
|
||||
* Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas
|
||||
@@ -182,6 +187,7 @@ export class ERC1155ProxyContract extends BaseContract {
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @param target Address to authorize.
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(target: string): string {
|
||||
assert.isString('target', target);
|
||||
@@ -191,13 +197,23 @@ export class ERC1155ProxyContract extends BaseContract {
|
||||
]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): [string] {
|
||||
const self = (this as any) as ERC1155ProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('addAuthorizedAddress(address)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<[string]>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): void {
|
||||
const self = (this as any) as ERC1155ProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('addAuthorizedAddress(address)');
|
||||
@@ -205,11 +221,6 @@ export class ERC1155ProxyContract extends BaseContract {
|
||||
const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<void>(returnData);
|
||||
return abiDecodedReturnData;
|
||||
},
|
||||
async validateAndSendTransactionAsync(target: string, txData?: Partial<TxData> | undefined): Promise<string> {
|
||||
await (this as any).addAuthorizedAddress.callAsync(target, txData);
|
||||
const txHash = await (this as any).addAuthorizedAddress.sendTransactionAsync(target, txData);
|
||||
return txHash;
|
||||
},
|
||||
};
|
||||
public authorities = {
|
||||
/**
|
||||
@@ -257,6 +268,7 @@ export class ERC1155ProxyContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(index_0: BigNumber): string {
|
||||
assert.isBigNumber('index_0', index_0);
|
||||
@@ -264,13 +276,23 @@ export class ERC1155ProxyContract extends BaseContract {
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('authorities(uint256)', [index_0]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): string {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): BigNumber {
|
||||
const self = (this as any) as ERC1155ProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('authorities(uint256)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<string>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<BigNumber>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): string {
|
||||
const self = (this as any) as ERC1155ProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('authorities(uint256)');
|
||||
@@ -364,6 +386,11 @@ export class ERC1155ProxyContract extends BaseContract {
|
||||
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
|
||||
return gas;
|
||||
},
|
||||
async validateAndSendTransactionAsync(target: string, txData?: Partial<TxData> | undefined): Promise<string> {
|
||||
await (this as any).removeAuthorizedAddress.callAsync(target, txData);
|
||||
const txHash = await (this as any).removeAuthorizedAddress.sendTransactionAsync(target, txData);
|
||||
return txHash;
|
||||
},
|
||||
/**
|
||||
* Sends a read-only call to the contract method. Returns the result that would happen if one were to send an
|
||||
* Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas
|
||||
@@ -407,6 +434,7 @@ export class ERC1155ProxyContract extends BaseContract {
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @param target Address to remove authorization from.
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(target: string): string {
|
||||
assert.isString('target', target);
|
||||
@@ -416,13 +444,23 @@ export class ERC1155ProxyContract extends BaseContract {
|
||||
]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): [string] {
|
||||
const self = (this as any) as ERC1155ProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('removeAuthorizedAddress(address)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<[string]>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): void {
|
||||
const self = (this as any) as ERC1155ProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('removeAuthorizedAddress(address)');
|
||||
@@ -430,11 +468,6 @@ export class ERC1155ProxyContract extends BaseContract {
|
||||
const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<void>(returnData);
|
||||
return abiDecodedReturnData;
|
||||
},
|
||||
async validateAndSendTransactionAsync(target: string, txData?: Partial<TxData> | undefined): Promise<string> {
|
||||
await (this as any).removeAuthorizedAddress.callAsync(target, txData);
|
||||
const txHash = await (this as any).removeAuthorizedAddress.sendTransactionAsync(target, txData);
|
||||
return txHash;
|
||||
},
|
||||
};
|
||||
public owner = {
|
||||
/**
|
||||
@@ -477,19 +510,30 @@ export class ERC1155ProxyContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(): string {
|
||||
const self = (this as any) as ERC1155ProxyContract;
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('owner()', []);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): string {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
const self = (this as any) as ERC1155ProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('owner()');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<string>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): string {
|
||||
const self = (this as any) as ERC1155ProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('owner()');
|
||||
@@ -608,6 +652,19 @@ export class ERC1155ProxyContract extends BaseContract {
|
||||
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
|
||||
return gas;
|
||||
},
|
||||
async validateAndSendTransactionAsync(
|
||||
target: string,
|
||||
index: BigNumber,
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
await (this as any).removeAuthorizedAddressAtIndex.callAsync(target, index, txData);
|
||||
const txHash = await (this as any).removeAuthorizedAddressAtIndex.sendTransactionAsync(
|
||||
target,
|
||||
index,
|
||||
txData,
|
||||
);
|
||||
return txHash;
|
||||
},
|
||||
/**
|
||||
* Sends a read-only call to the contract method. Returns the result that would happen if one were to send an
|
||||
* Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas
|
||||
@@ -662,6 +719,7 @@ export class ERC1155ProxyContract extends BaseContract {
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @param target Address to remove authorization from.
|
||||
* @param index Index of target in authorities array.
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(target: string, index: BigNumber): string {
|
||||
assert.isString('target', target);
|
||||
@@ -673,13 +731,23 @@ export class ERC1155ProxyContract extends BaseContract {
|
||||
);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): [string, BigNumber] {
|
||||
const self = (this as any) as ERC1155ProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('removeAuthorizedAddressAtIndex(address,uint256)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<[string, BigNumber]>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): void {
|
||||
const self = (this as any) as ERC1155ProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('removeAuthorizedAddressAtIndex(address,uint256)');
|
||||
@@ -687,19 +755,6 @@ export class ERC1155ProxyContract extends BaseContract {
|
||||
const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<void>(returnData);
|
||||
return abiDecodedReturnData;
|
||||
},
|
||||
async validateAndSendTransactionAsync(
|
||||
target: string,
|
||||
index: BigNumber,
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
await (this as any).removeAuthorizedAddressAtIndex.callAsync(target, index, txData);
|
||||
const txHash = await (this as any).removeAuthorizedAddressAtIndex.sendTransactionAsync(
|
||||
target,
|
||||
index,
|
||||
txData,
|
||||
);
|
||||
return txHash;
|
||||
},
|
||||
};
|
||||
/**
|
||||
* Transfers batch of ERC1155 assets. Either succeeds or throws.
|
||||
@@ -841,6 +896,17 @@ export class ERC1155ProxyContract extends BaseContract {
|
||||
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
|
||||
return gas;
|
||||
},
|
||||
async validateAndSendTransactionAsync(
|
||||
assetData: string,
|
||||
from: string,
|
||||
to: string,
|
||||
amount: BigNumber,
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
await (this as any).transferFrom.callAsync(assetData, from, to, amount, txData);
|
||||
const txHash = await (this as any).transferFrom.sendTransactionAsync(assetData, from, to, amount, txData);
|
||||
return txHash;
|
||||
},
|
||||
/**
|
||||
* Sends a read-only call to the contract method. Returns the result that would happen if one were to send an
|
||||
* Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas
|
||||
@@ -909,6 +975,7 @@ export class ERC1155ProxyContract extends BaseContract {
|
||||
* @param to Address to transfer assets to.
|
||||
* @param amount Amount that will be multiplied with each element of
|
||||
* `assetData.values` to scale the values that will be transferred.
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(assetData: string, from: string, to: string, amount: BigNumber): string {
|
||||
assert.isString('assetData', assetData);
|
||||
@@ -922,13 +989,23 @@ export class ERC1155ProxyContract extends BaseContract {
|
||||
);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): [string, string, string, BigNumber] {
|
||||
const self = (this as any) as ERC1155ProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('transferFrom(bytes,address,address,uint256)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<[string, string, string, BigNumber]>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): void {
|
||||
const self = (this as any) as ERC1155ProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('transferFrom(bytes,address,address,uint256)');
|
||||
@@ -936,17 +1013,6 @@ export class ERC1155ProxyContract extends BaseContract {
|
||||
const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<void>(returnData);
|
||||
return abiDecodedReturnData;
|
||||
},
|
||||
async validateAndSendTransactionAsync(
|
||||
assetData: string,
|
||||
from: string,
|
||||
to: string,
|
||||
amount: BigNumber,
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
await (this as any).transferFrom.callAsync(assetData, from, to, amount, txData);
|
||||
const txHash = await (this as any).transferFrom.sendTransactionAsync(assetData, from, to, amount, txData);
|
||||
return txHash;
|
||||
},
|
||||
};
|
||||
/**
|
||||
* Gets the proxy id associated with the proxy address.
|
||||
@@ -969,19 +1035,9 @@ export class ERC1155ProxyContract extends BaseContract {
|
||||
}
|
||||
const self = (this as any) as ERC1155ProxyContract;
|
||||
const encodedData = self._strictEncodeArguments('getProxyId()', []);
|
||||
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
|
||||
{
|
||||
to: self.address,
|
||||
...callData,
|
||||
data: encodedData,
|
||||
},
|
||||
self._web3Wrapper.getContractDefaults(),
|
||||
);
|
||||
callDataWithDefaults.from = callDataWithDefaults.from
|
||||
? callDataWithDefaults.from.toLowerCase()
|
||||
: callDataWithDefaults.from;
|
||||
const encodedDataBytes = Buffer.from(encodedData.substr(2), 'hex');
|
||||
|
||||
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
|
||||
const rawCallResult = await self.evmExecAsync(encodedDataBytes);
|
||||
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
|
||||
const abiEncoder = self._lookupAbiEncoder('getProxyId()');
|
||||
// tslint:disable boolean-naming
|
||||
@@ -993,19 +1049,30 @@ export class ERC1155ProxyContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(): string {
|
||||
const self = (this as any) as ERC1155ProxyContract;
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('getProxyId()', []);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): string {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
const self = (this as any) as ERC1155ProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('getProxyId()');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<string>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): string {
|
||||
const self = (this as any) as ERC1155ProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('getProxyId()');
|
||||
@@ -1060,6 +1127,7 @@ export class ERC1155ProxyContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(index_0: string): string {
|
||||
assert.isString('index_0', index_0);
|
||||
@@ -1069,13 +1137,23 @@ export class ERC1155ProxyContract extends BaseContract {
|
||||
]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): boolean {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): string {
|
||||
const self = (this as any) as ERC1155ProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('authorized(address)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<boolean>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<string>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): boolean {
|
||||
const self = (this as any) as ERC1155ProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('authorized(address)');
|
||||
@@ -1129,19 +1207,30 @@ export class ERC1155ProxyContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(): string {
|
||||
const self = (this as any) as ERC1155ProxyContract;
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('getAuthorizedAddresses()', []);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): string[] {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
const self = (this as any) as ERC1155ProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('getAuthorizedAddresses()');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<string[]>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): string[] {
|
||||
const self = (this as any) as ERC1155ProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('getAuthorizedAddresses()');
|
||||
@@ -1229,6 +1318,11 @@ export class ERC1155ProxyContract extends BaseContract {
|
||||
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
|
||||
return gas;
|
||||
},
|
||||
async validateAndSendTransactionAsync(newOwner: string, txData?: Partial<TxData> | undefined): Promise<string> {
|
||||
await (this as any).transferOwnership.callAsync(newOwner, txData);
|
||||
const txHash = await (this as any).transferOwnership.sendTransactionAsync(newOwner, txData);
|
||||
return txHash;
|
||||
},
|
||||
/**
|
||||
* Sends a read-only call to the contract method. Returns the result that would happen if one were to send an
|
||||
* Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas
|
||||
@@ -1270,6 +1364,7 @@ export class ERC1155ProxyContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(newOwner: string): string {
|
||||
assert.isString('newOwner', newOwner);
|
||||
@@ -1279,13 +1374,23 @@ export class ERC1155ProxyContract extends BaseContract {
|
||||
]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): [string] {
|
||||
const self = (this as any) as ERC1155ProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('transferOwnership(address)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<[string]>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): void {
|
||||
const self = (this as any) as ERC1155ProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('transferOwnership(address)');
|
||||
@@ -1293,11 +1398,6 @@ export class ERC1155ProxyContract extends BaseContract {
|
||||
const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<void>(returnData);
|
||||
return abiDecodedReturnData;
|
||||
},
|
||||
async validateAndSendTransactionAsync(newOwner: string, txData?: Partial<TxData> | undefined): Promise<string> {
|
||||
await (this as any).transferOwnership.callAsync(newOwner, txData);
|
||||
const txHash = await (this as any).transferOwnership.sendTransactionAsync(newOwner, txData);
|
||||
return txHash;
|
||||
},
|
||||
};
|
||||
private readonly _subscriptionManager: SubscriptionManager<ERC1155ProxyEventArgs, ERC1155ProxyEvents>;
|
||||
public static async deployFrom0xArtifactAsync(
|
||||
|
@@ -139,6 +139,11 @@ export class ERC20ProxyContract extends BaseContract {
|
||||
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
|
||||
return gas;
|
||||
},
|
||||
async validateAndSendTransactionAsync(target: string, txData?: Partial<TxData> | undefined): Promise<string> {
|
||||
await (this as any).addAuthorizedAddress.callAsync(target, txData);
|
||||
const txHash = await (this as any).addAuthorizedAddress.sendTransactionAsync(target, txData);
|
||||
return txHash;
|
||||
},
|
||||
/**
|
||||
* Sends a read-only call to the contract method. Returns the result that would happen if one were to send an
|
||||
* Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas
|
||||
@@ -182,6 +187,7 @@ export class ERC20ProxyContract extends BaseContract {
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @param target Address to authorize.
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(target: string): string {
|
||||
assert.isString('target', target);
|
||||
@@ -191,13 +197,23 @@ export class ERC20ProxyContract extends BaseContract {
|
||||
]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): [string] {
|
||||
const self = (this as any) as ERC20ProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('addAuthorizedAddress(address)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<[string]>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): void {
|
||||
const self = (this as any) as ERC20ProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('addAuthorizedAddress(address)');
|
||||
@@ -205,11 +221,6 @@ export class ERC20ProxyContract extends BaseContract {
|
||||
const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<void>(returnData);
|
||||
return abiDecodedReturnData;
|
||||
},
|
||||
async validateAndSendTransactionAsync(target: string, txData?: Partial<TxData> | undefined): Promise<string> {
|
||||
await (this as any).addAuthorizedAddress.callAsync(target, txData);
|
||||
const txHash = await (this as any).addAuthorizedAddress.sendTransactionAsync(target, txData);
|
||||
return txHash;
|
||||
},
|
||||
};
|
||||
public authorities = {
|
||||
/**
|
||||
@@ -257,6 +268,7 @@ export class ERC20ProxyContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(index_0: BigNumber): string {
|
||||
assert.isBigNumber('index_0', index_0);
|
||||
@@ -264,13 +276,23 @@ export class ERC20ProxyContract extends BaseContract {
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('authorities(uint256)', [index_0]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): string {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): BigNumber {
|
||||
const self = (this as any) as ERC20ProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('authorities(uint256)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<string>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<BigNumber>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): string {
|
||||
const self = (this as any) as ERC20ProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('authorities(uint256)');
|
||||
@@ -364,6 +386,11 @@ export class ERC20ProxyContract extends BaseContract {
|
||||
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
|
||||
return gas;
|
||||
},
|
||||
async validateAndSendTransactionAsync(target: string, txData?: Partial<TxData> | undefined): Promise<string> {
|
||||
await (this as any).removeAuthorizedAddress.callAsync(target, txData);
|
||||
const txHash = await (this as any).removeAuthorizedAddress.sendTransactionAsync(target, txData);
|
||||
return txHash;
|
||||
},
|
||||
/**
|
||||
* Sends a read-only call to the contract method. Returns the result that would happen if one were to send an
|
||||
* Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas
|
||||
@@ -407,6 +434,7 @@ export class ERC20ProxyContract extends BaseContract {
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @param target Address to remove authorization from.
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(target: string): string {
|
||||
assert.isString('target', target);
|
||||
@@ -416,13 +444,23 @@ export class ERC20ProxyContract extends BaseContract {
|
||||
]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): [string] {
|
||||
const self = (this as any) as ERC20ProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('removeAuthorizedAddress(address)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<[string]>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): void {
|
||||
const self = (this as any) as ERC20ProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('removeAuthorizedAddress(address)');
|
||||
@@ -430,11 +468,6 @@ export class ERC20ProxyContract extends BaseContract {
|
||||
const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<void>(returnData);
|
||||
return abiDecodedReturnData;
|
||||
},
|
||||
async validateAndSendTransactionAsync(target: string, txData?: Partial<TxData> | undefined): Promise<string> {
|
||||
await (this as any).removeAuthorizedAddress.callAsync(target, txData);
|
||||
const txHash = await (this as any).removeAuthorizedAddress.sendTransactionAsync(target, txData);
|
||||
return txHash;
|
||||
},
|
||||
};
|
||||
public owner = {
|
||||
/**
|
||||
@@ -477,19 +510,30 @@ export class ERC20ProxyContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(): string {
|
||||
const self = (this as any) as ERC20ProxyContract;
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('owner()', []);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): string {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
const self = (this as any) as ERC20ProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('owner()');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<string>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): string {
|
||||
const self = (this as any) as ERC20ProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('owner()');
|
||||
@@ -608,6 +652,19 @@ export class ERC20ProxyContract extends BaseContract {
|
||||
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
|
||||
return gas;
|
||||
},
|
||||
async validateAndSendTransactionAsync(
|
||||
target: string,
|
||||
index: BigNumber,
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
await (this as any).removeAuthorizedAddressAtIndex.callAsync(target, index, txData);
|
||||
const txHash = await (this as any).removeAuthorizedAddressAtIndex.sendTransactionAsync(
|
||||
target,
|
||||
index,
|
||||
txData,
|
||||
);
|
||||
return txHash;
|
||||
},
|
||||
/**
|
||||
* Sends a read-only call to the contract method. Returns the result that would happen if one were to send an
|
||||
* Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas
|
||||
@@ -662,6 +719,7 @@ export class ERC20ProxyContract extends BaseContract {
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @param target Address to remove authorization from.
|
||||
* @param index Index of target in authorities array.
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(target: string, index: BigNumber): string {
|
||||
assert.isString('target', target);
|
||||
@@ -673,13 +731,23 @@ export class ERC20ProxyContract extends BaseContract {
|
||||
);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): [string, BigNumber] {
|
||||
const self = (this as any) as ERC20ProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('removeAuthorizedAddressAtIndex(address,uint256)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<[string, BigNumber]>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): void {
|
||||
const self = (this as any) as ERC20ProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('removeAuthorizedAddressAtIndex(address,uint256)');
|
||||
@@ -687,19 +755,6 @@ export class ERC20ProxyContract extends BaseContract {
|
||||
const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<void>(returnData);
|
||||
return abiDecodedReturnData;
|
||||
},
|
||||
async validateAndSendTransactionAsync(
|
||||
target: string,
|
||||
index: BigNumber,
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
await (this as any).removeAuthorizedAddressAtIndex.callAsync(target, index, txData);
|
||||
const txHash = await (this as any).removeAuthorizedAddressAtIndex.sendTransactionAsync(
|
||||
target,
|
||||
index,
|
||||
txData,
|
||||
);
|
||||
return txHash;
|
||||
},
|
||||
};
|
||||
/**
|
||||
* Gets the proxy id associated with the proxy address.
|
||||
@@ -722,19 +777,9 @@ export class ERC20ProxyContract extends BaseContract {
|
||||
}
|
||||
const self = (this as any) as ERC20ProxyContract;
|
||||
const encodedData = self._strictEncodeArguments('getProxyId()', []);
|
||||
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
|
||||
{
|
||||
to: self.address,
|
||||
...callData,
|
||||
data: encodedData,
|
||||
},
|
||||
self._web3Wrapper.getContractDefaults(),
|
||||
);
|
||||
callDataWithDefaults.from = callDataWithDefaults.from
|
||||
? callDataWithDefaults.from.toLowerCase()
|
||||
: callDataWithDefaults.from;
|
||||
const encodedDataBytes = Buffer.from(encodedData.substr(2), 'hex');
|
||||
|
||||
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
|
||||
const rawCallResult = await self.evmExecAsync(encodedDataBytes);
|
||||
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
|
||||
const abiEncoder = self._lookupAbiEncoder('getProxyId()');
|
||||
// tslint:disable boolean-naming
|
||||
@@ -746,19 +791,30 @@ export class ERC20ProxyContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(): string {
|
||||
const self = (this as any) as ERC20ProxyContract;
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('getProxyId()', []);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): string {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
const self = (this as any) as ERC20ProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('getProxyId()');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<string>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): string {
|
||||
const self = (this as any) as ERC20ProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('getProxyId()');
|
||||
@@ -813,6 +869,7 @@ export class ERC20ProxyContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(index_0: string): string {
|
||||
assert.isString('index_0', index_0);
|
||||
@@ -822,13 +879,23 @@ export class ERC20ProxyContract extends BaseContract {
|
||||
]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): boolean {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): string {
|
||||
const self = (this as any) as ERC20ProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('authorized(address)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<boolean>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<string>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): boolean {
|
||||
const self = (this as any) as ERC20ProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('authorized(address)');
|
||||
@@ -882,19 +949,30 @@ export class ERC20ProxyContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(): string {
|
||||
const self = (this as any) as ERC20ProxyContract;
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('getAuthorizedAddresses()', []);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): string[] {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
const self = (this as any) as ERC20ProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('getAuthorizedAddresses()');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<string[]>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): string[] {
|
||||
const self = (this as any) as ERC20ProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('getAuthorizedAddresses()');
|
||||
@@ -982,6 +1060,11 @@ export class ERC20ProxyContract extends BaseContract {
|
||||
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
|
||||
return gas;
|
||||
},
|
||||
async validateAndSendTransactionAsync(newOwner: string, txData?: Partial<TxData> | undefined): Promise<string> {
|
||||
await (this as any).transferOwnership.callAsync(newOwner, txData);
|
||||
const txHash = await (this as any).transferOwnership.sendTransactionAsync(newOwner, txData);
|
||||
return txHash;
|
||||
},
|
||||
/**
|
||||
* Sends a read-only call to the contract method. Returns the result that would happen if one were to send an
|
||||
* Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas
|
||||
@@ -1023,6 +1106,7 @@ export class ERC20ProxyContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(newOwner: string): string {
|
||||
assert.isString('newOwner', newOwner);
|
||||
@@ -1032,13 +1116,23 @@ export class ERC20ProxyContract extends BaseContract {
|
||||
]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): [string] {
|
||||
const self = (this as any) as ERC20ProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('transferOwnership(address)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<[string]>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): void {
|
||||
const self = (this as any) as ERC20ProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('transferOwnership(address)');
|
||||
@@ -1046,11 +1140,6 @@ export class ERC20ProxyContract extends BaseContract {
|
||||
const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<void>(returnData);
|
||||
return abiDecodedReturnData;
|
||||
},
|
||||
async validateAndSendTransactionAsync(newOwner: string, txData?: Partial<TxData> | undefined): Promise<string> {
|
||||
await (this as any).transferOwnership.callAsync(newOwner, txData);
|
||||
const txHash = await (this as any).transferOwnership.sendTransactionAsync(newOwner, txData);
|
||||
return txHash;
|
||||
},
|
||||
};
|
||||
private readonly _subscriptionManager: SubscriptionManager<ERC20ProxyEventArgs, ERC20ProxyEvents>;
|
||||
public static async deployFrom0xArtifactAsync(
|
||||
|
@@ -160,6 +160,15 @@ export class ERC20TokenContract extends BaseContract {
|
||||
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
|
||||
return gas;
|
||||
},
|
||||
async validateAndSendTransactionAsync(
|
||||
_spender: string,
|
||||
_value: BigNumber,
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
await (this as any).approve.callAsync(_spender, _value, txData);
|
||||
const txHash = await (this as any).approve.sendTransactionAsync(_spender, _value, txData);
|
||||
return txHash;
|
||||
},
|
||||
/**
|
||||
* Sends a read-only call to the contract method. Returns the result that would happen if one were to send an
|
||||
* Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas
|
||||
@@ -215,6 +224,7 @@ export class ERC20TokenContract extends BaseContract {
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @param _spender The address of the account able to transfer the tokens
|
||||
* @param _value The amount of wei to be approved for transfer
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(_spender: string, _value: BigNumber): string {
|
||||
assert.isString('_spender', _spender);
|
||||
@@ -226,13 +236,23 @@ export class ERC20TokenContract extends BaseContract {
|
||||
]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): boolean {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): string {
|
||||
const self = (this as any) as ERC20TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('approve(address,uint256)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<boolean>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<string>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): boolean {
|
||||
const self = (this as any) as ERC20TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('approve(address,uint256)');
|
||||
@@ -240,15 +260,6 @@ export class ERC20TokenContract extends BaseContract {
|
||||
const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<boolean>(returnData);
|
||||
return abiDecodedReturnData;
|
||||
},
|
||||
async validateAndSendTransactionAsync(
|
||||
_spender: string,
|
||||
_value: BigNumber,
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
await (this as any).approve.callAsync(_spender, _value, txData);
|
||||
const txHash = await (this as any).approve.sendTransactionAsync(_spender, _value, txData);
|
||||
return txHash;
|
||||
},
|
||||
};
|
||||
/**
|
||||
* Query total supply of token
|
||||
@@ -295,19 +306,30 @@ export class ERC20TokenContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(): string {
|
||||
const self = (this as any) as ERC20TokenContract;
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('totalSupply()', []);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): BigNumber {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
const self = (this as any) as ERC20TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('totalSupply()');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<BigNumber>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): BigNumber {
|
||||
const self = (this as any) as ERC20TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('totalSupply()');
|
||||
@@ -438,6 +460,16 @@ export class ERC20TokenContract extends BaseContract {
|
||||
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
|
||||
return gas;
|
||||
},
|
||||
async validateAndSendTransactionAsync(
|
||||
_from: string,
|
||||
_to: string,
|
||||
_value: BigNumber,
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
await (this as any).transferFrom.callAsync(_from, _to, _value, txData);
|
||||
const txHash = await (this as any).transferFrom.sendTransactionAsync(_from, _to, _value, txData);
|
||||
return txHash;
|
||||
},
|
||||
/**
|
||||
* Sends a read-only call to the contract method. Returns the result that would happen if one were to send an
|
||||
* Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas
|
||||
@@ -498,6 +530,7 @@ export class ERC20TokenContract extends BaseContract {
|
||||
* @param _from The address of the sender
|
||||
* @param _to The address of the recipient
|
||||
* @param _value The amount of token to be transferred
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(_from: string, _to: string, _value: BigNumber): string {
|
||||
assert.isString('_from', _from);
|
||||
@@ -511,13 +544,23 @@ export class ERC20TokenContract extends BaseContract {
|
||||
]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): boolean {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): string {
|
||||
const self = (this as any) as ERC20TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('transferFrom(address,address,uint256)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<boolean>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<string>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): boolean {
|
||||
const self = (this as any) as ERC20TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('transferFrom(address,address,uint256)');
|
||||
@@ -525,16 +568,6 @@ export class ERC20TokenContract extends BaseContract {
|
||||
const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<boolean>(returnData);
|
||||
return abiDecodedReturnData;
|
||||
},
|
||||
async validateAndSendTransactionAsync(
|
||||
_from: string,
|
||||
_to: string,
|
||||
_value: BigNumber,
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
await (this as any).transferFrom.callAsync(_from, _to, _value, txData);
|
||||
const txHash = await (this as any).transferFrom.sendTransactionAsync(_from, _to, _value, txData);
|
||||
return txHash;
|
||||
},
|
||||
};
|
||||
/**
|
||||
* Query the balance of owner
|
||||
@@ -588,6 +621,7 @@ export class ERC20TokenContract extends BaseContract {
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @param _owner The address from which the balance will be retrieved
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(_owner: string): string {
|
||||
assert.isString('_owner', _owner);
|
||||
@@ -595,13 +629,23 @@ export class ERC20TokenContract extends BaseContract {
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('balanceOf(address)', [_owner.toLowerCase()]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): BigNumber {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): string {
|
||||
const self = (this as any) as ERC20TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('balanceOf(address)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<BigNumber>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<string>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): BigNumber {
|
||||
const self = (this as any) as ERC20TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('balanceOf(address)');
|
||||
@@ -706,6 +750,15 @@ export class ERC20TokenContract extends BaseContract {
|
||||
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
|
||||
return gas;
|
||||
},
|
||||
async validateAndSendTransactionAsync(
|
||||
_to: string,
|
||||
_value: BigNumber,
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
await (this as any).transfer.callAsync(_to, _value, txData);
|
||||
const txHash = await (this as any).transfer.sendTransactionAsync(_to, _value, txData);
|
||||
return txHash;
|
||||
},
|
||||
/**
|
||||
* Sends a read-only call to the contract method. Returns the result that would happen if one were to send an
|
||||
* Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas
|
||||
@@ -758,6 +811,7 @@ export class ERC20TokenContract extends BaseContract {
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @param _to The address of the recipient
|
||||
* @param _value The amount of token to be transferred
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(_to: string, _value: BigNumber): string {
|
||||
assert.isString('_to', _to);
|
||||
@@ -769,13 +823,23 @@ export class ERC20TokenContract extends BaseContract {
|
||||
]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): boolean {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): string {
|
||||
const self = (this as any) as ERC20TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('transfer(address,uint256)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<boolean>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<string>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): boolean {
|
||||
const self = (this as any) as ERC20TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('transfer(address,uint256)');
|
||||
@@ -783,15 +847,6 @@ export class ERC20TokenContract extends BaseContract {
|
||||
const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<boolean>(returnData);
|
||||
return abiDecodedReturnData;
|
||||
},
|
||||
async validateAndSendTransactionAsync(
|
||||
_to: string,
|
||||
_value: BigNumber,
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
await (this as any).transfer.callAsync(_to, _value, txData);
|
||||
const txHash = await (this as any).transfer.sendTransactionAsync(_to, _value, txData);
|
||||
return txHash;
|
||||
},
|
||||
};
|
||||
public allowance = {
|
||||
/**
|
||||
@@ -849,6 +904,7 @@ export class ERC20TokenContract extends BaseContract {
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @param _owner The address of the account owning tokens
|
||||
* @param _spender The address of the account able to transfer the tokens
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(_owner: string, _spender: string): string {
|
||||
assert.isString('_owner', _owner);
|
||||
@@ -860,13 +916,23 @@ export class ERC20TokenContract extends BaseContract {
|
||||
]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): BigNumber {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): string {
|
||||
const self = (this as any) as ERC20TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('allowance(address,address)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<BigNumber>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<string>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): BigNumber {
|
||||
const self = (this as any) as ERC20TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('allowance(address,address)');
|
||||
|
@@ -139,6 +139,11 @@ export class ERC721ProxyContract extends BaseContract {
|
||||
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
|
||||
return gas;
|
||||
},
|
||||
async validateAndSendTransactionAsync(target: string, txData?: Partial<TxData> | undefined): Promise<string> {
|
||||
await (this as any).addAuthorizedAddress.callAsync(target, txData);
|
||||
const txHash = await (this as any).addAuthorizedAddress.sendTransactionAsync(target, txData);
|
||||
return txHash;
|
||||
},
|
||||
/**
|
||||
* Sends a read-only call to the contract method. Returns the result that would happen if one were to send an
|
||||
* Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas
|
||||
@@ -182,6 +187,7 @@ export class ERC721ProxyContract extends BaseContract {
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @param target Address to authorize.
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(target: string): string {
|
||||
assert.isString('target', target);
|
||||
@@ -191,13 +197,23 @@ export class ERC721ProxyContract extends BaseContract {
|
||||
]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): [string] {
|
||||
const self = (this as any) as ERC721ProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('addAuthorizedAddress(address)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<[string]>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): void {
|
||||
const self = (this as any) as ERC721ProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('addAuthorizedAddress(address)');
|
||||
@@ -205,11 +221,6 @@ export class ERC721ProxyContract extends BaseContract {
|
||||
const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<void>(returnData);
|
||||
return abiDecodedReturnData;
|
||||
},
|
||||
async validateAndSendTransactionAsync(target: string, txData?: Partial<TxData> | undefined): Promise<string> {
|
||||
await (this as any).addAuthorizedAddress.callAsync(target, txData);
|
||||
const txHash = await (this as any).addAuthorizedAddress.sendTransactionAsync(target, txData);
|
||||
return txHash;
|
||||
},
|
||||
};
|
||||
public authorities = {
|
||||
/**
|
||||
@@ -257,6 +268,7 @@ export class ERC721ProxyContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(index_0: BigNumber): string {
|
||||
assert.isBigNumber('index_0', index_0);
|
||||
@@ -264,13 +276,23 @@ export class ERC721ProxyContract extends BaseContract {
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('authorities(uint256)', [index_0]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): string {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): BigNumber {
|
||||
const self = (this as any) as ERC721ProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('authorities(uint256)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<string>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<BigNumber>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): string {
|
||||
const self = (this as any) as ERC721ProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('authorities(uint256)');
|
||||
@@ -364,6 +386,11 @@ export class ERC721ProxyContract extends BaseContract {
|
||||
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
|
||||
return gas;
|
||||
},
|
||||
async validateAndSendTransactionAsync(target: string, txData?: Partial<TxData> | undefined): Promise<string> {
|
||||
await (this as any).removeAuthorizedAddress.callAsync(target, txData);
|
||||
const txHash = await (this as any).removeAuthorizedAddress.sendTransactionAsync(target, txData);
|
||||
return txHash;
|
||||
},
|
||||
/**
|
||||
* Sends a read-only call to the contract method. Returns the result that would happen if one were to send an
|
||||
* Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas
|
||||
@@ -407,6 +434,7 @@ export class ERC721ProxyContract extends BaseContract {
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @param target Address to remove authorization from.
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(target: string): string {
|
||||
assert.isString('target', target);
|
||||
@@ -416,13 +444,23 @@ export class ERC721ProxyContract extends BaseContract {
|
||||
]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): [string] {
|
||||
const self = (this as any) as ERC721ProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('removeAuthorizedAddress(address)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<[string]>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): void {
|
||||
const self = (this as any) as ERC721ProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('removeAuthorizedAddress(address)');
|
||||
@@ -430,11 +468,6 @@ export class ERC721ProxyContract extends BaseContract {
|
||||
const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<void>(returnData);
|
||||
return abiDecodedReturnData;
|
||||
},
|
||||
async validateAndSendTransactionAsync(target: string, txData?: Partial<TxData> | undefined): Promise<string> {
|
||||
await (this as any).removeAuthorizedAddress.callAsync(target, txData);
|
||||
const txHash = await (this as any).removeAuthorizedAddress.sendTransactionAsync(target, txData);
|
||||
return txHash;
|
||||
},
|
||||
};
|
||||
public owner = {
|
||||
/**
|
||||
@@ -477,19 +510,30 @@ export class ERC721ProxyContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(): string {
|
||||
const self = (this as any) as ERC721ProxyContract;
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('owner()', []);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): string {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
const self = (this as any) as ERC721ProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('owner()');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<string>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): string {
|
||||
const self = (this as any) as ERC721ProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('owner()');
|
||||
@@ -608,6 +652,19 @@ export class ERC721ProxyContract extends BaseContract {
|
||||
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
|
||||
return gas;
|
||||
},
|
||||
async validateAndSendTransactionAsync(
|
||||
target: string,
|
||||
index: BigNumber,
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
await (this as any).removeAuthorizedAddressAtIndex.callAsync(target, index, txData);
|
||||
const txHash = await (this as any).removeAuthorizedAddressAtIndex.sendTransactionAsync(
|
||||
target,
|
||||
index,
|
||||
txData,
|
||||
);
|
||||
return txHash;
|
||||
},
|
||||
/**
|
||||
* Sends a read-only call to the contract method. Returns the result that would happen if one were to send an
|
||||
* Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas
|
||||
@@ -662,6 +719,7 @@ export class ERC721ProxyContract extends BaseContract {
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @param target Address to remove authorization from.
|
||||
* @param index Index of target in authorities array.
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(target: string, index: BigNumber): string {
|
||||
assert.isString('target', target);
|
||||
@@ -673,13 +731,23 @@ export class ERC721ProxyContract extends BaseContract {
|
||||
);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): [string, BigNumber] {
|
||||
const self = (this as any) as ERC721ProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('removeAuthorizedAddressAtIndex(address,uint256)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<[string, BigNumber]>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): void {
|
||||
const self = (this as any) as ERC721ProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('removeAuthorizedAddressAtIndex(address,uint256)');
|
||||
@@ -687,19 +755,6 @@ export class ERC721ProxyContract extends BaseContract {
|
||||
const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<void>(returnData);
|
||||
return abiDecodedReturnData;
|
||||
},
|
||||
async validateAndSendTransactionAsync(
|
||||
target: string,
|
||||
index: BigNumber,
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
await (this as any).removeAuthorizedAddressAtIndex.callAsync(target, index, txData);
|
||||
const txHash = await (this as any).removeAuthorizedAddressAtIndex.sendTransactionAsync(
|
||||
target,
|
||||
index,
|
||||
txData,
|
||||
);
|
||||
return txHash;
|
||||
},
|
||||
};
|
||||
/**
|
||||
* Gets the proxy id associated with the proxy address.
|
||||
@@ -722,19 +777,9 @@ export class ERC721ProxyContract extends BaseContract {
|
||||
}
|
||||
const self = (this as any) as ERC721ProxyContract;
|
||||
const encodedData = self._strictEncodeArguments('getProxyId()', []);
|
||||
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
|
||||
{
|
||||
to: self.address,
|
||||
...callData,
|
||||
data: encodedData,
|
||||
},
|
||||
self._web3Wrapper.getContractDefaults(),
|
||||
);
|
||||
callDataWithDefaults.from = callDataWithDefaults.from
|
||||
? callDataWithDefaults.from.toLowerCase()
|
||||
: callDataWithDefaults.from;
|
||||
const encodedDataBytes = Buffer.from(encodedData.substr(2), 'hex');
|
||||
|
||||
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
|
||||
const rawCallResult = await self.evmExecAsync(encodedDataBytes);
|
||||
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
|
||||
const abiEncoder = self._lookupAbiEncoder('getProxyId()');
|
||||
// tslint:disable boolean-naming
|
||||
@@ -746,19 +791,30 @@ export class ERC721ProxyContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(): string {
|
||||
const self = (this as any) as ERC721ProxyContract;
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('getProxyId()', []);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): string {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
const self = (this as any) as ERC721ProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('getProxyId()');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<string>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): string {
|
||||
const self = (this as any) as ERC721ProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('getProxyId()');
|
||||
@@ -813,6 +869,7 @@ export class ERC721ProxyContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(index_0: string): string {
|
||||
assert.isString('index_0', index_0);
|
||||
@@ -822,13 +879,23 @@ export class ERC721ProxyContract extends BaseContract {
|
||||
]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): boolean {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): string {
|
||||
const self = (this as any) as ERC721ProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('authorized(address)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<boolean>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<string>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): boolean {
|
||||
const self = (this as any) as ERC721ProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('authorized(address)');
|
||||
@@ -882,19 +949,30 @@ export class ERC721ProxyContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(): string {
|
||||
const self = (this as any) as ERC721ProxyContract;
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('getAuthorizedAddresses()', []);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): string[] {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
const self = (this as any) as ERC721ProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('getAuthorizedAddresses()');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<string[]>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): string[] {
|
||||
const self = (this as any) as ERC721ProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('getAuthorizedAddresses()');
|
||||
@@ -982,6 +1060,11 @@ export class ERC721ProxyContract extends BaseContract {
|
||||
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
|
||||
return gas;
|
||||
},
|
||||
async validateAndSendTransactionAsync(newOwner: string, txData?: Partial<TxData> | undefined): Promise<string> {
|
||||
await (this as any).transferOwnership.callAsync(newOwner, txData);
|
||||
const txHash = await (this as any).transferOwnership.sendTransactionAsync(newOwner, txData);
|
||||
return txHash;
|
||||
},
|
||||
/**
|
||||
* Sends a read-only call to the contract method. Returns the result that would happen if one were to send an
|
||||
* Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas
|
||||
@@ -1023,6 +1106,7 @@ export class ERC721ProxyContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(newOwner: string): string {
|
||||
assert.isString('newOwner', newOwner);
|
||||
@@ -1032,13 +1116,23 @@ export class ERC721ProxyContract extends BaseContract {
|
||||
]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): [string] {
|
||||
const self = (this as any) as ERC721ProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('transferOwnership(address)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<[string]>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): void {
|
||||
const self = (this as any) as ERC721ProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('transferOwnership(address)');
|
||||
@@ -1046,11 +1140,6 @@ export class ERC721ProxyContract extends BaseContract {
|
||||
const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<void>(returnData);
|
||||
return abiDecodedReturnData;
|
||||
},
|
||||
async validateAndSendTransactionAsync(newOwner: string, txData?: Partial<TxData> | undefined): Promise<string> {
|
||||
await (this as any).transferOwnership.callAsync(newOwner, txData);
|
||||
const txHash = await (this as any).transferOwnership.sendTransactionAsync(newOwner, txData);
|
||||
return txHash;
|
||||
},
|
||||
};
|
||||
private readonly _subscriptionManager: SubscriptionManager<ERC721ProxyEventArgs, ERC721ProxyEvents>;
|
||||
public static async deployFrom0xArtifactAsync(
|
||||
|
@@ -116,6 +116,7 @@ export class ERC721TokenContract extends BaseContract {
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @param _tokenId The NFT to find the approved address for
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(_tokenId: BigNumber): string {
|
||||
assert.isBigNumber('_tokenId', _tokenId);
|
||||
@@ -123,13 +124,23 @@ export class ERC721TokenContract extends BaseContract {
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('getApproved(uint256)', [_tokenId]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): string {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): BigNumber {
|
||||
const self = (this as any) as ERC721TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('getApproved(uint256)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<string>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<BigNumber>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): string {
|
||||
const self = (this as any) as ERC721TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('getApproved(uint256)');
|
||||
@@ -246,6 +257,15 @@ export class ERC721TokenContract extends BaseContract {
|
||||
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
|
||||
return gas;
|
||||
},
|
||||
async validateAndSendTransactionAsync(
|
||||
_approved: string,
|
||||
_tokenId: BigNumber,
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
await (this as any).approve.callAsync(_approved, _tokenId, txData);
|
||||
const txHash = await (this as any).approve.sendTransactionAsync(_approved, _tokenId, txData);
|
||||
return txHash;
|
||||
},
|
||||
/**
|
||||
* Sends a read-only call to the contract method. Returns the result that would happen if one were to send an
|
||||
* Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas
|
||||
@@ -300,6 +320,7 @@ export class ERC721TokenContract extends BaseContract {
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @param _approved The new approved NFT controller
|
||||
* @param _tokenId The NFT to approve
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(_approved: string, _tokenId: BigNumber): string {
|
||||
assert.isString('_approved', _approved);
|
||||
@@ -311,13 +332,23 @@ export class ERC721TokenContract extends BaseContract {
|
||||
]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): [string, BigNumber] {
|
||||
const self = (this as any) as ERC721TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('approve(address,uint256)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<[string, BigNumber]>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): void {
|
||||
const self = (this as any) as ERC721TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('approve(address,uint256)');
|
||||
@@ -325,15 +356,6 @@ export class ERC721TokenContract extends BaseContract {
|
||||
const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<void>(returnData);
|
||||
return abiDecodedReturnData;
|
||||
},
|
||||
async validateAndSendTransactionAsync(
|
||||
_approved: string,
|
||||
_tokenId: BigNumber,
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
await (this as any).approve.callAsync(_approved, _tokenId, txData);
|
||||
const txHash = await (this as any).approve.sendTransactionAsync(_approved, _tokenId, txData);
|
||||
return txHash;
|
||||
},
|
||||
};
|
||||
/**
|
||||
* Throws unless `msg.sender` is the current owner, an authorized
|
||||
@@ -460,6 +482,16 @@ export class ERC721TokenContract extends BaseContract {
|
||||
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
|
||||
return gas;
|
||||
},
|
||||
async validateAndSendTransactionAsync(
|
||||
_from: string,
|
||||
_to: string,
|
||||
_tokenId: BigNumber,
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
await (this as any).transferFrom.callAsync(_from, _to, _tokenId, txData);
|
||||
const txHash = await (this as any).transferFrom.sendTransactionAsync(_from, _to, _tokenId, txData);
|
||||
return txHash;
|
||||
},
|
||||
/**
|
||||
* Sends a read-only call to the contract method. Returns the result that would happen if one were to send an
|
||||
* Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas
|
||||
@@ -519,6 +551,7 @@ export class ERC721TokenContract extends BaseContract {
|
||||
* @param _from The current owner of the NFT
|
||||
* @param _to The new owner
|
||||
* @param _tokenId The NFT to transfer
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(_from: string, _to: string, _tokenId: BigNumber): string {
|
||||
assert.isString('_from', _from);
|
||||
@@ -532,13 +565,23 @@ export class ERC721TokenContract extends BaseContract {
|
||||
]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): [string, string, BigNumber] {
|
||||
const self = (this as any) as ERC721TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('transferFrom(address,address,uint256)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<[string, string, BigNumber]>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): void {
|
||||
const self = (this as any) as ERC721TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('transferFrom(address,address,uint256)');
|
||||
@@ -546,16 +589,6 @@ export class ERC721TokenContract extends BaseContract {
|
||||
const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<void>(returnData);
|
||||
return abiDecodedReturnData;
|
||||
},
|
||||
async validateAndSendTransactionAsync(
|
||||
_from: string,
|
||||
_to: string,
|
||||
_tokenId: BigNumber,
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
await (this as any).transferFrom.callAsync(_from, _to, _tokenId, txData);
|
||||
const txHash = await (this as any).transferFrom.sendTransactionAsync(_from, _to, _tokenId, txData);
|
||||
return txHash;
|
||||
},
|
||||
};
|
||||
/**
|
||||
* This works identically to the other function with an extra data parameter,
|
||||
@@ -680,6 +713,16 @@ export class ERC721TokenContract extends BaseContract {
|
||||
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
|
||||
return gas;
|
||||
},
|
||||
async validateAndSendTransactionAsync(
|
||||
_from: string,
|
||||
_to: string,
|
||||
_tokenId: BigNumber,
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
await (this as any).safeTransferFrom1.callAsync(_from, _to, _tokenId, txData);
|
||||
const txHash = await (this as any).safeTransferFrom1.sendTransactionAsync(_from, _to, _tokenId, txData);
|
||||
return txHash;
|
||||
},
|
||||
/**
|
||||
* Sends a read-only call to the contract method. Returns the result that would happen if one were to send an
|
||||
* Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas
|
||||
@@ -739,6 +782,7 @@ export class ERC721TokenContract extends BaseContract {
|
||||
* @param _from The current owner of the NFT
|
||||
* @param _to The new owner
|
||||
* @param _tokenId The NFT to transfer
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(_from: string, _to: string, _tokenId: BigNumber): string {
|
||||
assert.isString('_from', _from);
|
||||
@@ -752,13 +796,23 @@ export class ERC721TokenContract extends BaseContract {
|
||||
]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): [string, string, BigNumber] {
|
||||
const self = (this as any) as ERC721TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('safeTransferFrom(address,address,uint256)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<[string, string, BigNumber]>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): void {
|
||||
const self = (this as any) as ERC721TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('safeTransferFrom(address,address,uint256)');
|
||||
@@ -766,16 +820,6 @@ export class ERC721TokenContract extends BaseContract {
|
||||
const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<void>(returnData);
|
||||
return abiDecodedReturnData;
|
||||
},
|
||||
async validateAndSendTransactionAsync(
|
||||
_from: string,
|
||||
_to: string,
|
||||
_tokenId: BigNumber,
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
await (this as any).safeTransferFrom1.callAsync(_from, _to, _tokenId, txData);
|
||||
const txHash = await (this as any).safeTransferFrom1.sendTransactionAsync(_from, _to, _tokenId, txData);
|
||||
return txHash;
|
||||
},
|
||||
};
|
||||
/**
|
||||
* NFTs assigned to zero address are considered invalid, and queries
|
||||
@@ -830,6 +874,7 @@ export class ERC721TokenContract extends BaseContract {
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @param _tokenId The identifier for an NFT
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(_tokenId: BigNumber): string {
|
||||
assert.isBigNumber('_tokenId', _tokenId);
|
||||
@@ -837,13 +882,23 @@ export class ERC721TokenContract extends BaseContract {
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('ownerOf(uint256)', [_tokenId]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): string {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): BigNumber {
|
||||
const self = (this as any) as ERC721TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('ownerOf(uint256)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<string>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<BigNumber>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): string {
|
||||
const self = (this as any) as ERC721TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('ownerOf(uint256)');
|
||||
@@ -905,6 +960,7 @@ export class ERC721TokenContract extends BaseContract {
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @param _owner An address for whom to query the balance
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(_owner: string): string {
|
||||
assert.isString('_owner', _owner);
|
||||
@@ -912,13 +968,23 @@ export class ERC721TokenContract extends BaseContract {
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('balanceOf(address)', [_owner.toLowerCase()]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): BigNumber {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): string {
|
||||
const self = (this as any) as ERC721TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('balanceOf(address)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<BigNumber>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<string>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): BigNumber {
|
||||
const self = (this as any) as ERC721TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('balanceOf(address)');
|
||||
@@ -1038,6 +1104,15 @@ export class ERC721TokenContract extends BaseContract {
|
||||
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
|
||||
return gas;
|
||||
},
|
||||
async validateAndSendTransactionAsync(
|
||||
_operator: string,
|
||||
_approved: boolean,
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
await (this as any).setApprovalForAll.callAsync(_operator, _approved, txData);
|
||||
const txHash = await (this as any).setApprovalForAll.sendTransactionAsync(_operator, _approved, txData);
|
||||
return txHash;
|
||||
},
|
||||
/**
|
||||
* Sends a read-only call to the contract method. Returns the result that would happen if one were to send an
|
||||
* Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas
|
||||
@@ -1092,6 +1167,7 @@ export class ERC721TokenContract extends BaseContract {
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @param _operator Address to add to the set of authorized operators
|
||||
* @param _approved True if the operator is approved, false to revoke approval
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(_operator: string, _approved: boolean): string {
|
||||
assert.isString('_operator', _operator);
|
||||
@@ -1103,13 +1179,23 @@ export class ERC721TokenContract extends BaseContract {
|
||||
]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): [string, boolean] {
|
||||
const self = (this as any) as ERC721TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('setApprovalForAll(address,bool)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<[string, boolean]>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): void {
|
||||
const self = (this as any) as ERC721TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('setApprovalForAll(address,bool)');
|
||||
@@ -1117,15 +1203,6 @@ export class ERC721TokenContract extends BaseContract {
|
||||
const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<void>(returnData);
|
||||
return abiDecodedReturnData;
|
||||
},
|
||||
async validateAndSendTransactionAsync(
|
||||
_operator: string,
|
||||
_approved: boolean,
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
await (this as any).setApprovalForAll.callAsync(_operator, _approved, txData);
|
||||
const txHash = await (this as any).setApprovalForAll.sendTransactionAsync(_operator, _approved, txData);
|
||||
return txHash;
|
||||
},
|
||||
};
|
||||
/**
|
||||
* Throws unless `msg.sender` is the current owner, an authorized
|
||||
@@ -1273,6 +1350,23 @@ export class ERC721TokenContract extends BaseContract {
|
||||
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
|
||||
return gas;
|
||||
},
|
||||
async validateAndSendTransactionAsync(
|
||||
_from: string,
|
||||
_to: string,
|
||||
_tokenId: BigNumber,
|
||||
_data: string,
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
await (this as any).safeTransferFrom2.callAsync(_from, _to, _tokenId, _data, txData);
|
||||
const txHash = await (this as any).safeTransferFrom2.sendTransactionAsync(
|
||||
_from,
|
||||
_to,
|
||||
_tokenId,
|
||||
_data,
|
||||
txData,
|
||||
);
|
||||
return txHash;
|
||||
},
|
||||
/**
|
||||
* Sends a read-only call to the contract method. Returns the result that would happen if one were to send an
|
||||
* Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas
|
||||
@@ -1337,6 +1431,7 @@ export class ERC721TokenContract extends BaseContract {
|
||||
* @param _to The new owner
|
||||
* @param _tokenId The NFT to transfer
|
||||
* @param _data Additional data with no specified format, sent in call to `_to`
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(_from: string, _to: string, _tokenId: BigNumber, _data: string): string {
|
||||
assert.isString('_from', _from);
|
||||
@@ -1350,13 +1445,23 @@ export class ERC721TokenContract extends BaseContract {
|
||||
);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): [string, string, BigNumber, string] {
|
||||
const self = (this as any) as ERC721TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('safeTransferFrom(address,address,uint256,bytes)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<[string, string, BigNumber, string]>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): void {
|
||||
const self = (this as any) as ERC721TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('safeTransferFrom(address,address,uint256,bytes)');
|
||||
@@ -1364,23 +1469,6 @@ export class ERC721TokenContract extends BaseContract {
|
||||
const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<void>(returnData);
|
||||
return abiDecodedReturnData;
|
||||
},
|
||||
async validateAndSendTransactionAsync(
|
||||
_from: string,
|
||||
_to: string,
|
||||
_tokenId: BigNumber,
|
||||
_data: string,
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
await (this as any).safeTransferFrom2.callAsync(_from, _to, _tokenId, _data, txData);
|
||||
const txHash = await (this as any).safeTransferFrom2.sendTransactionAsync(
|
||||
_from,
|
||||
_to,
|
||||
_tokenId,
|
||||
_data,
|
||||
txData,
|
||||
);
|
||||
return txHash;
|
||||
},
|
||||
};
|
||||
public isApprovedForAll = {
|
||||
/**
|
||||
@@ -1438,6 +1526,7 @@ export class ERC721TokenContract extends BaseContract {
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @param _owner The address that owns the NFTs
|
||||
* @param _operator The address that acts on behalf of the owner
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(_owner: string, _operator: string): string {
|
||||
assert.isString('_owner', _owner);
|
||||
@@ -1449,13 +1538,23 @@ export class ERC721TokenContract extends BaseContract {
|
||||
]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): boolean {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): string {
|
||||
const self = (this as any) as ERC721TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('isApprovedForAll(address,address)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<boolean>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<string>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): boolean {
|
||||
const self = (this as any) as ERC721TokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('isApprovedForAll(address,address)');
|
||||
|
@@ -80,6 +80,7 @@ export class EthBalanceCheckerContract extends BaseContract {
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @param addresses Array of addresses.
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(addresses: string[]): string {
|
||||
assert.isArray('addresses', addresses);
|
||||
@@ -87,13 +88,23 @@ export class EthBalanceCheckerContract extends BaseContract {
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('getEthBalances(address[])', [addresses]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): BigNumber[] {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): string[] {
|
||||
const self = (this as any) as EthBalanceCheckerContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('getEthBalances(address[])');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<BigNumber[]>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<string[]>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): BigNumber[] {
|
||||
const self = (this as any) as EthBalanceCheckerContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('getEthBalances(address[])');
|
||||
|
1897
packages/abi-gen-wrappers/src/generated-wrappers/exchange.ts
generated
1897
packages/abi-gen-wrappers/src/generated-wrappers/exchange.ts
generated
File diff suppressed because it is too large
Load Diff
@@ -302,6 +302,64 @@ export class ForwarderContract extends BaseContract {
|
||||
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
|
||||
return gas;
|
||||
},
|
||||
async validateAndSendTransactionAsync(
|
||||
orders: Array<{
|
||||
makerAddress: string;
|
||||
takerAddress: string;
|
||||
feeRecipientAddress: string;
|
||||
senderAddress: string;
|
||||
makerAssetAmount: BigNumber;
|
||||
takerAssetAmount: BigNumber;
|
||||
makerFee: BigNumber;
|
||||
takerFee: BigNumber;
|
||||
expirationTimeSeconds: BigNumber;
|
||||
salt: BigNumber;
|
||||
makerAssetData: string;
|
||||
takerAssetData: string;
|
||||
}>,
|
||||
makerAssetFillAmount: BigNumber,
|
||||
signatures: string[],
|
||||
feeOrders: Array<{
|
||||
makerAddress: string;
|
||||
takerAddress: string;
|
||||
feeRecipientAddress: string;
|
||||
senderAddress: string;
|
||||
makerAssetAmount: BigNumber;
|
||||
takerAssetAmount: BigNumber;
|
||||
makerFee: BigNumber;
|
||||
takerFee: BigNumber;
|
||||
expirationTimeSeconds: BigNumber;
|
||||
salt: BigNumber;
|
||||
makerAssetData: string;
|
||||
takerAssetData: string;
|
||||
}>,
|
||||
feeSignatures: string[],
|
||||
feePercentage: BigNumber,
|
||||
feeRecipient: string,
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
await (this as any).marketBuyOrdersWithEth.callAsync(
|
||||
orders,
|
||||
makerAssetFillAmount,
|
||||
signatures,
|
||||
feeOrders,
|
||||
feeSignatures,
|
||||
feePercentage,
|
||||
feeRecipient,
|
||||
txData,
|
||||
);
|
||||
const txHash = await (this as any).marketBuyOrdersWithEth.sendTransactionAsync(
|
||||
orders,
|
||||
makerAssetFillAmount,
|
||||
signatures,
|
||||
feeOrders,
|
||||
feeSignatures,
|
||||
feePercentage,
|
||||
feeRecipient,
|
||||
txData,
|
||||
);
|
||||
return txHash;
|
||||
},
|
||||
/**
|
||||
* Sends a read-only call to the contract method. Returns the result that would happen if one were to send an
|
||||
* Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas
|
||||
@@ -449,6 +507,7 @@ export class ForwarderContract extends BaseContract {
|
||||
* @param feePercentage Percentage of WETH sold that will payed as fee to
|
||||
* forwarding contract feeRecipient.
|
||||
* @param feeRecipient Address that will receive ETH when orders are filled.
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(
|
||||
orders: Array<{
|
||||
@@ -507,21 +566,47 @@ export class ForwarderContract extends BaseContract {
|
||||
);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(
|
||||
callData: string,
|
||||
): [
|
||||
{
|
||||
makerAssetFilledAmount: BigNumber;
|
||||
takerAssetFilledAmount: BigNumber;
|
||||
makerFeePaid: BigNumber;
|
||||
takerFeePaid: BigNumber;
|
||||
},
|
||||
{
|
||||
makerAssetFilledAmount: BigNumber;
|
||||
takerAssetFilledAmount: BigNumber;
|
||||
makerFeePaid: BigNumber;
|
||||
takerFeePaid: BigNumber;
|
||||
}
|
||||
Array<{
|
||||
makerAddress: string;
|
||||
takerAddress: string;
|
||||
feeRecipientAddress: string;
|
||||
senderAddress: string;
|
||||
makerAssetAmount: BigNumber;
|
||||
takerAssetAmount: BigNumber;
|
||||
makerFee: BigNumber;
|
||||
takerFee: BigNumber;
|
||||
expirationTimeSeconds: BigNumber;
|
||||
salt: BigNumber;
|
||||
makerAssetData: string;
|
||||
takerAssetData: string;
|
||||
}>,
|
||||
BigNumber,
|
||||
string[],
|
||||
Array<{
|
||||
makerAddress: string;
|
||||
takerAddress: string;
|
||||
feeRecipientAddress: string;
|
||||
senderAddress: string;
|
||||
makerAssetAmount: BigNumber;
|
||||
takerAssetAmount: BigNumber;
|
||||
makerFee: BigNumber;
|
||||
takerFee: BigNumber;
|
||||
expirationTimeSeconds: BigNumber;
|
||||
salt: BigNumber;
|
||||
makerAssetData: string;
|
||||
takerAssetData: string;
|
||||
}>,
|
||||
string[],
|
||||
BigNumber,
|
||||
string
|
||||
] {
|
||||
const self = (this as any) as ForwarderContract;
|
||||
const abiEncoder = self._lookupAbiEncoder(
|
||||
@@ -530,22 +615,48 @@ export class ForwarderContract extends BaseContract {
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<
|
||||
[
|
||||
{
|
||||
makerAssetFilledAmount: BigNumber;
|
||||
takerAssetFilledAmount: BigNumber;
|
||||
makerFeePaid: BigNumber;
|
||||
takerFeePaid: BigNumber;
|
||||
},
|
||||
{
|
||||
makerAssetFilledAmount: BigNumber;
|
||||
takerAssetFilledAmount: BigNumber;
|
||||
makerFeePaid: BigNumber;
|
||||
takerFeePaid: BigNumber;
|
||||
}
|
||||
Array<{
|
||||
makerAddress: string;
|
||||
takerAddress: string;
|
||||
feeRecipientAddress: string;
|
||||
senderAddress: string;
|
||||
makerAssetAmount: BigNumber;
|
||||
takerAssetAmount: BigNumber;
|
||||
makerFee: BigNumber;
|
||||
takerFee: BigNumber;
|
||||
expirationTimeSeconds: BigNumber;
|
||||
salt: BigNumber;
|
||||
makerAssetData: string;
|
||||
takerAssetData: string;
|
||||
}>,
|
||||
BigNumber,
|
||||
string[],
|
||||
Array<{
|
||||
makerAddress: string;
|
||||
takerAddress: string;
|
||||
feeRecipientAddress: string;
|
||||
senderAddress: string;
|
||||
makerAssetAmount: BigNumber;
|
||||
takerAssetAmount: BigNumber;
|
||||
makerFee: BigNumber;
|
||||
takerFee: BigNumber;
|
||||
expirationTimeSeconds: BigNumber;
|
||||
salt: BigNumber;
|
||||
makerAssetData: string;
|
||||
takerAssetData: string;
|
||||
}>,
|
||||
string[],
|
||||
BigNumber,
|
||||
string
|
||||
]
|
||||
>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(
|
||||
returnData: string,
|
||||
): [
|
||||
@@ -585,64 +696,6 @@ export class ForwarderContract extends BaseContract {
|
||||
>(returnData);
|
||||
return abiDecodedReturnData;
|
||||
},
|
||||
async validateAndSendTransactionAsync(
|
||||
orders: Array<{
|
||||
makerAddress: string;
|
||||
takerAddress: string;
|
||||
feeRecipientAddress: string;
|
||||
senderAddress: string;
|
||||
makerAssetAmount: BigNumber;
|
||||
takerAssetAmount: BigNumber;
|
||||
makerFee: BigNumber;
|
||||
takerFee: BigNumber;
|
||||
expirationTimeSeconds: BigNumber;
|
||||
salt: BigNumber;
|
||||
makerAssetData: string;
|
||||
takerAssetData: string;
|
||||
}>,
|
||||
makerAssetFillAmount: BigNumber,
|
||||
signatures: string[],
|
||||
feeOrders: Array<{
|
||||
makerAddress: string;
|
||||
takerAddress: string;
|
||||
feeRecipientAddress: string;
|
||||
senderAddress: string;
|
||||
makerAssetAmount: BigNumber;
|
||||
takerAssetAmount: BigNumber;
|
||||
makerFee: BigNumber;
|
||||
takerFee: BigNumber;
|
||||
expirationTimeSeconds: BigNumber;
|
||||
salt: BigNumber;
|
||||
makerAssetData: string;
|
||||
takerAssetData: string;
|
||||
}>,
|
||||
feeSignatures: string[],
|
||||
feePercentage: BigNumber,
|
||||
feeRecipient: string,
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
await (this as any).marketBuyOrdersWithEth.callAsync(
|
||||
orders,
|
||||
makerAssetFillAmount,
|
||||
signatures,
|
||||
feeOrders,
|
||||
feeSignatures,
|
||||
feePercentage,
|
||||
feeRecipient,
|
||||
txData,
|
||||
);
|
||||
const txHash = await (this as any).marketBuyOrdersWithEth.sendTransactionAsync(
|
||||
orders,
|
||||
makerAssetFillAmount,
|
||||
signatures,
|
||||
feeOrders,
|
||||
feeSignatures,
|
||||
feePercentage,
|
||||
feeRecipient,
|
||||
txData,
|
||||
);
|
||||
return txHash;
|
||||
},
|
||||
};
|
||||
/**
|
||||
* Withdraws assets from this contract. The contract requires a ZRX balance in order to
|
||||
@@ -746,6 +799,15 @@ export class ForwarderContract extends BaseContract {
|
||||
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
|
||||
return gas;
|
||||
},
|
||||
async validateAndSendTransactionAsync(
|
||||
assetData: string,
|
||||
amount: BigNumber,
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
await (this as any).withdrawAsset.callAsync(assetData, amount, txData);
|
||||
const txHash = await (this as any).withdrawAsset.sendTransactionAsync(assetData, amount, txData);
|
||||
return txHash;
|
||||
},
|
||||
/**
|
||||
* Sends a read-only call to the contract method. Returns the result that would happen if one were to send an
|
||||
* Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas
|
||||
@@ -797,6 +859,7 @@ export class ForwarderContract extends BaseContract {
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @param assetData Byte array encoded for the respective asset proxy.
|
||||
* @param amount Amount of ERC20 token to withdraw.
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(assetData: string, amount: BigNumber): string {
|
||||
assert.isString('assetData', assetData);
|
||||
@@ -808,13 +871,23 @@ export class ForwarderContract extends BaseContract {
|
||||
]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): [string, BigNumber] {
|
||||
const self = (this as any) as ForwarderContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('withdrawAsset(bytes,uint256)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<[string, BigNumber]>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): void {
|
||||
const self = (this as any) as ForwarderContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('withdrawAsset(bytes,uint256)');
|
||||
@@ -822,15 +895,6 @@ export class ForwarderContract extends BaseContract {
|
||||
const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<void>(returnData);
|
||||
return abiDecodedReturnData;
|
||||
},
|
||||
async validateAndSendTransactionAsync(
|
||||
assetData: string,
|
||||
amount: BigNumber,
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
await (this as any).withdrawAsset.callAsync(assetData, amount, txData);
|
||||
const txHash = await (this as any).withdrawAsset.sendTransactionAsync(assetData, amount, txData);
|
||||
return txHash;
|
||||
},
|
||||
};
|
||||
public owner = {
|
||||
/**
|
||||
@@ -873,19 +937,30 @@ export class ForwarderContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(): string {
|
||||
const self = (this as any) as ForwarderContract;
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('owner()', []);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): string {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
const self = (this as any) as ForwarderContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('owner()');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<string>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): string {
|
||||
const self = (this as any) as ForwarderContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('owner()');
|
||||
@@ -1142,6 +1217,61 @@ export class ForwarderContract extends BaseContract {
|
||||
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
|
||||
return gas;
|
||||
},
|
||||
async validateAndSendTransactionAsync(
|
||||
orders: Array<{
|
||||
makerAddress: string;
|
||||
takerAddress: string;
|
||||
feeRecipientAddress: string;
|
||||
senderAddress: string;
|
||||
makerAssetAmount: BigNumber;
|
||||
takerAssetAmount: BigNumber;
|
||||
makerFee: BigNumber;
|
||||
takerFee: BigNumber;
|
||||
expirationTimeSeconds: BigNumber;
|
||||
salt: BigNumber;
|
||||
makerAssetData: string;
|
||||
takerAssetData: string;
|
||||
}>,
|
||||
signatures: string[],
|
||||
feeOrders: Array<{
|
||||
makerAddress: string;
|
||||
takerAddress: string;
|
||||
feeRecipientAddress: string;
|
||||
senderAddress: string;
|
||||
makerAssetAmount: BigNumber;
|
||||
takerAssetAmount: BigNumber;
|
||||
makerFee: BigNumber;
|
||||
takerFee: BigNumber;
|
||||
expirationTimeSeconds: BigNumber;
|
||||
salt: BigNumber;
|
||||
makerAssetData: string;
|
||||
takerAssetData: string;
|
||||
}>,
|
||||
feeSignatures: string[],
|
||||
feePercentage: BigNumber,
|
||||
feeRecipient: string,
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
await (this as any).marketSellOrdersWithEth.callAsync(
|
||||
orders,
|
||||
signatures,
|
||||
feeOrders,
|
||||
feeSignatures,
|
||||
feePercentage,
|
||||
feeRecipient,
|
||||
txData,
|
||||
);
|
||||
const txHash = await (this as any).marketSellOrdersWithEth.sendTransactionAsync(
|
||||
orders,
|
||||
signatures,
|
||||
feeOrders,
|
||||
feeSignatures,
|
||||
feePercentage,
|
||||
feeRecipient,
|
||||
txData,
|
||||
);
|
||||
return txHash;
|
||||
},
|
||||
/**
|
||||
* Sends a read-only call to the contract method. Returns the result that would happen if one were to send an
|
||||
* Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas
|
||||
@@ -1277,6 +1407,7 @@ export class ForwarderContract extends BaseContract {
|
||||
* @param feePercentage Percentage of WETH sold that will payed as fee to
|
||||
* forwarding contract feeRecipient.
|
||||
* @param feeRecipient Address that will receive ETH when orders are filled.
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(
|
||||
orders: Array<{
|
||||
@@ -1325,21 +1456,46 @@ export class ForwarderContract extends BaseContract {
|
||||
);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(
|
||||
callData: string,
|
||||
): [
|
||||
{
|
||||
makerAssetFilledAmount: BigNumber;
|
||||
takerAssetFilledAmount: BigNumber;
|
||||
makerFeePaid: BigNumber;
|
||||
takerFeePaid: BigNumber;
|
||||
},
|
||||
{
|
||||
makerAssetFilledAmount: BigNumber;
|
||||
takerAssetFilledAmount: BigNumber;
|
||||
makerFeePaid: BigNumber;
|
||||
takerFeePaid: BigNumber;
|
||||
}
|
||||
Array<{
|
||||
makerAddress: string;
|
||||
takerAddress: string;
|
||||
feeRecipientAddress: string;
|
||||
senderAddress: string;
|
||||
makerAssetAmount: BigNumber;
|
||||
takerAssetAmount: BigNumber;
|
||||
makerFee: BigNumber;
|
||||
takerFee: BigNumber;
|
||||
expirationTimeSeconds: BigNumber;
|
||||
salt: BigNumber;
|
||||
makerAssetData: string;
|
||||
takerAssetData: string;
|
||||
}>,
|
||||
string[],
|
||||
Array<{
|
||||
makerAddress: string;
|
||||
takerAddress: string;
|
||||
feeRecipientAddress: string;
|
||||
senderAddress: string;
|
||||
makerAssetAmount: BigNumber;
|
||||
takerAssetAmount: BigNumber;
|
||||
makerFee: BigNumber;
|
||||
takerFee: BigNumber;
|
||||
expirationTimeSeconds: BigNumber;
|
||||
salt: BigNumber;
|
||||
makerAssetData: string;
|
||||
takerAssetData: string;
|
||||
}>,
|
||||
string[],
|
||||
BigNumber,
|
||||
string
|
||||
] {
|
||||
const self = (this as any) as ForwarderContract;
|
||||
const abiEncoder = self._lookupAbiEncoder(
|
||||
@@ -1348,22 +1504,47 @@ export class ForwarderContract extends BaseContract {
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<
|
||||
[
|
||||
{
|
||||
makerAssetFilledAmount: BigNumber;
|
||||
takerAssetFilledAmount: BigNumber;
|
||||
makerFeePaid: BigNumber;
|
||||
takerFeePaid: BigNumber;
|
||||
},
|
||||
{
|
||||
makerAssetFilledAmount: BigNumber;
|
||||
takerAssetFilledAmount: BigNumber;
|
||||
makerFeePaid: BigNumber;
|
||||
takerFeePaid: BigNumber;
|
||||
}
|
||||
Array<{
|
||||
makerAddress: string;
|
||||
takerAddress: string;
|
||||
feeRecipientAddress: string;
|
||||
senderAddress: string;
|
||||
makerAssetAmount: BigNumber;
|
||||
takerAssetAmount: BigNumber;
|
||||
makerFee: BigNumber;
|
||||
takerFee: BigNumber;
|
||||
expirationTimeSeconds: BigNumber;
|
||||
salt: BigNumber;
|
||||
makerAssetData: string;
|
||||
takerAssetData: string;
|
||||
}>,
|
||||
string[],
|
||||
Array<{
|
||||
makerAddress: string;
|
||||
takerAddress: string;
|
||||
feeRecipientAddress: string;
|
||||
senderAddress: string;
|
||||
makerAssetAmount: BigNumber;
|
||||
takerAssetAmount: BigNumber;
|
||||
makerFee: BigNumber;
|
||||
takerFee: BigNumber;
|
||||
expirationTimeSeconds: BigNumber;
|
||||
salt: BigNumber;
|
||||
makerAssetData: string;
|
||||
takerAssetData: string;
|
||||
}>,
|
||||
string[],
|
||||
BigNumber,
|
||||
string
|
||||
]
|
||||
>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(
|
||||
returnData: string,
|
||||
): [
|
||||
@@ -1403,61 +1584,6 @@ export class ForwarderContract extends BaseContract {
|
||||
>(returnData);
|
||||
return abiDecodedReturnData;
|
||||
},
|
||||
async validateAndSendTransactionAsync(
|
||||
orders: Array<{
|
||||
makerAddress: string;
|
||||
takerAddress: string;
|
||||
feeRecipientAddress: string;
|
||||
senderAddress: string;
|
||||
makerAssetAmount: BigNumber;
|
||||
takerAssetAmount: BigNumber;
|
||||
makerFee: BigNumber;
|
||||
takerFee: BigNumber;
|
||||
expirationTimeSeconds: BigNumber;
|
||||
salt: BigNumber;
|
||||
makerAssetData: string;
|
||||
takerAssetData: string;
|
||||
}>,
|
||||
signatures: string[],
|
||||
feeOrders: Array<{
|
||||
makerAddress: string;
|
||||
takerAddress: string;
|
||||
feeRecipientAddress: string;
|
||||
senderAddress: string;
|
||||
makerAssetAmount: BigNumber;
|
||||
takerAssetAmount: BigNumber;
|
||||
makerFee: BigNumber;
|
||||
takerFee: BigNumber;
|
||||
expirationTimeSeconds: BigNumber;
|
||||
salt: BigNumber;
|
||||
makerAssetData: string;
|
||||
takerAssetData: string;
|
||||
}>,
|
||||
feeSignatures: string[],
|
||||
feePercentage: BigNumber,
|
||||
feeRecipient: string,
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
await (this as any).marketSellOrdersWithEth.callAsync(
|
||||
orders,
|
||||
signatures,
|
||||
feeOrders,
|
||||
feeSignatures,
|
||||
feePercentage,
|
||||
feeRecipient,
|
||||
txData,
|
||||
);
|
||||
const txHash = await (this as any).marketSellOrdersWithEth.sendTransactionAsync(
|
||||
orders,
|
||||
signatures,
|
||||
feeOrders,
|
||||
feeSignatures,
|
||||
feePercentage,
|
||||
feeRecipient,
|
||||
txData,
|
||||
);
|
||||
return txHash;
|
||||
},
|
||||
};
|
||||
public transferOwnership = {
|
||||
/**
|
||||
@@ -1538,6 +1664,11 @@ export class ForwarderContract extends BaseContract {
|
||||
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
|
||||
return gas;
|
||||
},
|
||||
async validateAndSendTransactionAsync(newOwner: string, txData?: Partial<TxData> | undefined): Promise<string> {
|
||||
await (this as any).transferOwnership.callAsync(newOwner, txData);
|
||||
const txHash = await (this as any).transferOwnership.sendTransactionAsync(newOwner, txData);
|
||||
return txHash;
|
||||
},
|
||||
/**
|
||||
* Sends a read-only call to the contract method. Returns the result that would happen if one were to send an
|
||||
* Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas
|
||||
@@ -1579,6 +1710,7 @@ export class ForwarderContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(newOwner: string): string {
|
||||
assert.isString('newOwner', newOwner);
|
||||
@@ -1588,13 +1720,23 @@ export class ForwarderContract extends BaseContract {
|
||||
]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): [string] {
|
||||
const self = (this as any) as ForwarderContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('transferOwnership(address)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<[string]>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): void {
|
||||
const self = (this as any) as ForwarderContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('transferOwnership(address)');
|
||||
@@ -1602,11 +1744,6 @@ export class ForwarderContract extends BaseContract {
|
||||
const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<void>(returnData);
|
||||
return abiDecodedReturnData;
|
||||
},
|
||||
async validateAndSendTransactionAsync(newOwner: string, txData?: Partial<TxData> | undefined): Promise<string> {
|
||||
await (this as any).transferOwnership.callAsync(newOwner, txData);
|
||||
const txHash = await (this as any).transferOwnership.sendTransactionAsync(newOwner, txData);
|
||||
return txHash;
|
||||
},
|
||||
};
|
||||
public static async deployFrom0xArtifactAsync(
|
||||
artifact: ContractArtifact | SimpleContractArtifact,
|
||||
|
@@ -113,6 +113,11 @@ export class IAssetProxyContract extends BaseContract {
|
||||
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
|
||||
return gas;
|
||||
},
|
||||
async validateAndSendTransactionAsync(target: string, txData?: Partial<TxData> | undefined): Promise<string> {
|
||||
await (this as any).addAuthorizedAddress.callAsync(target, txData);
|
||||
const txHash = await (this as any).addAuthorizedAddress.sendTransactionAsync(target, txData);
|
||||
return txHash;
|
||||
},
|
||||
/**
|
||||
* Sends a read-only call to the contract method. Returns the result that would happen if one were to send an
|
||||
* Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas
|
||||
@@ -156,6 +161,7 @@ export class IAssetProxyContract extends BaseContract {
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @param target Address to authorize.
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(target: string): string {
|
||||
assert.isString('target', target);
|
||||
@@ -165,13 +171,23 @@ export class IAssetProxyContract extends BaseContract {
|
||||
]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): [string] {
|
||||
const self = (this as any) as IAssetProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('addAuthorizedAddress(address)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<[string]>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): void {
|
||||
const self = (this as any) as IAssetProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('addAuthorizedAddress(address)');
|
||||
@@ -179,11 +195,6 @@ export class IAssetProxyContract extends BaseContract {
|
||||
const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<void>(returnData);
|
||||
return abiDecodedReturnData;
|
||||
},
|
||||
async validateAndSendTransactionAsync(target: string, txData?: Partial<TxData> | undefined): Promise<string> {
|
||||
await (this as any).addAuthorizedAddress.callAsync(target, txData);
|
||||
const txHash = await (this as any).addAuthorizedAddress.sendTransactionAsync(target, txData);
|
||||
return txHash;
|
||||
},
|
||||
};
|
||||
/**
|
||||
* Removes authorizion of an address.
|
||||
@@ -270,6 +281,11 @@ export class IAssetProxyContract extends BaseContract {
|
||||
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
|
||||
return gas;
|
||||
},
|
||||
async validateAndSendTransactionAsync(target: string, txData?: Partial<TxData> | undefined): Promise<string> {
|
||||
await (this as any).removeAuthorizedAddress.callAsync(target, txData);
|
||||
const txHash = await (this as any).removeAuthorizedAddress.sendTransactionAsync(target, txData);
|
||||
return txHash;
|
||||
},
|
||||
/**
|
||||
* Sends a read-only call to the contract method. Returns the result that would happen if one were to send an
|
||||
* Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas
|
||||
@@ -313,6 +329,7 @@ export class IAssetProxyContract extends BaseContract {
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @param target Address to remove authorization from.
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(target: string): string {
|
||||
assert.isString('target', target);
|
||||
@@ -322,13 +339,23 @@ export class IAssetProxyContract extends BaseContract {
|
||||
]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): [string] {
|
||||
const self = (this as any) as IAssetProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('removeAuthorizedAddress(address)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<[string]>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): void {
|
||||
const self = (this as any) as IAssetProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('removeAuthorizedAddress(address)');
|
||||
@@ -336,11 +363,6 @@ export class IAssetProxyContract extends BaseContract {
|
||||
const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<void>(returnData);
|
||||
return abiDecodedReturnData;
|
||||
},
|
||||
async validateAndSendTransactionAsync(target: string, txData?: Partial<TxData> | undefined): Promise<string> {
|
||||
await (this as any).removeAuthorizedAddress.callAsync(target, txData);
|
||||
const txHash = await (this as any).removeAuthorizedAddress.sendTransactionAsync(target, txData);
|
||||
return txHash;
|
||||
},
|
||||
};
|
||||
/**
|
||||
* Removes authorizion of an address.
|
||||
@@ -452,6 +474,19 @@ export class IAssetProxyContract extends BaseContract {
|
||||
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
|
||||
return gas;
|
||||
},
|
||||
async validateAndSendTransactionAsync(
|
||||
target: string,
|
||||
index: BigNumber,
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
await (this as any).removeAuthorizedAddressAtIndex.callAsync(target, index, txData);
|
||||
const txHash = await (this as any).removeAuthorizedAddressAtIndex.sendTransactionAsync(
|
||||
target,
|
||||
index,
|
||||
txData,
|
||||
);
|
||||
return txHash;
|
||||
},
|
||||
/**
|
||||
* Sends a read-only call to the contract method. Returns the result that would happen if one were to send an
|
||||
* Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas
|
||||
@@ -506,6 +541,7 @@ export class IAssetProxyContract extends BaseContract {
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @param target Address to remove authorization from.
|
||||
* @param index Index of target in authorities array.
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(target: string, index: BigNumber): string {
|
||||
assert.isString('target', target);
|
||||
@@ -517,13 +553,23 @@ export class IAssetProxyContract extends BaseContract {
|
||||
);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): [string, BigNumber] {
|
||||
const self = (this as any) as IAssetProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('removeAuthorizedAddressAtIndex(address,uint256)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<[string, BigNumber]>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): void {
|
||||
const self = (this as any) as IAssetProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('removeAuthorizedAddressAtIndex(address,uint256)');
|
||||
@@ -531,19 +577,6 @@ export class IAssetProxyContract extends BaseContract {
|
||||
const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<void>(returnData);
|
||||
return abiDecodedReturnData;
|
||||
},
|
||||
async validateAndSendTransactionAsync(
|
||||
target: string,
|
||||
index: BigNumber,
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
await (this as any).removeAuthorizedAddressAtIndex.callAsync(target, index, txData);
|
||||
const txHash = await (this as any).removeAuthorizedAddressAtIndex.sendTransactionAsync(
|
||||
target,
|
||||
index,
|
||||
txData,
|
||||
);
|
||||
return txHash;
|
||||
},
|
||||
};
|
||||
/**
|
||||
* Transfers assets. Either succeeds or throws.
|
||||
@@ -679,6 +712,17 @@ export class IAssetProxyContract extends BaseContract {
|
||||
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
|
||||
return gas;
|
||||
},
|
||||
async validateAndSendTransactionAsync(
|
||||
assetData: string,
|
||||
from: string,
|
||||
to: string,
|
||||
amount: BigNumber,
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
await (this as any).transferFrom.callAsync(assetData, from, to, amount, txData);
|
||||
const txHash = await (this as any).transferFrom.sendTransactionAsync(assetData, from, to, amount, txData);
|
||||
return txHash;
|
||||
},
|
||||
/**
|
||||
* Sends a read-only call to the contract method. Returns the result that would happen if one were to send an
|
||||
* Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas
|
||||
@@ -743,6 +787,7 @@ export class IAssetProxyContract extends BaseContract {
|
||||
* @param from Address to transfer asset from.
|
||||
* @param to Address to transfer asset to.
|
||||
* @param amount Amount of asset to transfer.
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(assetData: string, from: string, to: string, amount: BigNumber): string {
|
||||
assert.isString('assetData', assetData);
|
||||
@@ -756,13 +801,23 @@ export class IAssetProxyContract extends BaseContract {
|
||||
);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): [string, string, string, BigNumber] {
|
||||
const self = (this as any) as IAssetProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('transferFrom(bytes,address,address,uint256)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<[string, string, string, BigNumber]>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): void {
|
||||
const self = (this as any) as IAssetProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('transferFrom(bytes,address,address,uint256)');
|
||||
@@ -770,17 +825,6 @@ export class IAssetProxyContract extends BaseContract {
|
||||
const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<void>(returnData);
|
||||
return abiDecodedReturnData;
|
||||
},
|
||||
async validateAndSendTransactionAsync(
|
||||
assetData: string,
|
||||
from: string,
|
||||
to: string,
|
||||
amount: BigNumber,
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
await (this as any).transferFrom.callAsync(assetData, from, to, amount, txData);
|
||||
const txHash = await (this as any).transferFrom.sendTransactionAsync(assetData, from, to, amount, txData);
|
||||
return txHash;
|
||||
},
|
||||
};
|
||||
/**
|
||||
* Gets the proxy id associated with the proxy address.
|
||||
@@ -803,19 +847,9 @@ export class IAssetProxyContract extends BaseContract {
|
||||
}
|
||||
const self = (this as any) as IAssetProxyContract;
|
||||
const encodedData = self._strictEncodeArguments('getProxyId()', []);
|
||||
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
|
||||
{
|
||||
to: self.address,
|
||||
...callData,
|
||||
data: encodedData,
|
||||
},
|
||||
self._web3Wrapper.getContractDefaults(),
|
||||
);
|
||||
callDataWithDefaults.from = callDataWithDefaults.from
|
||||
? callDataWithDefaults.from.toLowerCase()
|
||||
: callDataWithDefaults.from;
|
||||
const encodedDataBytes = Buffer.from(encodedData.substr(2), 'hex');
|
||||
|
||||
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
|
||||
const rawCallResult = await self.evmExecAsync(encodedDataBytes);
|
||||
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
|
||||
const abiEncoder = self._lookupAbiEncoder('getProxyId()');
|
||||
// tslint:disable boolean-naming
|
||||
@@ -827,19 +861,30 @@ export class IAssetProxyContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(): string {
|
||||
const self = (this as any) as IAssetProxyContract;
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('getProxyId()', []);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): string {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
const self = (this as any) as IAssetProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('getProxyId()');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<string>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): string {
|
||||
const self = (this as any) as IAssetProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('getProxyId()');
|
||||
@@ -893,19 +938,30 @@ export class IAssetProxyContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(): string {
|
||||
const self = (this as any) as IAssetProxyContract;
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('getAuthorizedAddresses()', []);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): string[] {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
const self = (this as any) as IAssetProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('getAuthorizedAddresses()');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<string[]>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): string[] {
|
||||
const self = (this as any) as IAssetProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('getAuthorizedAddresses()');
|
||||
@@ -993,6 +1049,11 @@ export class IAssetProxyContract extends BaseContract {
|
||||
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
|
||||
return gas;
|
||||
},
|
||||
async validateAndSendTransactionAsync(newOwner: string, txData?: Partial<TxData> | undefined): Promise<string> {
|
||||
await (this as any).transferOwnership.callAsync(newOwner, txData);
|
||||
const txHash = await (this as any).transferOwnership.sendTransactionAsync(newOwner, txData);
|
||||
return txHash;
|
||||
},
|
||||
/**
|
||||
* Sends a read-only call to the contract method. Returns the result that would happen if one were to send an
|
||||
* Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas
|
||||
@@ -1034,6 +1095,7 @@ export class IAssetProxyContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(newOwner: string): string {
|
||||
assert.isString('newOwner', newOwner);
|
||||
@@ -1043,13 +1105,23 @@ export class IAssetProxyContract extends BaseContract {
|
||||
]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): [string] {
|
||||
const self = (this as any) as IAssetProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('transferOwnership(address)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<[string]>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): void {
|
||||
const self = (this as any) as IAssetProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('transferOwnership(address)');
|
||||
@@ -1057,11 +1129,6 @@ export class IAssetProxyContract extends BaseContract {
|
||||
const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<void>(returnData);
|
||||
return abiDecodedReturnData;
|
||||
},
|
||||
async validateAndSendTransactionAsync(newOwner: string, txData?: Partial<TxData> | undefined): Promise<string> {
|
||||
await (this as any).transferOwnership.callAsync(newOwner, txData);
|
||||
const txHash = await (this as any).transferOwnership.sendTransactionAsync(newOwner, txData);
|
||||
return txHash;
|
||||
},
|
||||
};
|
||||
public static async deployFrom0xArtifactAsync(
|
||||
artifact: ContractArtifact | SimpleContractArtifact,
|
||||
|
@@ -92,6 +92,7 @@ export class IValidatorContract extends BaseContract {
|
||||
* @param hash Message hash that is signed.
|
||||
* @param signerAddress Address that should have signed the given hash.
|
||||
* @param signature Proof of signing.
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(hash: string, signerAddress: string, signature: string): string {
|
||||
assert.isString('hash', hash);
|
||||
@@ -105,6 +106,11 @@ export class IValidatorContract extends BaseContract {
|
||||
]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): string {
|
||||
const self = (this as any) as IValidatorContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('isValidSignature(bytes32,address,bytes)');
|
||||
@@ -112,6 +118,11 @@ export class IValidatorContract extends BaseContract {
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<string>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): string {
|
||||
const self = (this as any) as IValidatorContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('isValidSignature(bytes32,address,bytes)');
|
||||
|
@@ -84,6 +84,7 @@ export class IWalletContract extends BaseContract {
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @param hash Message hash that is signed.
|
||||
* @param signature Proof of signing.
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(hash: string, signature: string): string {
|
||||
assert.isString('hash', hash);
|
||||
@@ -95,6 +96,11 @@ export class IWalletContract extends BaseContract {
|
||||
]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): string {
|
||||
const self = (this as any) as IWalletContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('isValidSignature(bytes32,bytes)');
|
||||
@@ -102,6 +108,11 @@ export class IWalletContract extends BaseContract {
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<string>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): string {
|
||||
const self = (this as any) as IWalletContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('isValidSignature(bytes32,bytes)');
|
||||
|
@@ -103,6 +103,7 @@ export class MultiAssetProxyContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(index_0: string): string {
|
||||
assert.isString('index_0', index_0);
|
||||
@@ -110,6 +111,11 @@ export class MultiAssetProxyContract extends BaseContract {
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('assetProxies(bytes4)', [index_0]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): string {
|
||||
const self = (this as any) as MultiAssetProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('assetProxies(bytes4)');
|
||||
@@ -117,6 +123,11 @@ export class MultiAssetProxyContract extends BaseContract {
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<string>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): string {
|
||||
const self = (this as any) as MultiAssetProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('assetProxies(bytes4)');
|
||||
@@ -210,6 +221,11 @@ export class MultiAssetProxyContract extends BaseContract {
|
||||
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
|
||||
return gas;
|
||||
},
|
||||
async validateAndSendTransactionAsync(target: string, txData?: Partial<TxData> | undefined): Promise<string> {
|
||||
await (this as any).addAuthorizedAddress.callAsync(target, txData);
|
||||
const txHash = await (this as any).addAuthorizedAddress.sendTransactionAsync(target, txData);
|
||||
return txHash;
|
||||
},
|
||||
/**
|
||||
* Sends a read-only call to the contract method. Returns the result that would happen if one were to send an
|
||||
* Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas
|
||||
@@ -253,6 +269,7 @@ export class MultiAssetProxyContract extends BaseContract {
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @param target Address to authorize.
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(target: string): string {
|
||||
assert.isString('target', target);
|
||||
@@ -262,13 +279,23 @@ export class MultiAssetProxyContract extends BaseContract {
|
||||
]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): [string] {
|
||||
const self = (this as any) as MultiAssetProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('addAuthorizedAddress(address)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<[string]>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): void {
|
||||
const self = (this as any) as MultiAssetProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('addAuthorizedAddress(address)');
|
||||
@@ -276,11 +303,6 @@ export class MultiAssetProxyContract extends BaseContract {
|
||||
const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<void>(returnData);
|
||||
return abiDecodedReturnData;
|
||||
},
|
||||
async validateAndSendTransactionAsync(target: string, txData?: Partial<TxData> | undefined): Promise<string> {
|
||||
await (this as any).addAuthorizedAddress.callAsync(target, txData);
|
||||
const txHash = await (this as any).addAuthorizedAddress.sendTransactionAsync(target, txData);
|
||||
return txHash;
|
||||
},
|
||||
};
|
||||
public authorities = {
|
||||
/**
|
||||
@@ -328,6 +350,7 @@ export class MultiAssetProxyContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(index_0: BigNumber): string {
|
||||
assert.isBigNumber('index_0', index_0);
|
||||
@@ -335,13 +358,23 @@ export class MultiAssetProxyContract extends BaseContract {
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('authorities(uint256)', [index_0]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): string {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): BigNumber {
|
||||
const self = (this as any) as MultiAssetProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('authorities(uint256)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<string>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<BigNumber>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): string {
|
||||
const self = (this as any) as MultiAssetProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('authorities(uint256)');
|
||||
@@ -402,6 +435,7 @@ export class MultiAssetProxyContract extends BaseContract {
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @param assetProxyId Id of the asset proxy.
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(assetProxyId: string): string {
|
||||
assert.isString('assetProxyId', assetProxyId);
|
||||
@@ -409,6 +443,11 @@ export class MultiAssetProxyContract extends BaseContract {
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('getAssetProxy(bytes4)', [assetProxyId]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): string {
|
||||
const self = (this as any) as MultiAssetProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('getAssetProxy(bytes4)');
|
||||
@@ -416,6 +455,11 @@ export class MultiAssetProxyContract extends BaseContract {
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<string>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): string {
|
||||
const self = (this as any) as MultiAssetProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('getAssetProxy(bytes4)');
|
||||
@@ -509,6 +553,11 @@ export class MultiAssetProxyContract extends BaseContract {
|
||||
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
|
||||
return gas;
|
||||
},
|
||||
async validateAndSendTransactionAsync(target: string, txData?: Partial<TxData> | undefined): Promise<string> {
|
||||
await (this as any).removeAuthorizedAddress.callAsync(target, txData);
|
||||
const txHash = await (this as any).removeAuthorizedAddress.sendTransactionAsync(target, txData);
|
||||
return txHash;
|
||||
},
|
||||
/**
|
||||
* Sends a read-only call to the contract method. Returns the result that would happen if one were to send an
|
||||
* Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas
|
||||
@@ -552,6 +601,7 @@ export class MultiAssetProxyContract extends BaseContract {
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @param target Address to remove authorization from.
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(target: string): string {
|
||||
assert.isString('target', target);
|
||||
@@ -561,13 +611,23 @@ export class MultiAssetProxyContract extends BaseContract {
|
||||
]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): [string] {
|
||||
const self = (this as any) as MultiAssetProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('removeAuthorizedAddress(address)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<[string]>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): void {
|
||||
const self = (this as any) as MultiAssetProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('removeAuthorizedAddress(address)');
|
||||
@@ -575,11 +635,6 @@ export class MultiAssetProxyContract extends BaseContract {
|
||||
const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<void>(returnData);
|
||||
return abiDecodedReturnData;
|
||||
},
|
||||
async validateAndSendTransactionAsync(target: string, txData?: Partial<TxData> | undefined): Promise<string> {
|
||||
await (this as any).removeAuthorizedAddress.callAsync(target, txData);
|
||||
const txHash = await (this as any).removeAuthorizedAddress.sendTransactionAsync(target, txData);
|
||||
return txHash;
|
||||
},
|
||||
};
|
||||
public owner = {
|
||||
/**
|
||||
@@ -622,19 +677,30 @@ export class MultiAssetProxyContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(): string {
|
||||
const self = (this as any) as MultiAssetProxyContract;
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('owner()', []);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): string {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
const self = (this as any) as MultiAssetProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('owner()');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<string>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): string {
|
||||
const self = (this as any) as MultiAssetProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('owner()');
|
||||
@@ -753,6 +819,19 @@ export class MultiAssetProxyContract extends BaseContract {
|
||||
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
|
||||
return gas;
|
||||
},
|
||||
async validateAndSendTransactionAsync(
|
||||
target: string,
|
||||
index: BigNumber,
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
await (this as any).removeAuthorizedAddressAtIndex.callAsync(target, index, txData);
|
||||
const txHash = await (this as any).removeAuthorizedAddressAtIndex.sendTransactionAsync(
|
||||
target,
|
||||
index,
|
||||
txData,
|
||||
);
|
||||
return txHash;
|
||||
},
|
||||
/**
|
||||
* Sends a read-only call to the contract method. Returns the result that would happen if one were to send an
|
||||
* Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas
|
||||
@@ -807,6 +886,7 @@ export class MultiAssetProxyContract extends BaseContract {
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @param target Address to remove authorization from.
|
||||
* @param index Index of target in authorities array.
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(target: string, index: BigNumber): string {
|
||||
assert.isString('target', target);
|
||||
@@ -818,13 +898,23 @@ export class MultiAssetProxyContract extends BaseContract {
|
||||
);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): [string, BigNumber] {
|
||||
const self = (this as any) as MultiAssetProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('removeAuthorizedAddressAtIndex(address,uint256)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<[string, BigNumber]>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): void {
|
||||
const self = (this as any) as MultiAssetProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('removeAuthorizedAddressAtIndex(address,uint256)');
|
||||
@@ -832,19 +922,6 @@ export class MultiAssetProxyContract extends BaseContract {
|
||||
const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<void>(returnData);
|
||||
return abiDecodedReturnData;
|
||||
},
|
||||
async validateAndSendTransactionAsync(
|
||||
target: string,
|
||||
index: BigNumber,
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
await (this as any).removeAuthorizedAddressAtIndex.callAsync(target, index, txData);
|
||||
const txHash = await (this as any).removeAuthorizedAddressAtIndex.sendTransactionAsync(
|
||||
target,
|
||||
index,
|
||||
txData,
|
||||
);
|
||||
return txHash;
|
||||
},
|
||||
};
|
||||
/**
|
||||
* Gets the proxy id associated with the proxy address.
|
||||
@@ -867,19 +944,9 @@ export class MultiAssetProxyContract extends BaseContract {
|
||||
}
|
||||
const self = (this as any) as MultiAssetProxyContract;
|
||||
const encodedData = self._strictEncodeArguments('getProxyId()', []);
|
||||
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
|
||||
{
|
||||
to: self.address,
|
||||
...callData,
|
||||
data: encodedData,
|
||||
},
|
||||
self._web3Wrapper.getContractDefaults(),
|
||||
);
|
||||
callDataWithDefaults.from = callDataWithDefaults.from
|
||||
? callDataWithDefaults.from.toLowerCase()
|
||||
: callDataWithDefaults.from;
|
||||
const encodedDataBytes = Buffer.from(encodedData.substr(2), 'hex');
|
||||
|
||||
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
|
||||
const rawCallResult = await self.evmExecAsync(encodedDataBytes);
|
||||
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
|
||||
const abiEncoder = self._lookupAbiEncoder('getProxyId()');
|
||||
// tslint:disable boolean-naming
|
||||
@@ -891,19 +958,30 @@ export class MultiAssetProxyContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(): string {
|
||||
const self = (this as any) as MultiAssetProxyContract;
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('getProxyId()', []);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): string {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
const self = (this as any) as MultiAssetProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('getProxyId()');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<string>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): string {
|
||||
const self = (this as any) as MultiAssetProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('getProxyId()');
|
||||
@@ -958,6 +1036,7 @@ export class MultiAssetProxyContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(index_0: string): string {
|
||||
assert.isString('index_0', index_0);
|
||||
@@ -967,13 +1046,23 @@ export class MultiAssetProxyContract extends BaseContract {
|
||||
]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): boolean {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): string {
|
||||
const self = (this as any) as MultiAssetProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('authorized(address)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<boolean>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<string>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): boolean {
|
||||
const self = (this as any) as MultiAssetProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('authorized(address)');
|
||||
@@ -1068,6 +1157,14 @@ export class MultiAssetProxyContract extends BaseContract {
|
||||
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
|
||||
return gas;
|
||||
},
|
||||
async validateAndSendTransactionAsync(
|
||||
assetProxy: string,
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
await (this as any).registerAssetProxy.callAsync(assetProxy, txData);
|
||||
const txHash = await (this as any).registerAssetProxy.sendTransactionAsync(assetProxy, txData);
|
||||
return txHash;
|
||||
},
|
||||
/**
|
||||
* Sends a read-only call to the contract method. Returns the result that would happen if one were to send an
|
||||
* Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas
|
||||
@@ -1115,6 +1212,7 @@ export class MultiAssetProxyContract extends BaseContract {
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @param assetProxy Address of new asset proxy to register.
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(assetProxy: string): string {
|
||||
assert.isString('assetProxy', assetProxy);
|
||||
@@ -1124,13 +1222,23 @@ export class MultiAssetProxyContract extends BaseContract {
|
||||
]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): [string] {
|
||||
const self = (this as any) as MultiAssetProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('registerAssetProxy(address)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<[string]>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): void {
|
||||
const self = (this as any) as MultiAssetProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('registerAssetProxy(address)');
|
||||
@@ -1138,14 +1246,6 @@ export class MultiAssetProxyContract extends BaseContract {
|
||||
const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<void>(returnData);
|
||||
return abiDecodedReturnData;
|
||||
},
|
||||
async validateAndSendTransactionAsync(
|
||||
assetProxy: string,
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
await (this as any).registerAssetProxy.callAsync(assetProxy, txData);
|
||||
const txHash = await (this as any).registerAssetProxy.sendTransactionAsync(assetProxy, txData);
|
||||
return txHash;
|
||||
},
|
||||
};
|
||||
/**
|
||||
* Gets all authorized addresses.
|
||||
@@ -1192,19 +1292,30 @@ export class MultiAssetProxyContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(): string {
|
||||
const self = (this as any) as MultiAssetProxyContract;
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('getAuthorizedAddresses()', []);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): string[] {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
const self = (this as any) as MultiAssetProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('getAuthorizedAddresses()');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<string[]>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): string[] {
|
||||
const self = (this as any) as MultiAssetProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('getAuthorizedAddresses()');
|
||||
@@ -1292,6 +1403,11 @@ export class MultiAssetProxyContract extends BaseContract {
|
||||
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
|
||||
return gas;
|
||||
},
|
||||
async validateAndSendTransactionAsync(newOwner: string, txData?: Partial<TxData> | undefined): Promise<string> {
|
||||
await (this as any).transferOwnership.callAsync(newOwner, txData);
|
||||
const txHash = await (this as any).transferOwnership.sendTransactionAsync(newOwner, txData);
|
||||
return txHash;
|
||||
},
|
||||
/**
|
||||
* Sends a read-only call to the contract method. Returns the result that would happen if one were to send an
|
||||
* Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas
|
||||
@@ -1333,6 +1449,7 @@ export class MultiAssetProxyContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(newOwner: string): string {
|
||||
assert.isString('newOwner', newOwner);
|
||||
@@ -1342,13 +1459,23 @@ export class MultiAssetProxyContract extends BaseContract {
|
||||
]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): [string] {
|
||||
const self = (this as any) as MultiAssetProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('transferOwnership(address)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<[string]>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): void {
|
||||
const self = (this as any) as MultiAssetProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('transferOwnership(address)');
|
||||
@@ -1356,11 +1483,6 @@ export class MultiAssetProxyContract extends BaseContract {
|
||||
const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<void>(returnData);
|
||||
return abiDecodedReturnData;
|
||||
},
|
||||
async validateAndSendTransactionAsync(newOwner: string, txData?: Partial<TxData> | undefined): Promise<string> {
|
||||
await (this as any).transferOwnership.callAsync(newOwner, txData);
|
||||
const txHash = await (this as any).transferOwnership.sendTransactionAsync(newOwner, txData);
|
||||
return txHash;
|
||||
},
|
||||
};
|
||||
private readonly _subscriptionManager: SubscriptionManager<MultiAssetProxyEventArgs, MultiAssetProxyEvents>;
|
||||
public static async deployFrom0xArtifactAsync(
|
||||
|
@@ -121,6 +121,7 @@ export class OrderValidatorContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(
|
||||
order: {
|
||||
@@ -147,20 +148,29 @@ export class OrderValidatorContract extends BaseContract {
|
||||
);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(
|
||||
callData: string,
|
||||
): [
|
||||
{ orderStatus: number; orderHash: string; orderTakerAssetFilledAmount: BigNumber },
|
||||
{
|
||||
makerBalance: BigNumber;
|
||||
makerAllowance: BigNumber;
|
||||
takerBalance: BigNumber;
|
||||
takerAllowance: BigNumber;
|
||||
makerZrxBalance: BigNumber;
|
||||
makerZrxAllowance: BigNumber;
|
||||
takerZrxBalance: BigNumber;
|
||||
takerZrxAllowance: BigNumber;
|
||||
}
|
||||
makerAddress: string;
|
||||
takerAddress: string;
|
||||
feeRecipientAddress: string;
|
||||
senderAddress: string;
|
||||
makerAssetAmount: BigNumber;
|
||||
takerAssetAmount: BigNumber;
|
||||
makerFee: BigNumber;
|
||||
takerFee: BigNumber;
|
||||
expirationTimeSeconds: BigNumber;
|
||||
salt: BigNumber;
|
||||
makerAssetData: string;
|
||||
takerAssetData: string;
|
||||
},
|
||||
string
|
||||
] {
|
||||
const self = (this as any) as OrderValidatorContract;
|
||||
const abiEncoder = self._lookupAbiEncoder(
|
||||
@@ -169,21 +179,30 @@ export class OrderValidatorContract extends BaseContract {
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<
|
||||
[
|
||||
{ orderStatus: number; orderHash: string; orderTakerAssetFilledAmount: BigNumber },
|
||||
{
|
||||
makerBalance: BigNumber;
|
||||
makerAllowance: BigNumber;
|
||||
takerBalance: BigNumber;
|
||||
takerAllowance: BigNumber;
|
||||
makerZrxBalance: BigNumber;
|
||||
makerZrxAllowance: BigNumber;
|
||||
takerZrxBalance: BigNumber;
|
||||
takerZrxAllowance: BigNumber;
|
||||
}
|
||||
makerAddress: string;
|
||||
takerAddress: string;
|
||||
feeRecipientAddress: string;
|
||||
senderAddress: string;
|
||||
makerAssetAmount: BigNumber;
|
||||
takerAssetAmount: BigNumber;
|
||||
makerFee: BigNumber;
|
||||
takerFee: BigNumber;
|
||||
expirationTimeSeconds: BigNumber;
|
||||
salt: BigNumber;
|
||||
makerAssetData: string;
|
||||
takerAssetData: string;
|
||||
},
|
||||
string
|
||||
]
|
||||
>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(
|
||||
returnData: string,
|
||||
): [
|
||||
@@ -273,6 +292,7 @@ export class OrderValidatorContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(target: string, assetData: string): string {
|
||||
assert.isString('target', target);
|
||||
@@ -284,13 +304,23 @@ export class OrderValidatorContract extends BaseContract {
|
||||
]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): [BigNumber, BigNumber] {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): [string, string] {
|
||||
const self = (this as any) as OrderValidatorContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('getBalanceAndAllowance(address,bytes)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<[BigNumber, BigNumber]>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<[string, string]>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): [BigNumber, BigNumber] {
|
||||
const self = (this as any) as OrderValidatorContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('getBalanceAndAllowance(address,bytes)');
|
||||
@@ -393,6 +423,7 @@ export class OrderValidatorContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(
|
||||
orders: Array<{
|
||||
@@ -420,20 +451,29 @@ export class OrderValidatorContract extends BaseContract {
|
||||
);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(
|
||||
callData: string,
|
||||
): [
|
||||
Array<{ orderStatus: number; orderHash: string; orderTakerAssetFilledAmount: BigNumber }>,
|
||||
Array<{
|
||||
makerBalance: BigNumber;
|
||||
makerAllowance: BigNumber;
|
||||
takerBalance: BigNumber;
|
||||
takerAllowance: BigNumber;
|
||||
makerZrxBalance: BigNumber;
|
||||
makerZrxAllowance: BigNumber;
|
||||
takerZrxBalance: BigNumber;
|
||||
takerZrxAllowance: BigNumber;
|
||||
}>
|
||||
makerAddress: string;
|
||||
takerAddress: string;
|
||||
feeRecipientAddress: string;
|
||||
senderAddress: string;
|
||||
makerAssetAmount: BigNumber;
|
||||
takerAssetAmount: BigNumber;
|
||||
makerFee: BigNumber;
|
||||
takerFee: BigNumber;
|
||||
expirationTimeSeconds: BigNumber;
|
||||
salt: BigNumber;
|
||||
makerAssetData: string;
|
||||
takerAssetData: string;
|
||||
}>,
|
||||
string[]
|
||||
] {
|
||||
const self = (this as any) as OrderValidatorContract;
|
||||
const abiEncoder = self._lookupAbiEncoder(
|
||||
@@ -442,21 +482,30 @@ export class OrderValidatorContract extends BaseContract {
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<
|
||||
[
|
||||
Array<{ orderStatus: number; orderHash: string; orderTakerAssetFilledAmount: BigNumber }>,
|
||||
Array<{
|
||||
makerBalance: BigNumber;
|
||||
makerAllowance: BigNumber;
|
||||
takerBalance: BigNumber;
|
||||
takerAllowance: BigNumber;
|
||||
makerZrxBalance: BigNumber;
|
||||
makerZrxAllowance: BigNumber;
|
||||
takerZrxBalance: BigNumber;
|
||||
takerZrxAllowance: BigNumber;
|
||||
}>
|
||||
makerAddress: string;
|
||||
takerAddress: string;
|
||||
feeRecipientAddress: string;
|
||||
senderAddress: string;
|
||||
makerAssetAmount: BigNumber;
|
||||
takerAssetAmount: BigNumber;
|
||||
makerFee: BigNumber;
|
||||
takerFee: BigNumber;
|
||||
expirationTimeSeconds: BigNumber;
|
||||
salt: BigNumber;
|
||||
makerAssetData: string;
|
||||
takerAssetData: string;
|
||||
}>,
|
||||
string[]
|
||||
]
|
||||
>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(
|
||||
returnData: string,
|
||||
): [
|
||||
@@ -583,6 +632,7 @@ export class OrderValidatorContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(
|
||||
orders: Array<{
|
||||
@@ -610,17 +660,26 @@ export class OrderValidatorContract extends BaseContract {
|
||||
);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(
|
||||
callData: string,
|
||||
): Array<{
|
||||
makerBalance: BigNumber;
|
||||
makerAllowance: BigNumber;
|
||||
takerBalance: BigNumber;
|
||||
takerAllowance: BigNumber;
|
||||
makerZrxBalance: BigNumber;
|
||||
makerZrxAllowance: BigNumber;
|
||||
takerZrxBalance: BigNumber;
|
||||
takerZrxAllowance: BigNumber;
|
||||
makerAddress: string;
|
||||
takerAddress: string;
|
||||
feeRecipientAddress: string;
|
||||
senderAddress: string;
|
||||
makerAssetAmount: BigNumber;
|
||||
takerAssetAmount: BigNumber;
|
||||
makerFee: BigNumber;
|
||||
takerFee: BigNumber;
|
||||
expirationTimeSeconds: BigNumber;
|
||||
salt: BigNumber;
|
||||
makerAssetData: string;
|
||||
takerAssetData: string;
|
||||
}> {
|
||||
const self = (this as any) as OrderValidatorContract;
|
||||
const abiEncoder = self._lookupAbiEncoder(
|
||||
@@ -629,18 +688,27 @@ export class OrderValidatorContract extends BaseContract {
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<
|
||||
Array<{
|
||||
makerBalance: BigNumber;
|
||||
makerAllowance: BigNumber;
|
||||
takerBalance: BigNumber;
|
||||
takerAllowance: BigNumber;
|
||||
makerZrxBalance: BigNumber;
|
||||
makerZrxAllowance: BigNumber;
|
||||
takerZrxBalance: BigNumber;
|
||||
takerZrxAllowance: BigNumber;
|
||||
makerAddress: string;
|
||||
takerAddress: string;
|
||||
feeRecipientAddress: string;
|
||||
senderAddress: string;
|
||||
makerAssetAmount: BigNumber;
|
||||
takerAssetAmount: BigNumber;
|
||||
makerFee: BigNumber;
|
||||
takerFee: BigNumber;
|
||||
expirationTimeSeconds: BigNumber;
|
||||
salt: BigNumber;
|
||||
makerAssetData: string;
|
||||
takerAssetData: string;
|
||||
}>
|
||||
>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(
|
||||
returnData: string,
|
||||
): Array<{
|
||||
@@ -724,6 +792,7 @@ export class OrderValidatorContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(token: string, tokenId: BigNumber): string {
|
||||
assert.isString('token', token);
|
||||
@@ -735,6 +804,11 @@ export class OrderValidatorContract extends BaseContract {
|
||||
]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): string {
|
||||
const self = (this as any) as OrderValidatorContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('getERC721TokenOwner(address,uint256)');
|
||||
@@ -742,6 +816,11 @@ export class OrderValidatorContract extends BaseContract {
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<string>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): string {
|
||||
const self = (this as any) as OrderValidatorContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('getERC721TokenOwner(address,uint256)');
|
||||
@@ -801,6 +880,7 @@ export class OrderValidatorContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(target: string, assetData: string[]): string {
|
||||
assert.isString('target', target);
|
||||
@@ -812,13 +892,23 @@ export class OrderValidatorContract extends BaseContract {
|
||||
]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): [BigNumber[], BigNumber[]] {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): [string, string[]] {
|
||||
const self = (this as any) as OrderValidatorContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('getBalancesAndAllowances(address,bytes[])');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<[BigNumber[], BigNumber[]]>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<[string, string[]]>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): [BigNumber[], BigNumber[]] {
|
||||
const self = (this as any) as OrderValidatorContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('getBalancesAndAllowances(address,bytes[])');
|
||||
@@ -910,6 +1000,7 @@ export class OrderValidatorContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(
|
||||
order: {
|
||||
@@ -936,17 +1027,26 @@ export class OrderValidatorContract extends BaseContract {
|
||||
);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(
|
||||
callData: string,
|
||||
): {
|
||||
makerBalance: BigNumber;
|
||||
makerAllowance: BigNumber;
|
||||
takerBalance: BigNumber;
|
||||
takerAllowance: BigNumber;
|
||||
makerZrxBalance: BigNumber;
|
||||
makerZrxAllowance: BigNumber;
|
||||
takerZrxBalance: BigNumber;
|
||||
takerZrxAllowance: BigNumber;
|
||||
makerAddress: string;
|
||||
takerAddress: string;
|
||||
feeRecipientAddress: string;
|
||||
senderAddress: string;
|
||||
makerAssetAmount: BigNumber;
|
||||
takerAssetAmount: BigNumber;
|
||||
makerFee: BigNumber;
|
||||
takerFee: BigNumber;
|
||||
expirationTimeSeconds: BigNumber;
|
||||
salt: BigNumber;
|
||||
makerAssetData: string;
|
||||
takerAssetData: string;
|
||||
} {
|
||||
const self = (this as any) as OrderValidatorContract;
|
||||
const abiEncoder = self._lookupAbiEncoder(
|
||||
@@ -954,17 +1054,26 @@ export class OrderValidatorContract extends BaseContract {
|
||||
);
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<{
|
||||
makerBalance: BigNumber;
|
||||
makerAllowance: BigNumber;
|
||||
takerBalance: BigNumber;
|
||||
takerAllowance: BigNumber;
|
||||
makerZrxBalance: BigNumber;
|
||||
makerZrxAllowance: BigNumber;
|
||||
takerZrxBalance: BigNumber;
|
||||
takerZrxAllowance: BigNumber;
|
||||
makerAddress: string;
|
||||
takerAddress: string;
|
||||
feeRecipientAddress: string;
|
||||
senderAddress: string;
|
||||
makerAssetAmount: BigNumber;
|
||||
takerAssetAmount: BigNumber;
|
||||
makerFee: BigNumber;
|
||||
takerFee: BigNumber;
|
||||
expirationTimeSeconds: BigNumber;
|
||||
salt: BigNumber;
|
||||
makerAssetData: string;
|
||||
takerAssetData: string;
|
||||
}>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(
|
||||
returnData: string,
|
||||
): {
|
||||
|
@@ -98,6 +98,7 @@ export class StaticCallProxyContract extends BaseContract {
|
||||
* @param from This value is ignored.
|
||||
* @param to This value is ignored.
|
||||
* @param amount This value is ignored.
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(assetData: string, from: string, to: string, amount: BigNumber): string {
|
||||
assert.isString('assetData', assetData);
|
||||
@@ -111,13 +112,23 @@ export class StaticCallProxyContract extends BaseContract {
|
||||
);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): [string, string, string, BigNumber] {
|
||||
const self = (this as any) as StaticCallProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('transferFrom(bytes,address,address,uint256)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<[string, string, string, BigNumber]>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): void {
|
||||
const self = (this as any) as StaticCallProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('transferFrom(bytes,address,address,uint256)');
|
||||
@@ -147,19 +158,9 @@ export class StaticCallProxyContract extends BaseContract {
|
||||
}
|
||||
const self = (this as any) as StaticCallProxyContract;
|
||||
const encodedData = self._strictEncodeArguments('getProxyId()', []);
|
||||
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
|
||||
{
|
||||
to: self.address,
|
||||
...callData,
|
||||
data: encodedData,
|
||||
},
|
||||
self._web3Wrapper.getContractDefaults(),
|
||||
);
|
||||
callDataWithDefaults.from = callDataWithDefaults.from
|
||||
? callDataWithDefaults.from.toLowerCase()
|
||||
: callDataWithDefaults.from;
|
||||
const encodedDataBytes = Buffer.from(encodedData.substr(2), 'hex');
|
||||
|
||||
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
|
||||
const rawCallResult = await self.evmExecAsync(encodedDataBytes);
|
||||
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
|
||||
const abiEncoder = self._lookupAbiEncoder('getProxyId()');
|
||||
// tslint:disable boolean-naming
|
||||
@@ -171,19 +172,30 @@ export class StaticCallProxyContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(): string {
|
||||
const self = (this as any) as StaticCallProxyContract;
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('getProxyId()', []);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): string {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
const self = (this as any) as StaticCallProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('getProxyId()');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<string>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): string {
|
||||
const self = (this as any) as StaticCallProxyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('getProxyId()');
|
||||
|
@@ -111,19 +111,30 @@ export class WETH9Contract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(): string {
|
||||
const self = (this as any) as WETH9Contract;
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('name()', []);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): string {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
const self = (this as any) as WETH9Contract;
|
||||
const abiEncoder = self._lookupAbiEncoder('name()');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<string>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): string {
|
||||
const self = (this as any) as WETH9Contract;
|
||||
const abiEncoder = self._lookupAbiEncoder('name()');
|
||||
@@ -215,6 +226,15 @@ export class WETH9Contract extends BaseContract {
|
||||
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
|
||||
return gas;
|
||||
},
|
||||
async validateAndSendTransactionAsync(
|
||||
guy: string,
|
||||
wad: BigNumber,
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
await (this as any).approve.callAsync(guy, wad, txData);
|
||||
const txHash = await (this as any).approve.sendTransactionAsync(guy, wad, txData);
|
||||
return txHash;
|
||||
},
|
||||
/**
|
||||
* Sends a read-only call to the contract method. Returns the result that would happen if one were to send an
|
||||
* Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas
|
||||
@@ -262,6 +282,7 @@ export class WETH9Contract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(guy: string, wad: BigNumber): string {
|
||||
assert.isString('guy', guy);
|
||||
@@ -273,13 +294,23 @@ export class WETH9Contract extends BaseContract {
|
||||
]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): boolean {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): string {
|
||||
const self = (this as any) as WETH9Contract;
|
||||
const abiEncoder = self._lookupAbiEncoder('approve(address,uint256)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<boolean>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<string>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): boolean {
|
||||
const self = (this as any) as WETH9Contract;
|
||||
const abiEncoder = self._lookupAbiEncoder('approve(address,uint256)');
|
||||
@@ -287,15 +318,6 @@ export class WETH9Contract extends BaseContract {
|
||||
const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<boolean>(returnData);
|
||||
return abiDecodedReturnData;
|
||||
},
|
||||
async validateAndSendTransactionAsync(
|
||||
guy: string,
|
||||
wad: BigNumber,
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
await (this as any).approve.callAsync(guy, wad, txData);
|
||||
const txHash = await (this as any).approve.sendTransactionAsync(guy, wad, txData);
|
||||
return txHash;
|
||||
},
|
||||
};
|
||||
public totalSupply = {
|
||||
/**
|
||||
@@ -338,19 +360,30 @@ export class WETH9Contract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(): string {
|
||||
const self = (this as any) as WETH9Contract;
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('totalSupply()', []);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): BigNumber {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
const self = (this as any) as WETH9Contract;
|
||||
const abiEncoder = self._lookupAbiEncoder('totalSupply()');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<BigNumber>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): BigNumber {
|
||||
const self = (this as any) as WETH9Contract;
|
||||
const abiEncoder = self._lookupAbiEncoder('totalSupply()');
|
||||
@@ -469,6 +502,16 @@ export class WETH9Contract extends BaseContract {
|
||||
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
|
||||
return gas;
|
||||
},
|
||||
async validateAndSendTransactionAsync(
|
||||
src: string,
|
||||
dst: string,
|
||||
wad: BigNumber,
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
await (this as any).transferFrom.callAsync(src, dst, wad, txData);
|
||||
const txHash = await (this as any).transferFrom.sendTransactionAsync(src, dst, wad, txData);
|
||||
return txHash;
|
||||
},
|
||||
/**
|
||||
* Sends a read-only call to the contract method. Returns the result that would happen if one were to send an
|
||||
* Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas
|
||||
@@ -522,6 +565,7 @@ export class WETH9Contract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(src: string, dst: string, wad: BigNumber): string {
|
||||
assert.isString('src', src);
|
||||
@@ -535,13 +579,23 @@ export class WETH9Contract extends BaseContract {
|
||||
]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): boolean {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): string {
|
||||
const self = (this as any) as WETH9Contract;
|
||||
const abiEncoder = self._lookupAbiEncoder('transferFrom(address,address,uint256)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<boolean>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<string>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): boolean {
|
||||
const self = (this as any) as WETH9Contract;
|
||||
const abiEncoder = self._lookupAbiEncoder('transferFrom(address,address,uint256)');
|
||||
@@ -549,16 +603,6 @@ export class WETH9Contract extends BaseContract {
|
||||
const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<boolean>(returnData);
|
||||
return abiDecodedReturnData;
|
||||
},
|
||||
async validateAndSendTransactionAsync(
|
||||
src: string,
|
||||
dst: string,
|
||||
wad: BigNumber,
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
await (this as any).transferFrom.callAsync(src, dst, wad, txData);
|
||||
const txHash = await (this as any).transferFrom.sendTransactionAsync(src, dst, wad, txData);
|
||||
return txHash;
|
||||
},
|
||||
};
|
||||
public withdraw = {
|
||||
/**
|
||||
@@ -639,6 +683,11 @@ export class WETH9Contract extends BaseContract {
|
||||
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
|
||||
return gas;
|
||||
},
|
||||
async validateAndSendTransactionAsync(wad: BigNumber, txData?: Partial<TxData> | undefined): Promise<string> {
|
||||
await (this as any).withdraw.callAsync(wad, txData);
|
||||
const txHash = await (this as any).withdraw.sendTransactionAsync(wad, txData);
|
||||
return txHash;
|
||||
},
|
||||
/**
|
||||
* Sends a read-only call to the contract method. Returns the result that would happen if one were to send an
|
||||
* Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas
|
||||
@@ -680,6 +729,7 @@ export class WETH9Contract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(wad: BigNumber): string {
|
||||
assert.isBigNumber('wad', wad);
|
||||
@@ -687,13 +737,23 @@ export class WETH9Contract extends BaseContract {
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('withdraw(uint256)', [wad]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): [BigNumber] {
|
||||
const self = (this as any) as WETH9Contract;
|
||||
const abiEncoder = self._lookupAbiEncoder('withdraw(uint256)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<[BigNumber]>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): void {
|
||||
const self = (this as any) as WETH9Contract;
|
||||
const abiEncoder = self._lookupAbiEncoder('withdraw(uint256)');
|
||||
@@ -701,11 +761,6 @@ export class WETH9Contract extends BaseContract {
|
||||
const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<void>(returnData);
|
||||
return abiDecodedReturnData;
|
||||
},
|
||||
async validateAndSendTransactionAsync(wad: BigNumber, txData?: Partial<TxData> | undefined): Promise<string> {
|
||||
await (this as any).withdraw.callAsync(wad, txData);
|
||||
const txHash = await (this as any).withdraw.sendTransactionAsync(wad, txData);
|
||||
return txHash;
|
||||
},
|
||||
};
|
||||
public decimals = {
|
||||
/**
|
||||
@@ -748,19 +803,30 @@ export class WETH9Contract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(): string {
|
||||
const self = (this as any) as WETH9Contract;
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('decimals()', []);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): number {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
const self = (this as any) as WETH9Contract;
|
||||
const abiEncoder = self._lookupAbiEncoder('decimals()');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<number>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): number {
|
||||
const self = (this as any) as WETH9Contract;
|
||||
const abiEncoder = self._lookupAbiEncoder('decimals()');
|
||||
@@ -815,6 +881,7 @@ export class WETH9Contract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(index_0: string): string {
|
||||
assert.isString('index_0', index_0);
|
||||
@@ -824,13 +891,23 @@ export class WETH9Contract extends BaseContract {
|
||||
]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): BigNumber {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): string {
|
||||
const self = (this as any) as WETH9Contract;
|
||||
const abiEncoder = self._lookupAbiEncoder('balanceOf(address)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<BigNumber>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<string>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): BigNumber {
|
||||
const self = (this as any) as WETH9Contract;
|
||||
const abiEncoder = self._lookupAbiEncoder('balanceOf(address)');
|
||||
@@ -880,19 +957,30 @@ export class WETH9Contract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(): string {
|
||||
const self = (this as any) as WETH9Contract;
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('symbol()', []);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): string {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
const self = (this as any) as WETH9Contract;
|
||||
const abiEncoder = self._lookupAbiEncoder('symbol()');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<string>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): string {
|
||||
const self = (this as any) as WETH9Contract;
|
||||
const abiEncoder = self._lookupAbiEncoder('symbol()');
|
||||
@@ -984,6 +1072,15 @@ export class WETH9Contract extends BaseContract {
|
||||
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
|
||||
return gas;
|
||||
},
|
||||
async validateAndSendTransactionAsync(
|
||||
dst: string,
|
||||
wad: BigNumber,
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
await (this as any).transfer.callAsync(dst, wad, txData);
|
||||
const txHash = await (this as any).transfer.sendTransactionAsync(dst, wad, txData);
|
||||
return txHash;
|
||||
},
|
||||
/**
|
||||
* Sends a read-only call to the contract method. Returns the result that would happen if one were to send an
|
||||
* Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas
|
||||
@@ -1031,6 +1128,7 @@ export class WETH9Contract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(dst: string, wad: BigNumber): string {
|
||||
assert.isString('dst', dst);
|
||||
@@ -1042,13 +1140,23 @@ export class WETH9Contract extends BaseContract {
|
||||
]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): boolean {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): string {
|
||||
const self = (this as any) as WETH9Contract;
|
||||
const abiEncoder = self._lookupAbiEncoder('transfer(address,uint256)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<boolean>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<string>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): boolean {
|
||||
const self = (this as any) as WETH9Contract;
|
||||
const abiEncoder = self._lookupAbiEncoder('transfer(address,uint256)');
|
||||
@@ -1056,15 +1164,6 @@ export class WETH9Contract extends BaseContract {
|
||||
const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<boolean>(returnData);
|
||||
return abiDecodedReturnData;
|
||||
},
|
||||
async validateAndSendTransactionAsync(
|
||||
dst: string,
|
||||
wad: BigNumber,
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
await (this as any).transfer.callAsync(dst, wad, txData);
|
||||
const txHash = await (this as any).transfer.sendTransactionAsync(dst, wad, txData);
|
||||
return txHash;
|
||||
},
|
||||
};
|
||||
public deposit = {
|
||||
/**
|
||||
@@ -1141,6 +1240,11 @@ export class WETH9Contract extends BaseContract {
|
||||
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
|
||||
return gas;
|
||||
},
|
||||
async validateAndSendTransactionAsync(txData?: Partial<TxData> | undefined): Promise<string> {
|
||||
await (this as any).deposit.callAsync(txData);
|
||||
const txHash = await (this as any).deposit.sendTransactionAsync(txData);
|
||||
return txHash;
|
||||
},
|
||||
/**
|
||||
* Sends a read-only call to the contract method. Returns the result that would happen if one were to send an
|
||||
* Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas
|
||||
@@ -1181,12 +1285,18 @@ export class WETH9Contract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(): string {
|
||||
const self = (this as any) as WETH9Contract;
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('deposit()', []);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
const self = (this as any) as WETH9Contract;
|
||||
const abiEncoder = self._lookupAbiEncoder('deposit()');
|
||||
@@ -1194,6 +1304,11 @@ export class WETH9Contract extends BaseContract {
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): void {
|
||||
const self = (this as any) as WETH9Contract;
|
||||
const abiEncoder = self._lookupAbiEncoder('deposit()');
|
||||
@@ -1201,11 +1316,6 @@ export class WETH9Contract extends BaseContract {
|
||||
const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<void>(returnData);
|
||||
return abiDecodedReturnData;
|
||||
},
|
||||
async validateAndSendTransactionAsync(txData?: Partial<TxData> | undefined): Promise<string> {
|
||||
await (this as any).deposit.callAsync(txData);
|
||||
const txHash = await (this as any).deposit.sendTransactionAsync(txData);
|
||||
return txHash;
|
||||
},
|
||||
};
|
||||
public allowance = {
|
||||
/**
|
||||
@@ -1258,6 +1368,7 @@ export class WETH9Contract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(index_0: string, index_1: string): string {
|
||||
assert.isString('index_0', index_0);
|
||||
@@ -1269,13 +1380,23 @@ export class WETH9Contract extends BaseContract {
|
||||
]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): BigNumber {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): string {
|
||||
const self = (this as any) as WETH9Contract;
|
||||
const abiEncoder = self._lookupAbiEncoder('allowance(address,address)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<BigNumber>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<string>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): BigNumber {
|
||||
const self = (this as any) as WETH9Contract;
|
||||
const abiEncoder = self._lookupAbiEncoder('allowance(address,address)');
|
||||
|
@@ -95,19 +95,30 @@ export class ZRXTokenContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(): string {
|
||||
const self = (this as any) as ZRXTokenContract;
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('name()', []);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): string {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
const self = (this as any) as ZRXTokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('name()');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<string>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): string {
|
||||
const self = (this as any) as ZRXTokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('name()');
|
||||
@@ -213,6 +224,15 @@ export class ZRXTokenContract extends BaseContract {
|
||||
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
|
||||
return gas;
|
||||
},
|
||||
async validateAndSendTransactionAsync(
|
||||
_spender: string,
|
||||
_value: BigNumber,
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
await (this as any).approve.callAsync(_spender, _value, txData);
|
||||
const txHash = await (this as any).approve.sendTransactionAsync(_spender, _value, txData);
|
||||
return txHash;
|
||||
},
|
||||
/**
|
||||
* Sends a read-only call to the contract method. Returns the result that would happen if one were to send an
|
||||
* Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas
|
||||
@@ -263,6 +283,7 @@ export class ZRXTokenContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(_spender: string, _value: BigNumber): string {
|
||||
assert.isString('_spender', _spender);
|
||||
@@ -274,13 +295,23 @@ export class ZRXTokenContract extends BaseContract {
|
||||
]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): boolean {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): string {
|
||||
const self = (this as any) as ZRXTokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('approve(address,uint256)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<boolean>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<string>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): boolean {
|
||||
const self = (this as any) as ZRXTokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('approve(address,uint256)');
|
||||
@@ -288,15 +319,6 @@ export class ZRXTokenContract extends BaseContract {
|
||||
const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<boolean>(returnData);
|
||||
return abiDecodedReturnData;
|
||||
},
|
||||
async validateAndSendTransactionAsync(
|
||||
_spender: string,
|
||||
_value: BigNumber,
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
await (this as any).approve.callAsync(_spender, _value, txData);
|
||||
const txHash = await (this as any).approve.sendTransactionAsync(_spender, _value, txData);
|
||||
return txHash;
|
||||
},
|
||||
};
|
||||
public totalSupply = {
|
||||
/**
|
||||
@@ -339,19 +361,30 @@ export class ZRXTokenContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(): string {
|
||||
const self = (this as any) as ZRXTokenContract;
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('totalSupply()', []);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): BigNumber {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
const self = (this as any) as ZRXTokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('totalSupply()');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<BigNumber>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): BigNumber {
|
||||
const self = (this as any) as ZRXTokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('totalSupply()');
|
||||
@@ -482,6 +515,16 @@ export class ZRXTokenContract extends BaseContract {
|
||||
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
|
||||
return gas;
|
||||
},
|
||||
async validateAndSendTransactionAsync(
|
||||
_from: string,
|
||||
_to: string,
|
||||
_value: BigNumber,
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
await (this as any).transferFrom.callAsync(_from, _to, _value, txData);
|
||||
const txHash = await (this as any).transferFrom.sendTransactionAsync(_from, _to, _value, txData);
|
||||
return txHash;
|
||||
},
|
||||
/**
|
||||
* Sends a read-only call to the contract method. Returns the result that would happen if one were to send an
|
||||
* Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas
|
||||
@@ -542,6 +585,7 @@ export class ZRXTokenContract extends BaseContract {
|
||||
* @param _from Address to transfer from.
|
||||
* @param _to Address to transfer to.
|
||||
* @param _value Amount to transfer.
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(_from: string, _to: string, _value: BigNumber): string {
|
||||
assert.isString('_from', _from);
|
||||
@@ -555,13 +599,23 @@ export class ZRXTokenContract extends BaseContract {
|
||||
]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): boolean {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): string {
|
||||
const self = (this as any) as ZRXTokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('transferFrom(address,address,uint256)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<boolean>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<string>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): boolean {
|
||||
const self = (this as any) as ZRXTokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('transferFrom(address,address,uint256)');
|
||||
@@ -569,16 +623,6 @@ export class ZRXTokenContract extends BaseContract {
|
||||
const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<boolean>(returnData);
|
||||
return abiDecodedReturnData;
|
||||
},
|
||||
async validateAndSendTransactionAsync(
|
||||
_from: string,
|
||||
_to: string,
|
||||
_value: BigNumber,
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
await (this as any).transferFrom.callAsync(_from, _to, _value, txData);
|
||||
const txHash = await (this as any).transferFrom.sendTransactionAsync(_from, _to, _value, txData);
|
||||
return txHash;
|
||||
},
|
||||
};
|
||||
public decimals = {
|
||||
/**
|
||||
@@ -621,19 +665,30 @@ export class ZRXTokenContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(): string {
|
||||
const self = (this as any) as ZRXTokenContract;
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('decimals()', []);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): number {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
const self = (this as any) as ZRXTokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('decimals()');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<number>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): number {
|
||||
const self = (this as any) as ZRXTokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('decimals()');
|
||||
@@ -688,6 +743,7 @@ export class ZRXTokenContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(_owner: string): string {
|
||||
assert.isString('_owner', _owner);
|
||||
@@ -695,13 +751,23 @@ export class ZRXTokenContract extends BaseContract {
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('balanceOf(address)', [_owner.toLowerCase()]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): BigNumber {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): string {
|
||||
const self = (this as any) as ZRXTokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('balanceOf(address)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<BigNumber>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<string>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): BigNumber {
|
||||
const self = (this as any) as ZRXTokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('balanceOf(address)');
|
||||
@@ -751,19 +817,30 @@ export class ZRXTokenContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(): string {
|
||||
const self = (this as any) as ZRXTokenContract;
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('symbol()', []);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): string {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
const self = (this as any) as ZRXTokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('symbol()');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<string>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): string {
|
||||
const self = (this as any) as ZRXTokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('symbol()');
|
||||
@@ -859,6 +936,15 @@ export class ZRXTokenContract extends BaseContract {
|
||||
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
|
||||
return gas;
|
||||
},
|
||||
async validateAndSendTransactionAsync(
|
||||
_to: string,
|
||||
_value: BigNumber,
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
await (this as any).transfer.callAsync(_to, _value, txData);
|
||||
const txHash = await (this as any).transfer.sendTransactionAsync(_to, _value, txData);
|
||||
return txHash;
|
||||
},
|
||||
/**
|
||||
* Sends a read-only call to the contract method. Returns the result that would happen if one were to send an
|
||||
* Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas
|
||||
@@ -906,6 +992,7 @@ export class ZRXTokenContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(_to: string, _value: BigNumber): string {
|
||||
assert.isString('_to', _to);
|
||||
@@ -917,13 +1004,23 @@ export class ZRXTokenContract extends BaseContract {
|
||||
]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): boolean {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): string {
|
||||
const self = (this as any) as ZRXTokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('transfer(address,uint256)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<boolean>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<string>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): boolean {
|
||||
const self = (this as any) as ZRXTokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('transfer(address,uint256)');
|
||||
@@ -931,15 +1028,6 @@ export class ZRXTokenContract extends BaseContract {
|
||||
const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<boolean>(returnData);
|
||||
return abiDecodedReturnData;
|
||||
},
|
||||
async validateAndSendTransactionAsync(
|
||||
_to: string,
|
||||
_value: BigNumber,
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
await (this as any).transfer.callAsync(_to, _value, txData);
|
||||
const txHash = await (this as any).transfer.sendTransactionAsync(_to, _value, txData);
|
||||
return txHash;
|
||||
},
|
||||
};
|
||||
public allowance = {
|
||||
/**
|
||||
@@ -992,6 +1080,7 @@ export class ZRXTokenContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(_owner: string, _spender: string): string {
|
||||
assert.isString('_owner', _owner);
|
||||
@@ -1003,13 +1092,23 @@ export class ZRXTokenContract extends BaseContract {
|
||||
]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): BigNumber {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): string {
|
||||
const self = (this as any) as ZRXTokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('allowance(address,address)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<BigNumber>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<string>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): BigNumber {
|
||||
const self = (this as any) as ZRXTokenContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('allowance(address,address)');
|
||||
|
@@ -1,4 +1,14 @@
|
||||
[
|
||||
{
|
||||
"version": "4.2.1",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Redirect to `evmExecAsync` to use local EVM instead of eth_call for pure functions",
|
||||
"pr": 2108
|
||||
}
|
||||
],
|
||||
"timestamp": 1568744790
|
||||
},
|
||||
{
|
||||
"version": "4.2.0",
|
||||
"changes": [
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v4.2.1 - _September 17, 2019_
|
||||
|
||||
* Redirect to `evmExecAsync` to use local EVM instead of eth_call for pure functions (#2108)
|
||||
|
||||
## v4.2.0 - _September 3, 2019_
|
||||
|
||||
* Provide a default set of templates for code generation, used when --template and --partials are left unspecified (#2082)
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/abi-gen",
|
||||
"version": "4.2.0",
|
||||
"version": "4.2.1",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -13,12 +13,12 @@
|
||||
"clean": "shx rm -rf lib && yarn test_cli:clean",
|
||||
"build": "tsc -b && yarn generate_contract_wrappers && yarn prettier_contract_wrappers && yarn test_cli:build",
|
||||
"build:ci": "yarn build",
|
||||
"test": "yarn run_mocha && yarn test_cli",
|
||||
"test": "run-p run_mocha && yarn test_cli",
|
||||
"test:circleci": "yarn test:coverage && yarn test_cli",
|
||||
"run_mocha": "(uname -s | grep -q Darwin && echo 'HACK! skipping mocha run due to https://github.com/0xProject/0x-monorepo/issues/2000') || mocha --require source-map-support/register --require make-promises-safe lib/test/*_test.js --timeout 100000 --bail --exit",
|
||||
"test:coverage": "nyc npm run test --all && yarn coverage:report:lcov",
|
||||
"coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info",
|
||||
"test_cli": "run-p test_cli:test_typescript diff_contract_wrappers",
|
||||
"test_cli": "run-s test_cli:test_typescript diff_contract_wrappers",
|
||||
"test_cli:clean": "rm -rf test-cli/test_typescript/lib",
|
||||
"test_cli:build": "tsc --project test-cli/tsconfig.json",
|
||||
"test_cli:test_typescript": "mocha --require source-map-support/register --require make-promises-safe test-cli/test_typescript/lib/**/*_test.js --timeout 100000 --bail --exit",
|
||||
@@ -61,14 +61,14 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/packages/abi-gen/README.md",
|
||||
"dependencies": {
|
||||
"@0x/types": "^2.4.2",
|
||||
"@0x/typescript-typings": "^4.2.5",
|
||||
"@0x/utils": "^4.5.1",
|
||||
"@0x/types": "^2.4.3",
|
||||
"@0x/typescript-typings": "^4.3.0",
|
||||
"@0x/utils": "^4.5.2",
|
||||
"@types/toposort": "^2.0.1",
|
||||
"chalk": "^2.3.0",
|
||||
"change-case": "^3.0.2",
|
||||
"cli-format": "^3.0.9",
|
||||
"ethereum-types": "^2.1.5",
|
||||
"ethereum-types": "^2.1.6",
|
||||
"glob": "^7.1.2",
|
||||
"handlebars": "^4.1.2",
|
||||
"lodash": "^4.17.11",
|
||||
@@ -79,13 +79,13 @@
|
||||
"yargs": "^10.0.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@0x/base-contract": "^5.3.3",
|
||||
"@0x/contracts-gen": "^1.0.14",
|
||||
"@0x/dev-utils": "^2.3.2",
|
||||
"@0x/sol-compiler": "^3.1.14",
|
||||
"@0x/subproviders": "^5.0.3",
|
||||
"@0x/base-contract": "^5.4.0",
|
||||
"@0x/contracts-gen": "^1.0.15",
|
||||
"@0x/dev-utils": "^2.3.3",
|
||||
"@0x/sol-compiler": "^3.1.15",
|
||||
"@0x/subproviders": "^5.0.4",
|
||||
"@0x/tslint-config": "^3.0.1",
|
||||
"@0x/web3-wrapper": "^6.0.12",
|
||||
"@0x/web3-wrapper": "^6.0.13",
|
||||
"@types/glob": "5.0.35",
|
||||
"@types/mkdirp": "^0.5.2",
|
||||
"@types/mocha": "^5.2.7",
|
||||
|
@@ -55,13 +55,18 @@ export class {{contractName}}Contract extends BaseContract {
|
||||
/**
|
||||
* {{formatDocstringForMethodTs this.devdoc.details}}
|
||||
*/
|
||||
{{/if}}
|
||||
{{#this.constant}}
|
||||
{{> call contractName=../contractName}}
|
||||
{{/this.constant}}
|
||||
{{^this.constant}}
|
||||
{{> tx contractName=../contractName}}
|
||||
{{/this.constant}}
|
||||
{{/if}}
|
||||
public {{languageSpecificName}} = {
|
||||
{{^this.constant}}
|
||||
{{> method_tx contractName=../contractName}}
|
||||
{{/this.constant}}
|
||||
{{#ifEquals this.stateMutability "pure"}}
|
||||
{{> method_call_pure contractName=../contractName}}
|
||||
{{else}}
|
||||
{{> method_call contractName=../contractName}}
|
||||
{{/ifEquals}}
|
||||
{{> method_abi_helper contractName=../contractName}}
|
||||
};
|
||||
{{/each}}
|
||||
{{#if events}}private readonly _subscriptionManager: SubscriptionManager<{{contractName}}EventArgs, {{contractName}}Events>;
|
||||
{{/if}}public static async deployFrom0xArtifactAsync(
|
||||
|
@@ -1,3 +0,0 @@
|
||||
public {{languageSpecificName}} = {
|
||||
{{> callAsync}}
|
||||
};
|
@@ -0,0 +1,45 @@
|
||||
/**
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
{{> params_docstring inputs=inputs docstrings=devdoc.params}}
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(
|
||||
{{> typed_params inputs=inputs}}
|
||||
): string {
|
||||
{{#each inputs}}
|
||||
{{#assertionType name type}}{{/assertionType}}
|
||||
{{/each}}
|
||||
const self = this as any as {{contractName}}Contract;
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('{{this.functionSignature}}', [{{> normalized_params inputs=inputs}}]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(
|
||||
callData: string
|
||||
): ({{> return_type outputs=inputs ~}}) {
|
||||
const self = this as any as {{contractName}}Contract;
|
||||
const abiEncoder = self._lookupAbiEncoder('{{this.functionSignature}}');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<{{> return_type outputs=inputs}}>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(
|
||||
returnData: string
|
||||
): ({{> return_type outputs=outputs ~}}) {
|
||||
const self = this as any as {{contractName}}Contract;
|
||||
const abiEncoder = self._lookupAbiEncoder('{{this.functionSignature}}');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<{{> return_type outputs=outputs}}>(returnData);
|
||||
return abiDecodedReturnData;
|
||||
},
|
@@ -43,37 +43,3 @@ async callAsync(
|
||||
// tslint:enable boolean-naming
|
||||
return result;
|
||||
},
|
||||
/**
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
{{> params_docstring inputs=inputs docstrings=devdoc.params}}
|
||||
*/
|
||||
getABIEncodedTransactionData(
|
||||
{{> typed_params inputs=inputs}}
|
||||
): string {
|
||||
{{#each inputs}}
|
||||
{{#assertionType name type}}{{/assertionType}}
|
||||
{{/each}}
|
||||
const self = this as any as {{contractName}}Contract;
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('{{this.functionSignature}}', [{{> normalized_params inputs=inputs}}]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(
|
||||
callData: string
|
||||
): ({{> return_type inputs=inputs ~}}) {
|
||||
const self = this as any as {{contractName}}Contract;
|
||||
const abiEncoder = self._lookupAbiEncoder('{{this.functionSignature}}');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<{{> return_type inputs=inputs}}>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
getABIDecodedReturnData(
|
||||
returnData: string
|
||||
): ({{> return_type outputs=outputs ~}}) {
|
||||
const self = this as any as {{contractName}}Contract;
|
||||
const abiEncoder = self._lookupAbiEncoder('{{this.functionSignature}}');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<{{> return_type outputs=outputs}}>(returnData);
|
||||
return abiDecodedReturnData;
|
||||
},
|
@@ -0,0 +1,37 @@
|
||||
/**
|
||||
* Sends a read-only call to the contract method. Returns the result that would happen if one were to send an
|
||||
* Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas
|
||||
* since they don't modify state.
|
||||
{{> params_docstring inputs=inputs docstrings=devdoc.params}}
|
||||
{{#if devdoc.return}}
|
||||
* @returns {{devdoc.return}}
|
||||
{{/if}}
|
||||
*/
|
||||
async callAsync(
|
||||
{{> typed_params inputs=inputs}}
|
||||
callData: Partial<CallData> = {},
|
||||
defaultBlock?: BlockParam,
|
||||
): Promise<{{> return_type outputs=outputs}}> {
|
||||
{{#each inputs}}
|
||||
{{#assertionType name type}}{{/assertionType}}
|
||||
{{/each}}
|
||||
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
|
||||
schemas.addressSchema,
|
||||
schemas.numberSchema,
|
||||
schemas.jsNumber,
|
||||
]);
|
||||
if (defaultBlock !== undefined) {
|
||||
assert.isBlockParam('defaultBlock', defaultBlock);
|
||||
}
|
||||
const self = this as any as {{contractName}}Contract;
|
||||
const encodedData = self._strictEncodeArguments('{{this.functionSignature}}', [{{> normalized_params inputs=inputs}}]);
|
||||
const encodedDataBytes = Buffer.from(encodedData.substr(2), 'hex');
|
||||
|
||||
const rawCallResult = await self.evmExecAsync(encodedDataBytes);
|
||||
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
|
||||
const abiEncoder = self._lookupAbiEncoder('{{this.functionSignature}}');
|
||||
// tslint:disable boolean-naming
|
||||
const result = abiEncoder.strictDecodeReturnValue<{{> return_type outputs=outputs}}>(rawCallResult);
|
||||
// tslint:enable boolean-naming
|
||||
return result;
|
||||
},
|
@@ -1,15 +1,14 @@
|
||||
public {{languageSpecificName}} = {
|
||||
/**
|
||||
* Sends an Ethereum transaction executing this method with the supplied parameters. This is a read/write
|
||||
* Ethereum operation and will cost gas.
|
||||
{{> params_docstring inputs=inputs docstrings=devdoc.params}}
|
||||
* @param txData Additional data for transaction
|
||||
* @returns The hash of the transaction
|
||||
*/
|
||||
async sendTransactionAsync(
|
||||
{{> typed_params inputs=inputs}}
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
/**
|
||||
* Sends an Ethereum transaction executing this method with the supplied parameters. This is a read/write
|
||||
* Ethereum operation and will cost gas.
|
||||
{{> params_docstring inputs=inputs docstrings=devdoc.params}}
|
||||
* @param txData Additional data for transaction
|
||||
* @returns The hash of the transaction
|
||||
*/
|
||||
async sendTransactionAsync(
|
||||
{{> typed_params inputs=inputs}}
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
{{#each inputs}}
|
||||
{{#assertionType name type}}{{/assertionType}}
|
||||
{{/each}}
|
||||
@@ -33,21 +32,21 @@ public {{languageSpecificName}} = {
|
||||
|
||||
const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults);
|
||||
return txHash;
|
||||
},
|
||||
/**
|
||||
* Sends an Ethereum transaction and waits until the transaction has been successfully mined without reverting.
|
||||
* If the transaction was mined, but reverted, an error is thrown.
|
||||
{{> params_docstring inputs=inputs docstrings=devdoc.params}}
|
||||
* @param txData Additional data for transaction
|
||||
* @param pollingIntervalMs Interval at which to poll for success
|
||||
* @returns A promise that resolves when the transaction is successful
|
||||
*/
|
||||
awaitTransactionSuccessAsync(
|
||||
{{> typed_params inputs=inputs}}
|
||||
txData?: Partial<TxData>,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
},
|
||||
/**
|
||||
* Sends an Ethereum transaction and waits until the transaction has been successfully mined without reverting.
|
||||
* If the transaction was mined, but reverted, an error is thrown.
|
||||
{{> params_docstring inputs=inputs docstrings=devdoc.params}}
|
||||
* @param txData Additional data for transaction
|
||||
* @param pollingIntervalMs Interval at which to poll for success
|
||||
* @returns A promise that resolves when the transaction is successful
|
||||
*/
|
||||
awaitTransactionSuccessAsync(
|
||||
{{> typed_params inputs=inputs}}
|
||||
txData?: Partial<TxData>,
|
||||
pollingIntervalMs?: number,
|
||||
timeoutMs?: number,
|
||||
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
|
||||
{{#each inputs}}
|
||||
{{#assertionType name type}}{{/assertionType}}
|
||||
{{/each}}
|
||||
@@ -68,17 +67,17 @@ public {{languageSpecificName}} = {
|
||||
);
|
||||
})(),
|
||||
);
|
||||
},
|
||||
/**
|
||||
* Estimates the gas cost of sending an Ethereum transaction calling this method with these arguments.
|
||||
{{> params_docstring inputs=inputs docstrings=devdoc.params}}
|
||||
* @param txData Additional data for transaction
|
||||
* @returns The hash of the transaction
|
||||
*/
|
||||
async estimateGasAsync(
|
||||
{{> typed_params inputs=inputs}}
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<number> {
|
||||
},
|
||||
/**
|
||||
* Estimates the gas cost of sending an Ethereum transaction calling this method with these arguments.
|
||||
{{> params_docstring inputs=inputs docstrings=devdoc.params}}
|
||||
* @param txData Additional data for transaction
|
||||
* @returns The hash of the transaction
|
||||
*/
|
||||
async estimateGasAsync(
|
||||
{{> typed_params inputs=inputs}}
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<number> {
|
||||
{{#each inputs}}
|
||||
{{#assertionType name type}}{{/assertionType}}
|
||||
{{/each}}
|
||||
@@ -95,27 +94,25 @@ public {{languageSpecificName}} = {
|
||||
if (txDataWithDefaults.from !== undefined) {
|
||||
txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase();
|
||||
}
|
||||
|
||||
|
||||
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
|
||||
return gas;
|
||||
},
|
||||
{{> callAsync}}
|
||||
async validateAndSendTransactionAsync(
|
||||
{{> typed_params inputs=inputs}}
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
await (this as any).{{languageSpecificName}}.callAsync(
|
||||
{{#each inputs~}}
|
||||
{{name}},
|
||||
{{/each~}}
|
||||
txData,
|
||||
);
|
||||
const txHash = await (this as any).{{languageSpecificName}}.sendTransactionAsync(
|
||||
{{#each inputs~}}
|
||||
{{name}},
|
||||
{{/each~}}
|
||||
txData,
|
||||
);
|
||||
return txHash;
|
||||
}
|
||||
};
|
||||
},
|
||||
async validateAndSendTransactionAsync(
|
||||
{{> typed_params inputs=inputs}}
|
||||
txData?: Partial<TxData> | undefined,
|
||||
): Promise<string> {
|
||||
await (this as any).{{languageSpecificName}}.callAsync(
|
||||
{{#each inputs~}}
|
||||
{{name}},
|
||||
{{/each~}}
|
||||
txData,
|
||||
);
|
||||
const txHash = await (this as any).{{languageSpecificName}}.sendTransactionAsync(
|
||||
{{#each inputs~}}
|
||||
{{name}},
|
||||
{{/each~}}
|
||||
txData,
|
||||
);
|
||||
return txHash;
|
||||
},
|
File diff suppressed because one or more lines are too long
@@ -97,12 +97,6 @@ contract AbiGenDummy
|
||||
return ecrecover(prefixedHash, v, r, s);
|
||||
}
|
||||
|
||||
event Withdrawal(address indexed _owner, uint _value);
|
||||
|
||||
function withdraw(uint wad) public {
|
||||
emit Withdrawal(msg.sender, wad);
|
||||
}
|
||||
|
||||
// test: generated code should normalize address inputs to lowercase
|
||||
// add extra inputs to make sure it works with address in any position
|
||||
function withAddressInput(address x, uint256 a, uint256 b, address y, uint256 c)
|
||||
@@ -113,8 +107,6 @@ contract AbiGenDummy
|
||||
return x;
|
||||
}
|
||||
|
||||
event AnEvent(uint8 param);
|
||||
|
||||
function acceptsBytes(bytes memory a) public pure {}
|
||||
|
||||
/// @dev a method that accepts an array of bytes
|
||||
@@ -180,6 +172,22 @@ contract AbiGenDummy
|
||||
function overloadedMethod(int a) public pure {}
|
||||
function overloadedMethod(string memory a) public pure {}
|
||||
|
||||
|
||||
event Withdrawal(address indexed _owner, uint _value);
|
||||
|
||||
function withdraw(uint wad) public {
|
||||
emit Withdrawal(msg.sender, wad);
|
||||
}
|
||||
|
||||
event SimpleEvent(bytes someBytes, string someString);
|
||||
|
||||
function emitSimpleEvent() public {
|
||||
emit SimpleEvent(
|
||||
hex'12345678',
|
||||
"lorem"
|
||||
);
|
||||
}
|
||||
|
||||
// begin tests for `decodeTransactionData`, `decodeReturnData`
|
||||
/// @dev complex input is dynamic and more difficult to decode than simple input.
|
||||
struct ComplexInput {
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
@@ -46,19 +46,9 @@ export class TestLibDummyContract extends BaseContract {
|
||||
}
|
||||
const self = (this as any) as TestLibDummyContract;
|
||||
const encodedData = self._strictEncodeArguments('publicAddConstant(uint256)', [x]);
|
||||
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
|
||||
{
|
||||
to: self.address,
|
||||
...callData,
|
||||
data: encodedData,
|
||||
},
|
||||
self._web3Wrapper.getContractDefaults(),
|
||||
);
|
||||
callDataWithDefaults.from = callDataWithDefaults.from
|
||||
? callDataWithDefaults.from.toLowerCase()
|
||||
: callDataWithDefaults.from;
|
||||
const encodedDataBytes = Buffer.from(encodedData.substr(2), 'hex');
|
||||
|
||||
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
|
||||
const rawCallResult = await self.evmExecAsync(encodedDataBytes);
|
||||
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
|
||||
const abiEncoder = self._lookupAbiEncoder('publicAddConstant(uint256)');
|
||||
// tslint:disable boolean-naming
|
||||
@@ -70,6 +60,7 @@ export class TestLibDummyContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(x: BigNumber): string {
|
||||
assert.isBigNumber('x', x);
|
||||
@@ -77,6 +68,11 @@ export class TestLibDummyContract extends BaseContract {
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('publicAddConstant(uint256)', [x]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): BigNumber {
|
||||
const self = (this as any) as TestLibDummyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('publicAddConstant(uint256)');
|
||||
@@ -84,6 +80,11 @@ export class TestLibDummyContract extends BaseContract {
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<BigNumber>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): BigNumber {
|
||||
const self = (this as any) as TestLibDummyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('publicAddConstant(uint256)');
|
||||
@@ -110,19 +111,9 @@ export class TestLibDummyContract extends BaseContract {
|
||||
}
|
||||
const self = (this as any) as TestLibDummyContract;
|
||||
const encodedData = self._strictEncodeArguments('publicAddOne(uint256)', [x]);
|
||||
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
|
||||
{
|
||||
to: self.address,
|
||||
...callData,
|
||||
data: encodedData,
|
||||
},
|
||||
self._web3Wrapper.getContractDefaults(),
|
||||
);
|
||||
callDataWithDefaults.from = callDataWithDefaults.from
|
||||
? callDataWithDefaults.from.toLowerCase()
|
||||
: callDataWithDefaults.from;
|
||||
const encodedDataBytes = Buffer.from(encodedData.substr(2), 'hex');
|
||||
|
||||
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
|
||||
const rawCallResult = await self.evmExecAsync(encodedDataBytes);
|
||||
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
|
||||
const abiEncoder = self._lookupAbiEncoder('publicAddOne(uint256)');
|
||||
// tslint:disable boolean-naming
|
||||
@@ -134,6 +125,7 @@ export class TestLibDummyContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(x: BigNumber): string {
|
||||
assert.isBigNumber('x', x);
|
||||
@@ -141,6 +133,11 @@ export class TestLibDummyContract extends BaseContract {
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('publicAddOne(uint256)', [x]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): BigNumber {
|
||||
const self = (this as any) as TestLibDummyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('publicAddOne(uint256)');
|
||||
@@ -148,6 +145,11 @@ export class TestLibDummyContract extends BaseContract {
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<BigNumber>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): BigNumber {
|
||||
const self = (this as any) as TestLibDummyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('publicAddOne(uint256)');
|
||||
|
@@ -1,15 +1,21 @@
|
||||
import { BlockchainLifecycle, devConstants, web3Factory } from '@0x/dev-utils';
|
||||
import { Web3ProviderEngine } from '@0x/subproviders';
|
||||
import { BigNumber, providerUtils } from '@0x/utils';
|
||||
import { Web3Wrapper } from '@0x/web3-wrapper';
|
||||
|
||||
import { BlockParamLiteral, Web3Wrapper } from '@0x/web3-wrapper';
|
||||
import * as chai from 'chai';
|
||||
import * as chaiAsPromised from 'chai-as-promised';
|
||||
import * as ChaiBigNumber from 'chai-bignumber';
|
||||
import * as dirtyChai from 'dirty-chai';
|
||||
import * as Sinon from 'sinon';
|
||||
import { constants } from 'websocket';
|
||||
|
||||
import { AbiGenDummyContract, AbiGenDummyEvents, artifacts, TestLibDummyContract } from '../src';
|
||||
import {
|
||||
AbiGenDummyContract,
|
||||
AbiGenDummyEvents,
|
||||
AbiGenDummyWithdrawalEventArgs,
|
||||
artifacts,
|
||||
TestLibDummyContract,
|
||||
} from '../src';
|
||||
|
||||
const txDefaults = {
|
||||
from: devConstants.TESTRPC_FIRST_ADDRESS,
|
||||
@@ -75,22 +81,22 @@ describe('AbiGenDummy Contract', () => {
|
||||
});
|
||||
describe('simpleRevert', () => {
|
||||
it('should call simpleRevert', async () => {
|
||||
return expectContractCallFailedAsync(abiGenDummy.simpleRevert.callAsync(), 'SIMPLE_REVERT');
|
||||
expect(abiGenDummy.simpleRevert.callAsync()).to.be.rejectedWith('SIMPLE_REVERT');
|
||||
});
|
||||
});
|
||||
describe('revertWithConstant', () => {
|
||||
it('should call revertWithConstant', async () => {
|
||||
return expectContractCallFailedAsync(abiGenDummy.revertWithConstant.callAsync(), 'REVERT_WITH_CONSTANT');
|
||||
expect(abiGenDummy.revertWithConstant.callAsync()).to.be.rejectedWith('REVERT_WITH_CONSTANT');
|
||||
});
|
||||
});
|
||||
describe('simpleRequire', () => {
|
||||
it('should call simpleRequire', async () => {
|
||||
return expectContractCallFailedAsync(abiGenDummy.simpleRequire.callAsync(), 'SIMPLE_REQUIRE');
|
||||
expect(abiGenDummy.simpleRequire.callAsync()).to.be.rejectedWith('SIMPLE_REQUIRE');
|
||||
});
|
||||
});
|
||||
describe('requireWithConstant', () => {
|
||||
it('should call requireWithConstant', async () => {
|
||||
return expectContractCallFailedAsync(abiGenDummy.requireWithConstant.callAsync(), 'REQUIRE_WITH_CONSTANT');
|
||||
expect(abiGenDummy.requireWithConstant.callAsync()).to.be.rejectedWith('REQUIRE_WITH_CONSTANT');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -163,6 +169,45 @@ describe('AbiGenDummy Contract', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('getLogsAsync', () => {
|
||||
const blockRange = {
|
||||
fromBlock: 0,
|
||||
toBlock: BlockParamLiteral.Latest,
|
||||
};
|
||||
it('should get logs with decoded args emitted by EventWithStruct', async () => {
|
||||
await abiGenDummy.emitSimpleEvent.awaitTransactionSuccessAsync();
|
||||
const eventName = AbiGenDummyEvents.SimpleEvent;
|
||||
const indexFilterValues = {};
|
||||
const logs = await abiGenDummy.getLogsAsync(eventName, blockRange, indexFilterValues);
|
||||
expect(logs).to.have.length(1);
|
||||
expect(logs[0].event).to.be.equal(eventName);
|
||||
});
|
||||
it('should only get the logs with the correct event name', async () => {
|
||||
await abiGenDummy.emitSimpleEvent.awaitTransactionSuccessAsync();
|
||||
const differentEventName = AbiGenDummyEvents.Withdrawal;
|
||||
const indexFilterValues = {};
|
||||
const logs = await abiGenDummy.getLogsAsync(differentEventName, blockRange, indexFilterValues);
|
||||
expect(logs).to.have.length(0);
|
||||
});
|
||||
it('should only get the logs with the correct indexed fields', async () => {
|
||||
const [addressOne, addressTwo] = await web3Wrapper.getAvailableAddressesAsync();
|
||||
await abiGenDummy.withdraw.awaitTransactionSuccessAsync(new BigNumber(1), { from: addressOne });
|
||||
await abiGenDummy.withdraw.awaitTransactionSuccessAsync(new BigNumber(1), { from: addressTwo });
|
||||
const eventName = AbiGenDummyEvents.Withdrawal;
|
||||
const indexFilterValues = {
|
||||
_owner: addressOne,
|
||||
};
|
||||
const logs = await abiGenDummy.getLogsAsync<AbiGenDummyWithdrawalEventArgs>(
|
||||
eventName,
|
||||
blockRange,
|
||||
indexFilterValues,
|
||||
);
|
||||
expect(logs).to.have.length(1);
|
||||
const args = logs[0].args;
|
||||
expect(args._owner).to.be.equal(addressOne);
|
||||
});
|
||||
});
|
||||
|
||||
describe('withAddressInput', () => {
|
||||
it('should normalize address inputs to lowercase', async () => {
|
||||
const xAddress = devConstants.TESTRPC_FIRST_ADDRESS.toUpperCase();
|
||||
@@ -267,16 +312,3 @@ describe('Lib dummy contract', () => {
|
||||
expect(result).to.deep.equal(new BigNumber(1235));
|
||||
});
|
||||
});
|
||||
|
||||
// HACK(xianny): copied from @0x/contracts-test-utils to avoid circular dependency
|
||||
/**
|
||||
* Resolves if the the contract call fails with the given revert reason.
|
||||
* @param p a Promise resulting from a contract call
|
||||
* @param reason a specific revert reason
|
||||
* @returns a new Promise which will reject if the conditions are not met and
|
||||
* otherwise resolve with no value.
|
||||
*/
|
||||
function expectContractCallFailedAsync<T>(p: Promise<T>, reason: string): Chai.PromisedAssertion {
|
||||
const rejectionMessageRegex = new RegExp(`^VM Exception while processing transaction: revert ${reason}$`);
|
||||
return expect(p).to.be.rejectedWith(rejectionMessageRegex);
|
||||
}
|
||||
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1568744790,
|
||||
"version": "2.1.6",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1567521715,
|
||||
"version": "2.1.5",
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v2.1.6 - _September 17, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v2.1.5 - _September 3, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user