update @0x/contract-artifacts and @0x/contract-wrappers
This commit is contained in:
@@ -21,6 +21,14 @@
|
||||
{
|
||||
"note": "Added `ERC20BridgeSampler.sampleBuysFromKyberNetwork`",
|
||||
"pr": 2551
|
||||
},
|
||||
{
|
||||
"note": "Added `ERC20BridgeSampler.sampleBuysFromUniswapV2",
|
||||
"pr": 2595
|
||||
},
|
||||
{
|
||||
"note": "Added `ERC20BridgeSampler.sampleSellsFromUniswapV2",
|
||||
"pr": 2595
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@@ -561,6 +561,29 @@ export class ERC20BridgeSamplerContract extends BaseContract {
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
constant: true,
|
||||
inputs: [
|
||||
{
|
||||
name: 'path',
|
||||
type: 'address[]',
|
||||
},
|
||||
{
|
||||
name: 'makerTokenAmounts',
|
||||
type: 'uint256[]',
|
||||
},
|
||||
],
|
||||
name: 'sampleBuysFromUniswapV2',
|
||||
outputs: [
|
||||
{
|
||||
name: 'takerTokenAmounts',
|
||||
type: 'uint256[]',
|
||||
},
|
||||
],
|
||||
payable: false,
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
constant: true,
|
||||
inputs: [
|
||||
@@ -735,6 +758,29 @@ export class ERC20BridgeSamplerContract extends BaseContract {
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
constant: true,
|
||||
inputs: [
|
||||
{
|
||||
name: 'path',
|
||||
type: 'address[]',
|
||||
},
|
||||
{
|
||||
name: 'takerTokenAmounts',
|
||||
type: 'uint256[]',
|
||||
},
|
||||
],
|
||||
name: 'sampleSellsFromUniswapV2',
|
||||
outputs: [
|
||||
{
|
||||
name: 'makerTokenAmounts',
|
||||
type: 'uint256[]',
|
||||
},
|
||||
],
|
||||
payable: false,
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
] as ContractAbi;
|
||||
return abi;
|
||||
}
|
||||
@@ -1182,6 +1228,34 @@ export class ERC20BridgeSamplerContract extends BaseContract {
|
||||
},
|
||||
};
|
||||
}
|
||||
/**
|
||||
* Sample buy quotes from UniswapV2.
|
||||
* @param path Token route.
|
||||
* @param makerTokenAmounts Maker token buy amount for each sample.
|
||||
* @returns takerTokenAmounts Taker amounts sold at each maker token amount.
|
||||
*/
|
||||
public sampleBuysFromUniswapV2(path: string[], makerTokenAmounts: BigNumber[]): ContractFunctionObj<BigNumber[]> {
|
||||
const self = (this as any) as ERC20BridgeSamplerContract;
|
||||
assert.isArray('path', path);
|
||||
assert.isArray('makerTokenAmounts', makerTokenAmounts);
|
||||
const functionSignature = 'sampleBuysFromUniswapV2(address[],uint256[])';
|
||||
|
||||
return {
|
||||
async callAsync(callData: Partial<CallData> = {}, defaultBlock?: BlockParam): Promise<BigNumber[]> {
|
||||
BaseContract._assertCallParams(callData, defaultBlock);
|
||||
const rawCallResult = await self._performCallAsync(
|
||||
{ ...callData, data: this.getABIEncodedTransactionData() },
|
||||
defaultBlock,
|
||||
);
|
||||
const abiEncoder = self._lookupAbiEncoder(functionSignature);
|
||||
BaseContract._throwIfUnexpectedEmptyCallResult(rawCallResult, abiEncoder);
|
||||
return abiEncoder.strictDecodeReturnValue<BigNumber[]>(rawCallResult);
|
||||
},
|
||||
getABIEncodedTransactionData(): string {
|
||||
return self._strictEncodeArguments(functionSignature, [path, makerTokenAmounts]);
|
||||
},
|
||||
};
|
||||
}
|
||||
/**
|
||||
* Sample sell quotes from Curve.
|
||||
* @param curveAddress Address of the Curve contract.
|
||||
@@ -1423,6 +1497,34 @@ export class ERC20BridgeSamplerContract extends BaseContract {
|
||||
},
|
||||
};
|
||||
}
|
||||
/**
|
||||
* Sample sell quotes from UniswapV2.
|
||||
* @param path Token route.
|
||||
* @param takerTokenAmounts Taker token sell amount for each sample.
|
||||
* @returns makerTokenAmounts Maker amounts bought at each taker token amount.
|
||||
*/
|
||||
public sampleSellsFromUniswapV2(path: string[], takerTokenAmounts: BigNumber[]): ContractFunctionObj<BigNumber[]> {
|
||||
const self = (this as any) as ERC20BridgeSamplerContract;
|
||||
assert.isArray('path', path);
|
||||
assert.isArray('takerTokenAmounts', takerTokenAmounts);
|
||||
const functionSignature = 'sampleSellsFromUniswapV2(address[],uint256[])';
|
||||
|
||||
return {
|
||||
async callAsync(callData: Partial<CallData> = {}, defaultBlock?: BlockParam): Promise<BigNumber[]> {
|
||||
BaseContract._assertCallParams(callData, defaultBlock);
|
||||
const rawCallResult = await self._performCallAsync(
|
||||
{ ...callData, data: this.getABIEncodedTransactionData() },
|
||||
defaultBlock,
|
||||
);
|
||||
const abiEncoder = self._lookupAbiEncoder(functionSignature);
|
||||
BaseContract._throwIfUnexpectedEmptyCallResult(rawCallResult, abiEncoder);
|
||||
return abiEncoder.strictDecodeReturnValue<BigNumber[]>(rawCallResult);
|
||||
},
|
||||
getABIEncodedTransactionData(): string {
|
||||
return self._strictEncodeArguments(functionSignature, [path, takerTokenAmounts]);
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
constructor(
|
||||
address: string,
|
||||
|
@@ -540,6 +540,29 @@ export class IERC20BridgeSamplerContract extends BaseContract {
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
constant: true,
|
||||
inputs: [
|
||||
{
|
||||
name: 'path',
|
||||
type: 'address[]',
|
||||
},
|
||||
{
|
||||
name: 'makerTokenAmounts',
|
||||
type: 'uint256[]',
|
||||
},
|
||||
],
|
||||
name: 'sampleBuysFromUniswapV2',
|
||||
outputs: [
|
||||
{
|
||||
name: 'takerTokenAmounts',
|
||||
type: 'uint256[]',
|
||||
},
|
||||
],
|
||||
payable: false,
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
constant: true,
|
||||
inputs: [
|
||||
@@ -683,6 +706,29 @@ export class IERC20BridgeSamplerContract extends BaseContract {
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
constant: true,
|
||||
inputs: [
|
||||
{
|
||||
name: 'path',
|
||||
type: 'address[]',
|
||||
},
|
||||
{
|
||||
name: 'takerTokenAmounts',
|
||||
type: 'uint256[]',
|
||||
},
|
||||
],
|
||||
name: 'sampleSellsFromUniswapV2',
|
||||
outputs: [
|
||||
{
|
||||
name: 'makerTokenAmounts',
|
||||
type: 'uint256[]',
|
||||
},
|
||||
],
|
||||
payable: false,
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
] as ContractAbi;
|
||||
return abi;
|
||||
}
|
||||
@@ -1128,6 +1174,34 @@ export class IERC20BridgeSamplerContract extends BaseContract {
|
||||
},
|
||||
};
|
||||
}
|
||||
/**
|
||||
* Sample buy quotes from UniswapV2.
|
||||
* @param path Token route.
|
||||
* @param makerTokenAmounts Maker token buy amount for each sample.
|
||||
* @returns takerTokenAmounts Taker amounts sold at each maker token amount.
|
||||
*/
|
||||
public sampleBuysFromUniswapV2(path: string[], makerTokenAmounts: BigNumber[]): ContractFunctionObj<BigNumber[]> {
|
||||
const self = (this as any) as IERC20BridgeSamplerContract;
|
||||
assert.isArray('path', path);
|
||||
assert.isArray('makerTokenAmounts', makerTokenAmounts);
|
||||
const functionSignature = 'sampleBuysFromUniswapV2(address[],uint256[])';
|
||||
|
||||
return {
|
||||
async callAsync(callData: Partial<CallData> = {}, defaultBlock?: BlockParam): Promise<BigNumber[]> {
|
||||
BaseContract._assertCallParams(callData, defaultBlock);
|
||||
const rawCallResult = await self._performCallAsync(
|
||||
{ ...callData, data: this.getABIEncodedTransactionData() },
|
||||
defaultBlock,
|
||||
);
|
||||
const abiEncoder = self._lookupAbiEncoder(functionSignature);
|
||||
BaseContract._throwIfUnexpectedEmptyCallResult(rawCallResult, abiEncoder);
|
||||
return abiEncoder.strictDecodeReturnValue<BigNumber[]>(rawCallResult);
|
||||
},
|
||||
getABIEncodedTransactionData(): string {
|
||||
return self._strictEncodeArguments(functionSignature, [path, makerTokenAmounts]);
|
||||
},
|
||||
};
|
||||
}
|
||||
/**
|
||||
* Sample sell quotes from Curve.
|
||||
* @param curveAddress Address of the Curve contract.
|
||||
@@ -1326,6 +1400,34 @@ export class IERC20BridgeSamplerContract extends BaseContract {
|
||||
},
|
||||
};
|
||||
}
|
||||
/**
|
||||
* Sample sell quotes from UniswapV2.
|
||||
* @param path Token route.
|
||||
* @param takerTokenAmounts Taker token sell amount for each sample.
|
||||
* @returns makerTokenAmounts Maker amounts bought at each taker token amount.
|
||||
*/
|
||||
public sampleSellsFromUniswapV2(path: string[], takerTokenAmounts: BigNumber[]): ContractFunctionObj<BigNumber[]> {
|
||||
const self = (this as any) as IERC20BridgeSamplerContract;
|
||||
assert.isArray('path', path);
|
||||
assert.isArray('takerTokenAmounts', takerTokenAmounts);
|
||||
const functionSignature = 'sampleSellsFromUniswapV2(address[],uint256[])';
|
||||
|
||||
return {
|
||||
async callAsync(callData: Partial<CallData> = {}, defaultBlock?: BlockParam): Promise<BigNumber[]> {
|
||||
BaseContract._assertCallParams(callData, defaultBlock);
|
||||
const rawCallResult = await self._performCallAsync(
|
||||
{ ...callData, data: this.getABIEncodedTransactionData() },
|
||||
defaultBlock,
|
||||
);
|
||||
const abiEncoder = self._lookupAbiEncoder(functionSignature);
|
||||
BaseContract._throwIfUnexpectedEmptyCallResult(rawCallResult, abiEncoder);
|
||||
return abiEncoder.strictDecodeReturnValue<BigNumber[]>(rawCallResult);
|
||||
},
|
||||
getABIEncodedTransactionData(): string {
|
||||
return self._strictEncodeArguments(functionSignature, [path, takerTokenAmounts]);
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
constructor(
|
||||
address: string,
|
||||
|
Reference in New Issue
Block a user