Ignore generated files in multisig contracts
This commit is contained in:
parent
91d2cbfa0a
commit
665a855548
2
.gitignore
vendored
2
.gitignore
vendored
@ -80,12 +80,14 @@ packages/testnet-faucets/server/
|
|||||||
|
|
||||||
# generated contract artifacts/
|
# generated contract artifacts/
|
||||||
contracts/core/generated-artifacts/
|
contracts/core/generated-artifacts/
|
||||||
|
contracts/multisig/generated-artifacts/
|
||||||
packages/sol-cov/test/fixtures/artifacts/
|
packages/sol-cov/test/fixtures/artifacts/
|
||||||
packages/metacoin/artifacts/
|
packages/metacoin/artifacts/
|
||||||
|
|
||||||
# generated contract wrappers
|
# generated contract wrappers
|
||||||
packages/abi-gen-wrappers/wrappers
|
packages/abi-gen-wrappers/wrappers
|
||||||
contracts/core/generated-wrappers/
|
contracts/core/generated-wrappers/
|
||||||
|
contracts/multisig/generated-wrappers/
|
||||||
packages/metacoin/src/contract_wrappers
|
packages/metacoin/src/contract_wrappers
|
||||||
|
|
||||||
# solc-bin in sol-compiler
|
# solc-bin in sol-compiler
|
||||||
|
@ -2,6 +2,8 @@ lib
|
|||||||
.nyc_output
|
.nyc_output
|
||||||
/contracts/core/generated-wrappers
|
/contracts/core/generated-wrappers
|
||||||
/contracts/core/generated-artifacts
|
/contracts/core/generated-artifacts
|
||||||
|
/contracts/multisig/generated-wrappers
|
||||||
|
/contracts/cmultisigore/generated-artifacts
|
||||||
/packages/abi-gen-wrappers/src/generated-wrappers
|
/packages/abi-gen-wrappers/src/generated-wrappers
|
||||||
/packages/contract-artifacts/artifacts
|
/packages/contract-artifacts/artifacts
|
||||||
/python-packages/order_utils/src/zero_ex/contract_artifacts/artifacts
|
/python-packages/order_utils/src/zero_ex/contract_artifacts/artifacts
|
||||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,57 +0,0 @@
|
|||||||
{
|
|
||||||
"schemaVersion": "2.0.0",
|
|
||||||
"contractName": "TestRejectEther",
|
|
||||||
"compilerOutput": {
|
|
||||||
"abi": [],
|
|
||||||
"evm": {
|
|
||||||
"bytecode": {
|
|
||||||
"linkReferences": {},
|
|
||||||
"object":
|
|
||||||
"0x6080604052348015600f57600080fd5b50603580601d6000396000f3006080604052600080fd00a165627a7a72305820ea424ee6408dea2ac74e33b10a7b68bf90463703a311d5c1b7186f81ccf0775c0029",
|
|
||||||
"opcodes":
|
|
||||||
"PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH1 0xF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x35 DUP1 PUSH1 0x1D PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN STOP PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT STOP LOG1 PUSH6 0x627A7A723058 KECCAK256 0xea TIMESTAMP 0x4e 0xe6 BLOCKHASH DUP14 0xea 0x2a 0xc7 0x4e CALLER 0xb1 EXP PUSH28 0x68BF90463703A311D5C1B7186F81CCF0775C00290000000000000000 ",
|
|
||||||
"sourceMap": "641:27:2:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;641:27:2;;;;;;;"
|
|
||||||
},
|
|
||||||
"deployedBytecode": {
|
|
||||||
"linkReferences": {},
|
|
||||||
"object":
|
|
||||||
"0x6080604052600080fd00a165627a7a72305820ea424ee6408dea2ac74e33b10a7b68bf90463703a311d5c1b7186f81ccf0775c0029",
|
|
||||||
"opcodes":
|
|
||||||
"PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT STOP LOG1 PUSH6 0x627A7A723058 KECCAK256 0xea TIMESTAMP 0x4e 0xe6 BLOCKHASH DUP14 0xea 0x2a 0xc7 0x4e CALLER 0xb1 EXP PUSH28 0x68BF90463703A311D5C1B7186F81CCF0775C00290000000000000000 ",
|
|
||||||
"sourceMap": "641:27:2:-;;;;;"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sources": {
|
|
||||||
"test/TestRejectEther/TestRejectEther.sol": {
|
|
||||||
"id": 2
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sourceCodes": {
|
|
||||||
"test/TestRejectEther/TestRejectEther.sol":
|
|
||||||
"/*\n\n Copyright 2018 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity 0.4.24;\n\n\n// solhint-disable no-empty-blocks\ncontract TestRejectEther {}\n"
|
|
||||||
},
|
|
||||||
"sourceTreeHashHex": "0xad117870d1c81a5a5082749d69414a6a80cfd9fc0d7ed2a73c506e84c6e7ddaf",
|
|
||||||
"compiler": {
|
|
||||||
"name": "solc",
|
|
||||||
"version": "soljson-v0.4.24+commit.e67f0147.js",
|
|
||||||
"settings": {
|
|
||||||
"optimizer": {
|
|
||||||
"enabled": true,
|
|
||||||
"runs": 1000000
|
|
||||||
},
|
|
||||||
"outputSelection": {
|
|
||||||
"*": {
|
|
||||||
"*": [
|
|
||||||
"abi",
|
|
||||||
"evm.bytecode.object",
|
|
||||||
"evm.bytecode.sourceMap",
|
|
||||||
"evm.deployedBytecode.object",
|
|
||||||
"evm.deployedBytecode.sourceMap"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"networks": {}
|
|
||||||
}
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,75 +0,0 @@
|
|||||||
// tslint:disable:no-consecutive-blank-lines ordered-imports align trailing-comma whitespace class-name
|
|
||||||
// tslint:disable:no-unused-variable
|
|
||||||
// tslint:disable:no-unbound-method
|
|
||||||
import { BaseContract } from '@0x/base-contract';
|
|
||||||
import {
|
|
||||||
BlockParam,
|
|
||||||
BlockParamLiteral,
|
|
||||||
CallData,
|
|
||||||
ContractAbi,
|
|
||||||
ContractArtifact,
|
|
||||||
DecodedLogArgs,
|
|
||||||
MethodAbi,
|
|
||||||
Provider,
|
|
||||||
TxData,
|
|
||||||
TxDataPayable,
|
|
||||||
} from 'ethereum-types';
|
|
||||||
import { BigNumber, classUtils, logUtils } from '@0x/utils';
|
|
||||||
import { SimpleContractArtifact } from '@0x/types';
|
|
||||||
import { Web3Wrapper } from '@0x/web3-wrapper';
|
|
||||||
import * as ethers from 'ethers';
|
|
||||||
import * as _ from 'lodash';
|
|
||||||
// tslint:enable:no-unused-variable
|
|
||||||
|
|
||||||
/* istanbul ignore next */
|
|
||||||
// tslint:disable:no-parameter-reassignment
|
|
||||||
// tslint:disable-next-line:class-name
|
|
||||||
export class TestRejectEtherContract extends BaseContract {
|
|
||||||
public static async deployFrom0xArtifactAsync(
|
|
||||||
artifact: ContractArtifact | SimpleContractArtifact,
|
|
||||||
provider: Provider,
|
|
||||||
txDefaults: Partial<TxData>,
|
|
||||||
): Promise<TestRejectEtherContract> {
|
|
||||||
if (_.isUndefined(artifact.compilerOutput)) {
|
|
||||||
throw new Error('Compiler output not found in the artifact file');
|
|
||||||
}
|
|
||||||
const bytecode = artifact.compilerOutput.evm.bytecode.object;
|
|
||||||
const abi = artifact.compilerOutput.abi;
|
|
||||||
return TestRejectEtherContract.deployAsync(bytecode, abi, provider, txDefaults);
|
|
||||||
}
|
|
||||||
public static async deployAsync(
|
|
||||||
bytecode: string,
|
|
||||||
abi: ContractAbi,
|
|
||||||
provider: Provider,
|
|
||||||
txDefaults: Partial<TxData>,
|
|
||||||
): Promise<TestRejectEtherContract> {
|
|
||||||
const constructorAbi = BaseContract._lookupConstructorAbi(abi);
|
|
||||||
[] = BaseContract._formatABIDataItemList(constructorAbi.inputs, [], BaseContract._bigNumberToString);
|
|
||||||
const iface = new ethers.utils.Interface(abi);
|
|
||||||
const deployInfo = iface.deployFunction;
|
|
||||||
const txData = deployInfo.encode(bytecode, []);
|
|
||||||
const web3Wrapper = new Web3Wrapper(provider);
|
|
||||||
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
|
|
||||||
{ data: txData },
|
|
||||||
txDefaults,
|
|
||||||
web3Wrapper.estimateGasAsync.bind(web3Wrapper),
|
|
||||||
);
|
|
||||||
const txHash = await web3Wrapper.sendTransactionAsync(txDataWithDefaults);
|
|
||||||
logUtils.log(`transactionHash: ${txHash}`);
|
|
||||||
const txReceipt = await web3Wrapper.awaitTransactionSuccessAsync(txHash);
|
|
||||||
logUtils.log(`TestRejectEther successfully deployed at ${txReceipt.contractAddress}`);
|
|
||||||
const contractInstance = new TestRejectEtherContract(
|
|
||||||
abi,
|
|
||||||
txReceipt.contractAddress as string,
|
|
||||||
provider,
|
|
||||||
txDefaults,
|
|
||||||
);
|
|
||||||
contractInstance.constructorArgs = [];
|
|
||||||
return contractInstance;
|
|
||||||
}
|
|
||||||
constructor(abi: ContractAbi, address: string, provider: Provider, txDefaults?: Partial<TxData>) {
|
|
||||||
super('TestRejectEther', abi, address, provider, txDefaults);
|
|
||||||
classUtils.bindAll(this, ['_ethersInterfacesByFunctionSignature', 'address', 'abi', '_web3Wrapper']);
|
|
||||||
}
|
|
||||||
} // tslint:disable:max-file-line-count
|
|
||||||
// tslint:enable:no-unbound-method
|
|
Loading…
x
Reference in New Issue
Block a user