Updated Coordinator wrappers and artifacts (#2346)
* Updated Coordinator wrappers and artifacts * Use contracts-coordinator package for Coordinator * disable custom CoordinatorWrapper * trim disallowed artifact fields; fix exports for docs; lint
This commit is contained in:
parent
df97b20913
commit
b4b43a9e9e
@ -9,6 +9,10 @@
|
||||
{
|
||||
"note": "[Breaking] Big refactor of contract wrapper interface. See https://github.com/0xProject/0x-monorepo/pull/2325 for details",
|
||||
"pr": 2325
|
||||
},
|
||||
{
|
||||
"note": "Updated Coordinator + Coordinator Registry wrappers",
|
||||
"pr": 2346
|
||||
}
|
||||
]
|
||||
},
|
||||
|
File diff suppressed because one or more lines are too long
@ -130,39 +130,6 @@ export class CoordinatorRegistryContract extends BaseContract {
|
||||
*/
|
||||
public static ABI(): ContractAbi {
|
||||
const abi = [
|
||||
{
|
||||
constant: false,
|
||||
inputs: [
|
||||
{
|
||||
name: 'coordinatorEndpoint',
|
||||
type: 'string',
|
||||
},
|
||||
],
|
||||
name: 'setCoordinatorEndpoint',
|
||||
outputs: [],
|
||||
payable: false,
|
||||
stateMutability: 'nonpayable',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
constant: true,
|
||||
inputs: [
|
||||
{
|
||||
name: 'coordinatorOperator',
|
||||
type: 'address',
|
||||
},
|
||||
],
|
||||
name: 'getCoordinatorEndpoint',
|
||||
outputs: [
|
||||
{
|
||||
name: 'coordinatorEndpoint',
|
||||
type: 'string',
|
||||
},
|
||||
],
|
||||
payable: false,
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
inputs: [],
|
||||
outputs: [],
|
||||
@ -188,6 +155,39 @@ export class CoordinatorRegistryContract extends BaseContract {
|
||||
outputs: [],
|
||||
type: 'event',
|
||||
},
|
||||
{
|
||||
constant: true,
|
||||
inputs: [
|
||||
{
|
||||
name: 'coordinatorOperator',
|
||||
type: 'address',
|
||||
},
|
||||
],
|
||||
name: 'getCoordinatorEndpoint',
|
||||
outputs: [
|
||||
{
|
||||
name: 'coordinatorEndpoint',
|
||||
type: 'string',
|
||||
},
|
||||
],
|
||||
payable: false,
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
constant: false,
|
||||
inputs: [
|
||||
{
|
||||
name: 'coordinatorEndpoint',
|
||||
type: 'string',
|
||||
},
|
||||
],
|
||||
name: 'setCoordinatorEndpoint',
|
||||
outputs: [],
|
||||
payable: false,
|
||||
stateMutability: 'nonpayable',
|
||||
type: 'function',
|
||||
},
|
||||
] as ContractAbi;
|
||||
return abi;
|
||||
}
|
||||
@ -219,9 +219,66 @@ export class CoordinatorRegistryContract extends BaseContract {
|
||||
return abiEncoder.getSelector();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the endpoint for a Coordinator.
|
||||
* @param coordinatorOperator Operator of the Coordinator endpoint.
|
||||
* @returns coordinatorEndpoint Endpoint of the Coordinator as a string.
|
||||
*/
|
||||
public getCoordinatorEndpoint(coordinatorOperator: string): ContractFunctionObj<string> {
|
||||
const self = (this as any) as CoordinatorRegistryContract;
|
||||
assert.isString('coordinatorOperator', coordinatorOperator);
|
||||
|
||||
return {
|
||||
async callAsync(callData: Partial<CallData> = {}, defaultBlock?: BlockParam): Promise<string> {
|
||||
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
|
||||
schemas.addressSchema,
|
||||
schemas.numberSchema,
|
||||
schemas.jsNumber,
|
||||
]);
|
||||
if (defaultBlock !== undefined) {
|
||||
assert.isBlockParam('defaultBlock', defaultBlock);
|
||||
}
|
||||
const encodedData = self._strictEncodeArguments('getCoordinatorEndpoint(address)', [
|
||||
coordinatorOperator.toLowerCase(),
|
||||
]);
|
||||
let rawCallResult;
|
||||
|
||||
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
|
||||
{
|
||||
to: self.address,
|
||||
...callData,
|
||||
data: encodedData,
|
||||
},
|
||||
self._web3Wrapper.getContractDefaults(),
|
||||
);
|
||||
callDataWithDefaults.from = callDataWithDefaults.from
|
||||
? callDataWithDefaults.from.toLowerCase()
|
||||
: callDataWithDefaults.from;
|
||||
try {
|
||||
rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
|
||||
} catch (err) {
|
||||
BaseContract._throwIfThrownErrorIsRevertError(err);
|
||||
throw err;
|
||||
}
|
||||
|
||||
BaseContract._throwIfCallResultIsRevertError(rawCallResult);
|
||||
const abiEncoder = self._lookupAbiEncoder('getCoordinatorEndpoint(address)');
|
||||
// tslint:disable boolean-naming
|
||||
const result = abiEncoder.strictDecodeReturnValue<string>(rawCallResult);
|
||||
// tslint:enable boolean-naming
|
||||
return result;
|
||||
},
|
||||
getABIEncodedTransactionData(): string {
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('getCoordinatorEndpoint(address)', [
|
||||
coordinatorOperator.toLowerCase(),
|
||||
]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
};
|
||||
}
|
||||
/**
|
||||
* Called by a Coordinator operator to set the endpoint of their Coordinator.
|
||||
* @param coordinatorEndpoint endpoint of the Coordinator.
|
||||
* @param coordinatorEndpoint Endpoint of the Coordinator as a string.
|
||||
*/
|
||||
public setCoordinatorEndpoint(coordinatorEndpoint: string): ContractTxFunctionObj<void> {
|
||||
const self = (this as any) as CoordinatorRegistryContract;
|
||||
@ -337,62 +394,6 @@ export class CoordinatorRegistryContract extends BaseContract {
|
||||
},
|
||||
};
|
||||
}
|
||||
/**
|
||||
* Gets the endpoint for a Coordinator.
|
||||
* @param coordinatorOperator operator of the Coordinator endpoint.
|
||||
*/
|
||||
public getCoordinatorEndpoint(coordinatorOperator: string): ContractFunctionObj<string> {
|
||||
const self = (this as any) as CoordinatorRegistryContract;
|
||||
assert.isString('coordinatorOperator', coordinatorOperator);
|
||||
|
||||
return {
|
||||
async callAsync(callData: Partial<CallData> = {}, defaultBlock?: BlockParam): Promise<string> {
|
||||
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
|
||||
schemas.addressSchema,
|
||||
schemas.numberSchema,
|
||||
schemas.jsNumber,
|
||||
]);
|
||||
if (defaultBlock !== undefined) {
|
||||
assert.isBlockParam('defaultBlock', defaultBlock);
|
||||
}
|
||||
const encodedData = self._strictEncodeArguments('getCoordinatorEndpoint(address)', [
|
||||
coordinatorOperator.toLowerCase(),
|
||||
]);
|
||||
let rawCallResult;
|
||||
|
||||
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
|
||||
{
|
||||
to: self.address,
|
||||
...callData,
|
||||
data: encodedData,
|
||||
},
|
||||
self._web3Wrapper.getContractDefaults(),
|
||||
);
|
||||
callDataWithDefaults.from = callDataWithDefaults.from
|
||||
? callDataWithDefaults.from.toLowerCase()
|
||||
: callDataWithDefaults.from;
|
||||
try {
|
||||
rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
|
||||
} catch (err) {
|
||||
BaseContract._throwIfThrownErrorIsRevertError(err);
|
||||
throw err;
|
||||
}
|
||||
|
||||
BaseContract._throwIfCallResultIsRevertError(rawCallResult);
|
||||
const abiEncoder = self._lookupAbiEncoder('getCoordinatorEndpoint(address)');
|
||||
// tslint:disable boolean-naming
|
||||
const result = abiEncoder.strictDecodeReturnValue<string>(rawCallResult);
|
||||
// tslint:enable boolean-naming
|
||||
return result;
|
||||
},
|
||||
getABIEncodedTransactionData(): string {
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('getCoordinatorEndpoint(address)', [
|
||||
coordinatorOperator.toLowerCase(),
|
||||
]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Subscribe to an event type emitted by the CoordinatorRegistry contract.
|
||||
|
@ -9,6 +9,10 @@
|
||||
{
|
||||
"note": "Added `ZrxVault` and `ERC20BridgeProxy` artifacts",
|
||||
"pr": 2323
|
||||
},
|
||||
{
|
||||
"note": "Updated Coordinator + Coordinator Registry artifacts",
|
||||
"pr": 2346
|
||||
}
|
||||
]
|
||||
},
|
||||
|
271
packages/contract-artifacts/artifacts/Coordinator.json
generated
271
packages/contract-artifacts/artifacts/Coordinator.json
generated
File diff suppressed because one or more lines are too long
@ -3,52 +3,80 @@
|
||||
"contractName": "CoordinatorRegistry",
|
||||
"compilerOutput": {
|
||||
"abi": [
|
||||
{ "inputs": [], "payable": false, "stateMutability": "nonpayable", "type": "constructor" },
|
||||
{
|
||||
"anonymous": false,
|
||||
"inputs": [
|
||||
{ "indexed": false, "internalType": "address", "name": "coordinatorOperator", "type": "address" },
|
||||
{ "indexed": false, "internalType": "string", "name": "coordinatorEndpoint", "type": "string" }
|
||||
],
|
||||
"name": "CoordinatorEndpointSet",
|
||||
"type": "event"
|
||||
},
|
||||
{
|
||||
"constant": true,
|
||||
"inputs": [{ "internalType": "address", "name": "coordinatorOperator", "type": "address" }],
|
||||
"name": "getCoordinatorEndpoint",
|
||||
"outputs": [{ "internalType": "string", "name": "coordinatorEndpoint", "type": "string" }],
|
||||
"payable": false,
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"inputs": [{ "name": "coordinatorEndpoint", "type": "string" }],
|
||||
"inputs": [{ "internalType": "string", "name": "coordinatorEndpoint", "type": "string" }],
|
||||
"name": "setCoordinatorEndpoint",
|
||||
"outputs": [],
|
||||
"payable": false,
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"constant": true,
|
||||
"inputs": [{ "name": "coordinatorOperator", "type": "address" }],
|
||||
"name": "getCoordinatorEndpoint",
|
||||
"outputs": [{ "name": "coordinatorEndpoint", "type": "string" }],
|
||||
"payable": false,
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{ "inputs": [], "payable": false, "stateMutability": "nonpayable", "type": "constructor" },
|
||||
{
|
||||
"anonymous": false,
|
||||
"inputs": [
|
||||
{ "indexed": false, "name": "coordinatorOperator", "type": "address" },
|
||||
{ "indexed": false, "name": "coordinatorEndpoint", "type": "string" }
|
||||
],
|
||||
"name": "CoordinatorEndpointSet",
|
||||
"type": "event"
|
||||
}
|
||||
],
|
||||
"devdoc": {
|
||||
"methods": {
|
||||
"getCoordinatorEndpoint(address)": {
|
||||
"details": "Gets the endpoint for a Coordinator.",
|
||||
"params": { "coordinatorOperator": "operator of the Coordinator endpoint." }
|
||||
"params": { "coordinatorOperator": "Operator of the Coordinator endpoint." },
|
||||
"return": "coordinatorEndpoint Endpoint of the Coordinator as a string."
|
||||
},
|
||||
"setCoordinatorEndpoint(string)": {
|
||||
"details": "Called by a Coordinator operator to set the endpoint of their Coordinator.",
|
||||
"params": { "coordinatorEndpoint": "endpoint of the Coordinator." }
|
||||
"params": { "coordinatorEndpoint": "Endpoint of the Coordinator as a string." }
|
||||
}
|
||||
}
|
||||
},
|
||||
"evm": {
|
||||
"bytecode": {
|
||||
"object": "0x608060405234801561001057600080fd5b506104b5806100206000396000f3fe608060405234801561001057600080fd5b5060043610610052577c010000000000000000000000000000000000000000000000000000000060003504635b2388be81146100575780636c90fedb1461006c575b600080fd5b61006a6100653660046102ff565b610095565b005b61007f61007a3660046102d9565b6100f0565b60405161008c91906103d8565b60405180910390f35b3360008181526020819052604090206100af9084846101c4565b507fd060052768902f3eecb84b8eae9d3a2608a1a9e60811a33968b46b8d552f266e8184846040516100e3939291906103ae565b60405180910390a1505050565b73ffffffffffffffffffffffffffffffffffffffff81166000908152602081815260409182902080548351601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6101006001861615020190931692909204918201849004840281018401909452808452606093928301828280156101b85780601f1061018d576101008083540402835291602001916101b8565b820191906000526020600020905b81548152906001019060200180831161019b57829003601f168201915b50505050509050919050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10610223578280017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00823516178555610250565b82800160010185558215610250579182015b82811115610250578235825591602001919060010190610235565b5061025c929150610260565b5090565b61027a91905b8082111561025c5760008155600101610266565b90565b600061028982356103ed565b9392505050565b600080601f830184136102a257600080fd5b50813567ffffffffffffffff8111156102ba57600080fd5b6020830191508360018202830111156102d257600080fd5b9250929050565b6000602082840312156102eb57600080fd5b60006102f7848461027d565b949350505050565b6000806020838503121561031257600080fd5b823567ffffffffffffffff81111561032957600080fd5b61033585828601610290565b92509250509250929050565b61034a816103ed565b82525050565b6000828452602084019350610366838584610417565b61036f83610453565b9093019392505050565b6000610384826103e9565b808452610398816020860160208601610423565b6103a181610453565b9093016020019392505050565b604081016103bc8286610341565b81810360208301526103cf818486610350565b95945050505050565b602080825281016102898184610379565b5190565b60006103f8826103fe565b92915050565b73ffffffffffffffffffffffffffffffffffffffff1690565b82818337506000910152565b60005b8381101561043e578181015183820152602001610426565b8381111561044d576000848401525b50505050565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169056fea265627a7a72305820d8fc8bc6ec7167e671f9f87937212d93c49d5fbe171bbdfa06c846e5ac76151b6c6578706572696d656e74616cf50037"
|
||||
"object": "0x608060405234801561001057600080fd5b506103e9806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80635b2388be1461003b5780636c90fedb146100ad575b600080fd5b6100ab6004803603602081101561005157600080fd5b81019060208101813564010000000081111561006c57600080fd5b82018360208201111561007e57600080fd5b803590602001918460018302840111640100000000831117156100a057600080fd5b509092509050610155565b005b6100e0600480360360208110156100c357600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610227565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561011a578181015183820152602001610102565b50505050905090810190601f1680156101475780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b33600081815260208190526040902061016f9084846102fb565b507fd060052768902f3eecb84b8eae9d3a2608a1a9e60811a33968b46b8d552f266e818484604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001806020018281038252848482818152602001925080828437600083820152604051601f9091017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016909201829003965090945050505050a1505050565b73ffffffffffffffffffffffffffffffffffffffff81166000908152602081815260409182902080548351601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6101006001861615020190931692909204918201849004840281018401909452808452606093928301828280156102ef5780601f106102c4576101008083540402835291602001916102ef565b820191906000526020600020905b8154815290600101906020018083116102d257829003601f168201915b50505050509050919050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061035a578280017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00823516178555610387565b82800160010185558215610387579182015b8281111561038757823582559160200191906001019061036c565b50610393929150610397565b5090565b6103b191905b80821115610393576000815560010161039d565b9056fea265627a7a723158201e5700868fc146b88ffb53f2aacd9f9684387be927a7cb4fdb2da136413c17f964736f6c634300050d0032"
|
||||
},
|
||||
"deployedBytecode": {
|
||||
"object": "0x608060405234801561001057600080fd5b50600436106100365760003560e01c80635b2388be1461003b5780636c90fedb146100ad575b600080fd5b6100ab6004803603602081101561005157600080fd5b81019060208101813564010000000081111561006c57600080fd5b82018360208201111561007e57600080fd5b803590602001918460018302840111640100000000831117156100a057600080fd5b509092509050610155565b005b6100e0600480360360208110156100c357600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610227565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561011a578181015183820152602001610102565b50505050905090810190601f1680156101475780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b33600081815260208190526040902061016f9084846102fb565b507fd060052768902f3eecb84b8eae9d3a2608a1a9e60811a33968b46b8d552f266e818484604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001806020018281038252848482818152602001925080828437600083820152604051601f9091017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016909201829003965090945050505050a1505050565b73ffffffffffffffffffffffffffffffffffffffff81166000908152602081815260409182902080548351601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6101006001861615020190931692909204918201849004840281018401909452808452606093928301828280156102ef5780601f106102c4576101008083540402835291602001916102ef565b820191906000526020600020905b8154815290600101906020018083116102d257829003601f168201915b50505050509050919050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061035a578280017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00823516178555610387565b82800160010185558215610387579182015b8281111561038757823582559160200191906001019061036c565b50610393929150610397565b5090565b6103b191905b80821115610393576000815560010161039d565b9056fea265627a7a723158201e5700868fc146b88ffb53f2aacd9f9684387be927a7cb4fdb2da136413c17f964736f6c634300050d0032"
|
||||
}
|
||||
}
|
||||
},
|
||||
"networks": {}
|
||||
"compiler": {
|
||||
"name": "solc",
|
||||
"version": "soljson-v0.5.13+commit.5b0b510c.js",
|
||||
"settings": {
|
||||
"optimizer": {
|
||||
"enabled": true,
|
||||
"runs": 1000000,
|
||||
"details": { "yul": true, "deduplicate": true, "cse": true, "constantOptimizer": true }
|
||||
},
|
||||
"outputSelection": {
|
||||
"*": {
|
||||
"*": [
|
||||
"abi",
|
||||
"devdoc",
|
||||
"evm.bytecode.object",
|
||||
"evm.bytecode.sourceMap",
|
||||
"evm.deployedBytecode.object",
|
||||
"evm.deployedBytecode.sourceMap"
|
||||
]
|
||||
}
|
||||
},
|
||||
"evmVersion": "constantinople"
|
||||
}
|
||||
},
|
||||
"chains": {}
|
||||
}
|
||||
|
34
packages/contract-artifacts/artifacts/ZrxVault.json
generated
34
packages/contract-artifacts/artifacts/ZrxVault.json
generated
@ -264,17 +264,13 @@
|
||||
"methods": {
|
||||
"addAuthorizedAddress(address)": {
|
||||
"details": "Authorizes an address.",
|
||||
"params": {
|
||||
"target": "Address to authorize."
|
||||
}
|
||||
"params": { "target": "Address to authorize." }
|
||||
},
|
||||
"balanceOf(address)": {
|
||||
"details": "Returns the balance in Zrx Tokens of the `staker`",
|
||||
"return": "Balance in Zrx."
|
||||
},
|
||||
"balanceOfZrxVault()": {
|
||||
"details": "Returns the entire balance of Zrx tokens in the vault."
|
||||
},
|
||||
"balanceOfZrxVault()": { "details": "Returns the entire balance of Zrx tokens in the vault." },
|
||||
"constructor": {
|
||||
"details": "Constructor.",
|
||||
"params": {
|
||||
@ -284,10 +280,7 @@
|
||||
},
|
||||
"depositFrom(address,uint256)": {
|
||||
"details": "Deposit an `amount` of Zrx Tokens from `staker` into the vault. Note that only the Staking contract can call this. Note that this can only be called when *not* in Catastrophic Failure mode.",
|
||||
"params": {
|
||||
"amount": "of Zrx Tokens to deposit.",
|
||||
"staker": "of Zrx Tokens."
|
||||
}
|
||||
"params": { "amount": "of Zrx Tokens to deposit.", "staker": "of Zrx Tokens." }
|
||||
},
|
||||
"enterCatastrophicFailure()": {
|
||||
"details": "Vault enters into Catastrophic Failure Mode. *** WARNING - ONCE IN CATOSTROPHIC FAILURE MODE, YOU CAN NEVER GO BACK! *** Note that only the contract owner can call this function."
|
||||
@ -298,9 +291,7 @@
|
||||
},
|
||||
"removeAuthorizedAddress(address)": {
|
||||
"details": "Removes authorizion of an address.",
|
||||
"params": {
|
||||
"target": "Address to remove authorization from."
|
||||
}
|
||||
"params": { "target": "Address to remove authorization from." }
|
||||
},
|
||||
"removeAuthorizedAddressAtIndex(address,uint256)": {
|
||||
"details": "Removes authorizion of an address.",
|
||||
@ -311,28 +302,19 @@
|
||||
},
|
||||
"setStakingProxy(address)": {
|
||||
"details": "Sets the address of the StakingProxy contract. Note that only the contract owner can call this function.",
|
||||
"params": {
|
||||
"_stakingProxyAddress": "Address of Staking proxy contract."
|
||||
}
|
||||
"params": { "_stakingProxyAddress": "Address of Staking proxy contract." }
|
||||
},
|
||||
"setZrxProxy(address)": {
|
||||
"details": "Sets the Zrx proxy. Note that only an authorized address can call this function. Note that this can only be called when *not* in Catastrophic Failure mode.",
|
||||
"params": {
|
||||
"_zrxProxyAddress": "Address of the 0x Zrx Proxy."
|
||||
}
|
||||
"params": { "_zrxProxyAddress": "Address of the 0x Zrx Proxy." }
|
||||
},
|
||||
"withdrawAllFrom(address)": {
|
||||
"details": "Withdraw ALL Zrx Tokens to `staker` from the vault. Note that this can only be called when *in* Catastrophic Failure mode.",
|
||||
"params": {
|
||||
"staker": "of Zrx Tokens."
|
||||
}
|
||||
"params": { "staker": "of Zrx Tokens." }
|
||||
},
|
||||
"withdrawFrom(address,uint256)": {
|
||||
"details": "Withdraw an `amount` of Zrx Tokens to `staker` from the vault. Note that only the Staking contract can call this. Note that this can only be called when *not* in Catastrophic Failure mode.",
|
||||
"params": {
|
||||
"amount": "of Zrx Tokens to withdraw.",
|
||||
"staker": "of Zrx Tokens."
|
||||
}
|
||||
"params": { "amount": "of Zrx Tokens to withdraw.", "staker": "of Zrx Tokens." }
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -1,4 +1,5 @@
|
||||
import {
|
||||
CoordinatorContract,
|
||||
DevUtilsContract,
|
||||
ExchangeContract,
|
||||
ForwarderContract,
|
||||
@ -22,7 +23,6 @@ import { Web3Wrapper } from '@0x/web3-wrapper';
|
||||
import { SupportedProvider } from 'ethereum-types';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import { CoordinatorWrapper } from './coordinator_wrapper';
|
||||
import { ContractWrappersConfigSchema } from './schemas/contract_wrappers_config_schema';
|
||||
import { ContractWrappersConfig } from './types';
|
||||
import { assert } from './utils/assert';
|
||||
@ -59,9 +59,9 @@ export class ContractWrappers {
|
||||
*/
|
||||
public devUtils: DevUtilsContract;
|
||||
/**
|
||||
* An instance of the CoordinatorWrapper class containing methods for interacting with the Coordinator extension contract.
|
||||
* An instance of the CoordinatorContract class containing methods for interacting with the Coordinator extension contract.
|
||||
*/
|
||||
public coordinator: CoordinatorWrapper;
|
||||
public coordinator: CoordinatorContract;
|
||||
|
||||
private readonly _web3Wrapper: Web3Wrapper;
|
||||
/**
|
||||
@ -100,13 +100,7 @@ export class ContractWrappers {
|
||||
this.forwarder = new ForwarderContract(contractAddresses.forwarder, this.getProvider());
|
||||
this.orderValidator = new OrderValidatorContract(contractAddresses.orderValidator, this.getProvider());
|
||||
this.devUtils = new DevUtilsContract(contractAddresses.devUtils, this.getProvider());
|
||||
this.coordinator = new CoordinatorWrapper(
|
||||
this.getProvider(),
|
||||
config.chainId,
|
||||
contractAddresses.coordinator,
|
||||
contractAddresses.exchange,
|
||||
contractAddresses.coordinatorRegistry,
|
||||
);
|
||||
this.coordinator = new CoordinatorContract(contractAddresses.coordinator, this.getProvider());
|
||||
this.contractAddresses = contractAddresses;
|
||||
}
|
||||
/**
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,7 +1,6 @@
|
||||
export { ContractAddresses } from '@0x/contract-addresses';
|
||||
|
||||
export { ContractWrappers } from './contract_wrappers';
|
||||
export { CoordinatorWrapper } from './coordinator_wrapper';
|
||||
|
||||
export {
|
||||
ExchangeEventArgs,
|
||||
@ -126,14 +125,9 @@ export {
|
||||
|
||||
export {
|
||||
SimpleContractArtifact,
|
||||
ZeroExTransaction,
|
||||
SignedOrder,
|
||||
Order,
|
||||
SimpleStandardContractOutput,
|
||||
SignedZeroExTransaction,
|
||||
SimpleEvmOutput,
|
||||
SimpleEvmBytecodeOutput,
|
||||
EIP712DomainWithDefaultSchema,
|
||||
EventCallback,
|
||||
DecodedLogEvent,
|
||||
IndexedFilterValues,
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,3 @@
|
||||
import { CoordinatorContract } from '@0x/abi-gen-wrappers';
|
||||
import { ContractAddresses } from '@0x/contract-addresses';
|
||||
import * as artifacts from '@0x/contract-artifacts';
|
||||
import {
|
||||
@ -9,7 +8,7 @@ import {
|
||||
MultiAssetProxyContract,
|
||||
StaticCallProxyContract,
|
||||
} from '@0x/contracts-asset-proxy';
|
||||
import { CoordinatorRegistryContract } from '@0x/contracts-coordinator';
|
||||
import { CoordinatorContract, CoordinatorRegistryContract } from '@0x/contracts-coordinator';
|
||||
import { DevUtilsContract } from '@0x/contracts-dev-utils';
|
||||
import { ERC1155MintableContract } from '@0x/contracts-erc1155';
|
||||
import { DummyERC20TokenContract, WETH9Contract } from '@0x/contracts-erc20';
|
||||
@ -209,6 +208,7 @@ export async function runMigrationsAsync(
|
||||
txDefaults,
|
||||
artifacts,
|
||||
exchange.address,
|
||||
chainId,
|
||||
);
|
||||
|
||||
// Dev Utils
|
||||
|
Loading…
x
Reference in New Issue
Block a user