Skip to content
This repository was archived by the owner on May 27, 2022. It is now read-only.

Commit c3a7211

Browse files
committed
Fixes creation gas estimate display, removes solidity interface field that is no longer in solc compiler results
1 parent 4d82062 commit c3a7211

File tree

2 files changed

+3
-16
lines changed

2 files changed

+3
-16
lines changed

cakeshop-api/src/main/java/com/jpmorgan/cakeshop/model/Contract.java

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@
33
import com.fasterxml.jackson.annotation.JsonIgnore;
44
import com.jpmorgan.cakeshop.model.SolcResponse.GasEstimates;
55
import com.jpmorgan.cakeshop.service.ContractService.CodeType;
6-
import java.util.Map;
76
import org.apache.commons.lang3.builder.ToStringBuilder;
87
import org.apache.commons.lang3.builder.ToStringStyle;
98

9+
import java.util.Map;
10+
1011
public class Contract {
1112

1213
public static final String API_DATA_TYPE = "contract";
@@ -56,11 +57,6 @@ public class Contract {
5657
*/
5758
private GasEstimates gasEstimates;
5859

59-
/**
60-
* Contract interface in solidity code
61-
*/
62-
private String solidityInterface;
63-
6460
/**
6561
* Hash of each method signaature (required for making EVM calls)
6662
*/
@@ -168,14 +164,6 @@ public void setGasEstimates(GasEstimates gasEstimates) {
168164
this.gasEstimates = gasEstimates;
169165
}
170166

171-
public String getSolidityInterface() {
172-
return solidityInterface;
173-
}
174-
175-
public void setSolidityInterface(String solidityInterface) {
176-
this.solidityInterface = solidityInterface;
177-
}
178-
179167
public Map<String, String> getFunctionHashes() {
180168
return functionHashes;
181169
}

cakeshop-api/src/main/webapp/js/sandbox.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,6 @@
268268
var getDetails = function(contract, source, contractName) {
269269
// solidity interface
270270
var details = $('<div class="contractDetails"/>')
271-
.append(textRow('Solidity Interface', contract.get("solidityInterface")));
272271

273272
// function hashes
274273
var funHashes = '';
@@ -288,7 +287,7 @@
288287
var gasToText = function(g) { return g === null ? 'unknown' : g; };
289288
var text = '';
290289
if ('creation' in data)
291-
text += 'Creation: ' + gasToText(data.creation[0]) + ' + ' + gasToText(data.creation[1]) + '\n';
290+
text += 'Creation: ' + gasToText(data.creation.codeDepositCost) + ' + ' + gasToText(data.creation.executionCost) + '\n';
292291
text += 'External:\n';
293292
for (var fun in data.external) {
294293
text += ' ' + fun + ': ' + gasToText(data.external[fun]) + '\n';

0 commit comments

Comments
 (0)