Skip to content

Commit 75adcfc

Browse files
committed
Implementing cross-contract logic for the detection cross-channel invocation issues
1 parent 0f1ec50 commit 75adcfc

File tree

4 files changed

+375
-143
lines changed

4 files changed

+375
-143
lines changed
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
package it.unive.golisa;
2+
3+
import java.util.Objects;
4+
5+
class FileInfo {
6+
7+
private final String input;
8+
private final String contractname;
9+
private final String channel;
10+
11+
public FileInfo(String input, String contractname, String channel) {
12+
this.input = input;
13+
this.contractname = contractname;
14+
this.channel = channel;
15+
}
16+
17+
@Override
18+
public String toString() {
19+
return "Input File: " + input + ", Contract Name: " + contractname + ", Channel: " + channel;
20+
}
21+
22+
public String getInput() {
23+
return input;
24+
}
25+
26+
public String getContractName() {
27+
return contractname;
28+
}
29+
30+
public String getChannel() {
31+
return channel;
32+
}
33+
34+
@Override
35+
public int hashCode() {
36+
return Objects.hash(channel, input, contractname);
37+
}
38+
39+
@Override
40+
public boolean equals(Object obj) {
41+
if (this == obj)
42+
return true;
43+
if (obj == null)
44+
return false;
45+
if (getClass() != obj.getClass())
46+
return false;
47+
FileInfo other = (FileInfo) obj;
48+
return Objects.equals(channel, other.channel) && Objects.equals(input, other.input)
49+
&& Objects.equals(contractname, other.contractname);
50+
}
51+
52+
53+
}

0 commit comments

Comments
 (0)