Skip to content
This repository has been archived by the owner on Apr 4, 2022. It is now read-only.

Commit

Permalink
Update contract types
Browse files Browse the repository at this point in the history
  • Loading branch information
anxolin committed Dec 23, 2019
1 parent d10d876 commit 156ec92
Show file tree
Hide file tree
Showing 2 changed files with 87 additions and 58 deletions.
121 changes: 72 additions & 49 deletions src/contracts/abi/BatchExchange.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,6 @@
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "feeDenominator",
"outputs": [
{
"name": "",
"type": "uint128"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
Expand Down Expand Up @@ -215,7 +201,7 @@
"outputs": [
{
"name": "",
"type": "uint256"
"type": "uint32"
}
],
"payable": false,
Expand Down Expand Up @@ -268,7 +254,7 @@
},
{
"name": "",
"type": "uint256"
"type": "uint32"
}
],
"payable": false,
Expand All @@ -295,7 +281,7 @@
},
{
"name": "",
"type": "uint256"
"type": "uint32"
}
],
"payable": false,
Expand Down Expand Up @@ -325,6 +311,20 @@
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "FEE_DENOMINATOR",
"outputs": [
{
"name": "",
"type": "uint128"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
Expand Down Expand Up @@ -450,10 +450,6 @@
"name": "maxTokens",
"type": "uint256"
},
{
"name": "_feeDenominator",
"type": "uint128"
},
{
"name": "_feeToken",
"type": "address"
Expand All @@ -467,22 +463,22 @@
"anonymous": false,
"inputs": [
{
"indexed": false,
"indexed": true,
"name": "owner",
"type": "address"
},
{
"indexed": false,
"name": "index",
"type": "uint256"
"type": "uint16"
},
{
"indexed": false,
"indexed": true,
"name": "buyToken",
"type": "uint16"
},
{
"indexed": false,
"indexed": true,
"name": "sellToken",
"type": "uint16"
},
Expand Down Expand Up @@ -514,7 +510,7 @@
"anonymous": false,
"inputs": [
{
"indexed": false,
"indexed": true,
"name": "owner",
"type": "address"
},
Expand All @@ -531,7 +527,7 @@
"anonymous": false,
"inputs": [
{
"indexed": false,
"indexed": true,
"name": "owner",
"type": "address"
},
Expand All @@ -554,8 +550,8 @@
},
{
"indexed": true,
"name": "orderIds",
"type": "uint256"
"name": "orderId",
"type": "uint16"
},
{
"indexed": false,
Expand All @@ -581,8 +577,8 @@
},
{
"indexed": true,
"name": "orderIds",
"type": "uint256"
"name": "orderId",
"type": "uint16"
},
{
"indexed": false,
Expand All @@ -602,12 +598,12 @@
"anonymous": false,
"inputs": [
{
"indexed": false,
"indexed": true,
"name": "user",
"type": "address"
},
{
"indexed": false,
"indexed": true,
"name": "token",
"type": "address"
},
Expand All @@ -618,8 +614,8 @@
},
{
"indexed": false,
"name": "stateIndex",
"type": "uint256"
"name": "batchId",
"type": "uint32"
}
],
"name": "Deposit",
Expand All @@ -629,12 +625,12 @@
"anonymous": false,
"inputs": [
{
"indexed": false,
"indexed": true,
"name": "user",
"type": "address"
},
{
"indexed": false,
"indexed": true,
"name": "token",
"type": "address"
},
Expand All @@ -645,8 +641,8 @@
},
{
"indexed": false,
"name": "stateIndex",
"type": "uint256"
"name": "batchId",
"type": "uint32"
}
],
"name": "WithdrawRequest",
Expand All @@ -656,12 +652,12 @@
"anonymous": false,
"inputs": [
{
"indexed": false,
"indexed": true,
"name": "user",
"type": "address"
},
{
"indexed": false,
"indexed": true,
"name": "token",
"type": "address"
},
Expand Down Expand Up @@ -755,7 +751,7 @@
"outputs": [
{
"name": "orderIds",
"type": "uint256[]"
"type": "uint16[]"
}
],
"payable": false,
Expand All @@ -766,8 +762,8 @@
"constant": false,
"inputs": [
{
"name": "ids",
"type": "uint256[]"
"name": "orderIds",
"type": "uint16[]"
}
],
"name": "cancelOrders",
Expand All @@ -781,7 +777,7 @@
"inputs": [
{
"name": "cancellations",
"type": "uint256[]"
"type": "uint16[]"
},
{
"name": "buyTokens",
Expand Down Expand Up @@ -811,8 +807,8 @@
"name": "replaceOrders",
"outputs": [
{
"name": "orderIds",
"type": "uint256[]"
"name": "",
"type": "uint16[]"
}
],
"payable": false,
Expand All @@ -823,7 +819,7 @@
"constant": false,
"inputs": [
{
"name": "batchIndex",
"name": "batchId",
"type": "uint32"
},
{
Expand Down Expand Up @@ -919,6 +915,33 @@
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "user",
"type": "address"
},
{
"name": "offset",
"type": "uint16"
},
{
"name": "pageSize",
"type": "uint16"
}
],
"name": "getEncodedUserOrdersPaginated",
"outputs": [
{
"name": "elements",
"type": "bytes"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
Expand Down Expand Up @@ -956,7 +979,7 @@
"constant": true,
"inputs": [
{
"name": "batchIndex",
"name": "batchId",
"type": "uint32"
}
],
Expand Down
24 changes: 15 additions & 9 deletions src/contracts/gen/BatchExchange.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ export class BatchExchange extends Contract {

getSecondsRemainingInBatch(): TransactionObject<string>

feeDenominator(): TransactionObject<string>

requestWithdraw(token: string, amount: number | string): TransactionObject<void>

FEE_FOR_LISTING_TOKEN_IN_OWL(): TransactionObject<string>
Expand Down Expand Up @@ -88,6 +86,8 @@ export class BatchExchange extends Contract {

getBalance(user: string, token: string): TransactionObject<string>

FEE_DENOMINATOR(): TransactionObject<string>

BATCH_TIME(): TransactionObject<string>

getCurrentBatchId(): TransactionObject<string>
Expand Down Expand Up @@ -121,7 +121,7 @@ export class BatchExchange extends Contract {
sellAmounts: (number | string)[],
): TransactionObject<string[]>

cancelOrders(ids: (number | string)[]): TransactionObject<void>
cancelOrders(orderIds: (number | string)[]): TransactionObject<void>

replaceOrders(
cancellations: (number | string)[],
Expand All @@ -134,7 +134,7 @@ export class BatchExchange extends Contract {
): TransactionObject<string[]>

submitSolution(
batchIndex: number | string,
batchId: number | string,
claimedObjectiveValue: number | string,
owners: string[],
orderIds: (number | string)[],
Expand All @@ -149,11 +149,17 @@ export class BatchExchange extends Contract {

hasToken(addr: string): TransactionObject<boolean>

getEncodedUserOrdersPaginated(
user: string,
offset: number | string,
pageSize: number | string,
): TransactionObject<string>

getEncodedUserOrders(user: string): TransactionObject<string>

getEncodedOrders(): TransactionObject<string>

acceptingSolutions(batchIndex: number | string): TransactionObject<boolean>
acceptingSolutions(batchId: number | string): TransactionObject<boolean>

getCurrentObjectiveValue(): TransactionObject<string>
}
Expand Down Expand Up @@ -190,7 +196,7 @@ export class BatchExchange extends Contract {
}>
Trade: ContractEvent<{
owner: string
orderIds: string
orderId: string
executedSellAmount: string
executedBuyAmount: string
0: string
Expand All @@ -200,7 +206,7 @@ export class BatchExchange extends Contract {
}>
TradeReversion: ContractEvent<{
owner: string
orderIds: string
orderId: string
executedSellAmount: string
executedBuyAmount: string
0: string
Expand All @@ -212,7 +218,7 @@ export class BatchExchange extends Contract {
user: string
token: string
amount: string
stateIndex: string
batchId: string
0: string
1: string
2: string
Expand All @@ -222,7 +228,7 @@ export class BatchExchange extends Contract {
user: string
token: string
amount: string
stateIndex: string
batchId: string
0: string
1: string
2: string
Expand Down

0 comments on commit 156ec92

Please sign in to comment.