Skip to content

Commit

Permalink
Update unlimited associations proto version to 0.53 in web3 (#8847)
Browse files Browse the repository at this point in the history
- Update unlimited associations proto version to 0.53 in web3

Signed-off-by: Xin Li <[email protected]>
  • Loading branch information
xin-hedera authored Jul 22, 2024
1 parent 1e84b20 commit 674c0ce
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public class RecordFile implements StreamFile<RecordItem> {
public static final Version HAPI_VERSION_0_27_0 = new Version(0, 27, 0);
public static final Version HAPI_VERSION_0_47_0 = new Version(0, 47, 0);
public static final Version HAPI_VERSION_0_49_0 = new Version(0, 49, 0);
public static final Version HAPI_VERSION_0_52_0 = new Version(0, 52, 0);
public static final Version HAPI_VERSION_0_53_0 = new Version(0, 53, 0);

@ToString.Exclude
private byte[] bytes;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ public Pair<ResponseCodeEnum, Long> create(

private int getMaxAutoAssociations(final ByteString alias, final List<BalanceChange> changes) {
var recordFile = ContractCallContext.get().getRecordFile();
if (recordFile != null && recordFile.getHapiVersion().isGreaterThanOrEqualTo(RecordFile.HAPI_VERSION_0_52_0)) {
if (recordFile != null && recordFile.getHapiVersion().isGreaterThanOrEqualTo(RecordFile.HAPI_VERSION_0_53_0)) {
return Account.UNLIMITED_AUTO_ASSOCIATIONS;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,9 @@ void cannotCreateAccountFromUnaliasedChange() {
@SneakyThrows
@ParameterizedTest
@CsvSource(textBlock = """
54, -1
53, -1
52, -1
51, 0
52, 0
""")
void hollowAccountWithHbarChangeWorks(int hapiMinorVersion, int expectedMaxAutoAssociations) {
final var jKey = mapKey(Key.parseFrom(ECDSA_PUBLIC_KEY));
Expand Down Expand Up @@ -209,9 +209,9 @@ void hollowAccountWithHbarChangeWorks(int hapiMinorVersion, int expectedMaxAutoA
@SneakyThrows
@ParameterizedTest
@CsvSource(textBlock = """
54, -1
53, -1
52, -1
51, 1
52, 1
""")
void happyPathWithFungibleTokenChangeWorks(int hapiMinorVersion, int expectedMaxAutoAssociations) {
Key aPrimitiveKey = Key.newBuilder()
Expand Down

0 comments on commit 674c0ce

Please sign in to comment.