mirror of
https://github.com/status-im/embark-area-51.git
synced 2025-02-10 22:26:31 +00:00
add contract class for assisted construction
# Conflicts: # package-lock.json
This commit is contained in:
parent
62934c5b18
commit
f10066a9d6
22
lib/contracts/contract.js
Normal file
22
lib/contracts/contract.js
Normal file
@ -0,0 +1,22 @@
|
||||
class Contract {
|
||||
constructor(className, compiledContract, gas, gasPrice, type = 'file') {
|
||||
this.className = className;
|
||||
this.gas = gas;
|
||||
this.gasPrice = gasPrice;
|
||||
this.type = type;
|
||||
this.compiledContract = compiledContract;
|
||||
}
|
||||
|
||||
set compiledContract(compiledContract) {
|
||||
this.code = compiledContract.code;
|
||||
this.runtimeBytecode = compiledContract.runtimeBytecode;
|
||||
this.realRuntimeBytecode = (contract.realRuntimeBytecode || contract.runtimeBytecode);
|
||||
this.swarmHash = compiledContract.swarmHash;
|
||||
this.gasEstimates = compiledContract.gasEstimates;
|
||||
this.functionHashes = compiledContract.functionHashes;
|
||||
this.abiDefinition = compiledContract.abiDefinition;
|
||||
this.filename = compiledContract.filename;
|
||||
this.originalFilename = compiledContract.originalFilename || ("contracts/" + contract.filename);
|
||||
}
|
||||
|
||||
}
|
6449
package-lock.json
generated
6449
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user