This repository has been archived by the owner on Jul 9, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 465
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- remove TransactionEncoder - move TokenUtils to @0x/dev-utils
- Loading branch information
Showing
18 changed files
with
117 additions
and
344 deletions.
There are no files selected for viewing
4 changes: 2 additions & 2 deletions
4
packages/asset-swapper/test/exchange_swap_quote_consumer_test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
packages/asset-swapper/test/forwarder_swap_quote_consumer_test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
packages/asset-swapper/test/swap_quote_consumer_utils_test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
packages/contract-wrappers/src/utils/getAbiEncodedTransactionData.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { ExchangeContract } from '../index'; | ||
|
||
// HACK (xianny): we haven't formalised contract method functions into a type interface, and would have to | ||
// differentiate contract method members from other class members to get this to work non-hackily | ||
|
||
export function getAbiEncodedTransactionData<K extends keyof ExchangeContract>(contractInstance: ExchangeContract, methodName: K, ...params: any): string { | ||
const method = (contractInstance[methodName] as any) as { | ||
getAbiEncodedTransactionData: (...args: any) => string; | ||
}; | ||
if (method.getAbiEncodedTransactionData) { | ||
const abiEncodedData = method.getAbiEncodedTransactionData(params); | ||
return abiEncodedData; | ||
} else { | ||
return ''; | ||
} | ||
} |
Oops, something went wrong.