diff --git a/src/main/java/io/zksync/protocol/account/Wallet.java b/src/main/java/io/zksync/protocol/account/Wallet.java index 34ad0e1..f107e56 100644 --- a/src/main/java/io/zksync/protocol/account/Wallet.java +++ b/src/main/java/io/zksync/protocol/account/Wallet.java @@ -97,7 +97,7 @@ public String getAddress(){ */ public L2BridgeContracts getL2BridgeContracts(){ BridgeAddresses bridgeAddresses = providerL2.zksGetBridgeContracts().sendAsync().join().getResult(); - return new L2BridgeContracts(bridgeAddresses.getL2Erc20DefaultBridge(), bridgeAddresses.getL2WethBridge(), providerL2, transactionManager, feeProviderL2); + return new L2BridgeContracts(bridgeAddresses.l2Erc20DefaultBridge, bridgeAddresses.l2WethBridge, bridgeAddresses.l2SharedDefaultBridge, providerL2, transactionManager, feeProviderL2); } public CompletableFuture getDeploymentNonce(){ @@ -295,7 +295,7 @@ public RemoteCall execute(String contractAddress, Function f * @return Prepared get balance call */ public RemoteCall getBalance() { - return getBalance(getAddress(), getBaseToken().sendAsync().join(), ZkBlockParameterName.COMMITTED); + return getBalance(getAddress(), ZkSyncAddresses.L2_BASE_TOKEN_ADDRESS, ZkBlockParameterName.COMMITTED); } /** @@ -329,10 +329,10 @@ public RemoteCall getBalance(String address, String token) { * @return Prepared get balance call */ public RemoteCall getBalance(String address, String token, DefaultBlockParameter at) { - if (token.equalsIgnoreCase(ZkSyncAddresses.LEGACY_ETH_ADDRESS)){ - token = ZkSyncAddresses.ETH_ADDRESS_IN_CONTRACTS; + if (token.equalsIgnoreCase(ZkSyncAddresses.LEGACY_ETH_ADDRESS) || token.equalsIgnoreCase(ZkSyncAddresses.ETH_ADDRESS_IN_CONTRACTS)){ + token = l2TokenAddress(ZkSyncAddresses.ETH_ADDRESS_IN_CONTRACTS); } - if (providerL2.isBaseToken(token)) { + if (token.equalsIgnoreCase(ZkSyncAddresses.L2_BASE_TOKEN_ADDRESS)) { return new RemoteCall<>(() -> this.providerL2.ethGetBalance(address, at).sendAsync().join().getBalance()); } else { diff --git a/src/main/java/io/zksync/protocol/account/WalletL1.java b/src/main/java/io/zksync/protocol/account/WalletL1.java index 3519795..90fee95 100644 --- a/src/main/java/io/zksync/protocol/account/WalletL1.java +++ b/src/main/java/io/zksync/protocol/account/WalletL1.java @@ -13,10 +13,7 @@ import io.zksync.transaction.type.*; import io.zksync.utils.WalletUtils; import io.zksync.utils.ZkSyncAddresses; -import io.zksync.wrappers.ERC20; -import io.zksync.wrappers.IBridgehub; -import io.zksync.wrappers.IL1Bridge; -import io.zksync.wrappers.IZkSync; +import io.zksync.wrappers.*; import lombok.Getter; import org.jetbrains.annotations.Nullable; import org.web3j.abi.EventValues; @@ -71,7 +68,7 @@ public class WalletL1 { protected final TransactionReceiptProcessor transactionReceiptProcessorL1; protected final ContractGasProvider gasProvider; protected final String mainContractAddress; - protected final IZkSync contract; + protected final IZkSyncHyperchain contract; protected final EthSigner signer; protected final Credentials credentials; public WalletL1(Web3j providerL1, ZkSync providerL2, TransactionManager transactionManager, ContractGasProvider gasProvider, Credentials credentials) { @@ -80,7 +77,7 @@ public WalletL1(Web3j providerL1, ZkSync providerL2, TransactionManager transact this.transactionManager = transactionManager; this.gasProvider = gasProvider; this.mainContractAddress = providerL2.zksMainContract().sendAsync().join().getResult(); - this.contract = IZkSync.load(providerL2.zksMainContract().sendAsync().join().getResult(), providerL1, transactionManager, gasProvider); + this.contract = IZkSyncHyperchain.load(providerL2.zksMainContract().sendAsync().join().getResult(), providerL1, transactionManager, gasProvider); this.credentials = credentials; this.signer = new PrivateKeyEthSigner(credentials, providerL1.ethChainId().sendAsync().join().getChainId().longValue()); this.transactionReceiptProcessorL1 = new PollingTransactionReceiptProcessor(providerL1, DEFAULT_POLLING_FREQUENCY, DEFAULT_POLLING_ATTEMPTS_PER_TX_HASH); @@ -100,9 +97,9 @@ public WalletL1(Web3j providerL1, ZkSync providerL2, Credentials credentials){ * * @return IZkSync */ - public IZkSync getMainContract(){ + public IZkSyncHyperchain getMainContract(){ if (contract == null){ - return IZkSync.load(providerL2.zksMainContract().sendAsync().join().getResult(), providerL1, transactionManager, gasProvider); + return IZkSyncHyperchain.load(providerL2.zksMainContract().sendAsync().join().getResult(), providerL1, transactionManager, gasProvider); } return contract; } diff --git a/src/main/java/io/zksync/protocol/core/BridgeAddresses.java b/src/main/java/io/zksync/protocol/core/BridgeAddresses.java index 02ba6db..6e994ae 100644 --- a/src/main/java/io/zksync/protocol/core/BridgeAddresses.java +++ b/src/main/java/io/zksync/protocol/core/BridgeAddresses.java @@ -8,10 +8,10 @@ @NoArgsConstructor @Data public class BridgeAddresses { - private String l1Erc20DefaultBridge; - private String l2Erc20DefaultBridge; - private String l1WethBridge; - private String l2WethBridge; - private String l1SharedDefaultBridge; - private String l2SharedDefaultBridge; + public String l1Erc20DefaultBridge; + public String l2Erc20DefaultBridge; + public String l1WethBridge; + public String l2WethBridge; + public String l1SharedDefaultBridge; + public String l2SharedDefaultBridge; } diff --git a/src/main/java/io/zksync/transaction/type/DepositTransaction.java b/src/main/java/io/zksync/transaction/type/DepositTransaction.java index bf9f416..9a802eb 100644 --- a/src/main/java/io/zksync/transaction/type/DepositTransaction.java +++ b/src/main/java/io/zksync/transaction/type/DepositTransaction.java @@ -91,22 +91,6 @@ public Transaction toTx(String from, String calldata){ return new Transaction(from, options.getNonce(), options.getGasPrice(), BigInteger.ZERO, bridgeAddress, options.getValue(), calldata, options.getChainId().longValue(), options.getMaxPriorityFeePerGas(), options.getMaxFeePerGas()); } - public Transaction toFunctionCallTx(String from, IL1Bridge bridge){ - String data = bridge.encodeDeposit(from, tokenAddress, amount, l2GasLimit, gasPerPubdataByte, refoundRecepient, options.getValue()); - return new Transaction( - from, - options.getNonce(), - options.getGasPrice(), - options.getGasLimit(), - bridge.getContractAddress(), - options.getValue(), - data, - options.getChainId().longValue(), - options.getMaxPriorityFeePerGas(), - options.getMaxFeePerGas()); - } - - @Override public boolean equals(final Object o) { if (this == o) return true; diff --git a/src/main/java/io/zksync/transaction/type/L2BridgeContracts.java b/src/main/java/io/zksync/transaction/type/L2BridgeContracts.java index b84099f..7690804 100644 --- a/src/main/java/io/zksync/transaction/type/L2BridgeContracts.java +++ b/src/main/java/io/zksync/transaction/type/L2BridgeContracts.java @@ -3,6 +3,7 @@ import io.zksync.protocol.ZkSync; import io.zksync.wrappers.IL1Bridge; import io.zksync.wrappers.IL2Bridge; +import io.zksync.wrappers.IL2SharedBridge; import org.web3j.protocol.Web3j; import org.web3j.tx.TransactionManager; import org.web3j.tx.gas.ContractGasProvider; @@ -10,13 +11,15 @@ public class L2BridgeContracts { public IL2Bridge erc20L2Bridge; public IL2Bridge wethL2Bridge; + public IL2SharedBridge sharedL2Bridge; - public L2BridgeContracts(IL2Bridge erc20L1Bridge, IL2Bridge wethL1Bridge) { + public L2BridgeContracts(IL2Bridge erc20L1Bridge, IL2Bridge wethL1Bridge, IL2SharedBridge sharedL2Bridge) { this.erc20L2Bridge = erc20L1Bridge; this.wethL2Bridge = wethL1Bridge; + this.sharedL2Bridge = sharedL2Bridge; } - public L2BridgeContracts(String erc20L2Bridge, String wethL2Bridge, ZkSync providerL2, TransactionManager manager, ContractGasProvider gasProvider) { - this(IL2Bridge.load(erc20L2Bridge, providerL2, manager, gasProvider), IL2Bridge.load(wethL2Bridge, providerL2, manager, gasProvider)); + public L2BridgeContracts(String erc20L2Bridge, String wethL2Bridge, String sharedL2Bridge, ZkSync providerL2, TransactionManager manager, ContractGasProvider gasProvider) { + this(IL2Bridge.load(erc20L2Bridge, providerL2, manager, gasProvider), IL2Bridge.load(wethL2Bridge, providerL2, manager, gasProvider), IL2SharedBridge.load(sharedL2Bridge, providerL2, manager, gasProvider)); } } diff --git a/src/main/java/io/zksync/wrappers/IBridgehub.java b/src/main/java/io/zksync/wrappers/IBridgehub.java index a9ed70e..8780fae 100644 --- a/src/main/java/io/zksync/wrappers/IBridgehub.java +++ b/src/main/java/io/zksync/wrappers/IBridgehub.java @@ -58,7 +58,7 @@ public class IBridgehub extends Contract { public static final String FUNC_CREATENEWCHAIN = "createNewChain"; - public static final String FUNC_GETSTATETRANSITION = "getStateTransition"; + public static final String FUNC_GETHYPERCHAIN = "getHyperchain"; public static final String FUNC_L2TRANSACTIONBASECOST = "l2TransactionBaseCost"; @@ -258,8 +258,8 @@ public RemoteFunctionCall createNewChain(BigInteger _chainId return executeRemoteCallTransaction(function); } - public RemoteFunctionCall getStateTransition(BigInteger _chainId) { - final Function function = new Function(FUNC_GETSTATETRANSITION, + public RemoteFunctionCall getHyperchain(BigInteger _chainId) { + final Function function = new Function(FUNC_GETHYPERCHAIN, Arrays.asList(new Uint256(_chainId)), Arrays.>asList(new TypeReference
() {})); return executeRemoteCallSingleValueReturn(function, String.class); diff --git a/src/main/java/io/zksync/wrappers/IContractDeployer.java b/src/main/java/io/zksync/wrappers/IContractDeployer.java index 3c360b6..b0ad1b3 100644 --- a/src/main/java/io/zksync/wrappers/IContractDeployer.java +++ b/src/main/java/io/zksync/wrappers/IContractDeployer.java @@ -9,15 +9,11 @@ import org.web3j.abi.EventEncoder; import org.web3j.abi.TypeReference; import org.web3j.abi.datatypes.Address; -import org.web3j.abi.datatypes.Bool; -import org.web3j.abi.datatypes.DynamicBytes; -import org.web3j.abi.datatypes.DynamicStruct; import org.web3j.abi.datatypes.Event; import org.web3j.abi.datatypes.Function; import org.web3j.abi.datatypes.StaticStruct; import org.web3j.abi.datatypes.Type; import org.web3j.abi.datatypes.generated.Bytes32; -import org.web3j.abi.datatypes.generated.Uint256; import org.web3j.abi.datatypes.generated.Uint8; import org.web3j.crypto.Credentials; import org.web3j.protocol.Web3j; @@ -52,12 +48,6 @@ public class IContractDeployer extends Contract { public static final String FUNC_CREATEACCOUNT = "createAccount"; - public static final String FUNC_EXTENDEDACCOUNTVERSION = "extendedAccountVersion"; - - public static final String FUNC_FORCEDEPLOYONADDRESS = "forceDeployOnAddress"; - - public static final String FUNC_FORCEDEPLOYONADDRESSES = "forceDeployOnAddresses"; - public static final String FUNC_GETACCOUNTINFO = "getAccountInfo"; public static final String FUNC_GETNEWADDRESSCREATE = "getNewAddressCreate"; @@ -201,7 +191,7 @@ public RemoteFunctionCall create(byte[] _salt, byte[] _bytec FUNC_CREATE, Arrays.asList(new Bytes32(_salt), new Bytes32(_bytecodeHash), - new DynamicBytes(_input)), + new org.web3j.abi.datatypes.DynamicBytes(_input)), Collections.>emptyList()); return executeRemoteCallTransaction(function, weiValue); } @@ -211,7 +201,7 @@ public RemoteFunctionCall create2(byte[] _salt, byte[] _byte FUNC_CREATE2, Arrays.asList(new Bytes32(_salt), new Bytes32(_bytecodeHash), - new DynamicBytes(_input)), + new org.web3j.abi.datatypes.DynamicBytes(_input)), Collections.>emptyList()); return executeRemoteCallTransaction(function, weiValue); } @@ -221,47 +211,23 @@ public RemoteFunctionCall create2Account(byte[] _salt, byte[ FUNC_CREATE2ACCOUNT, Arrays.asList(new Bytes32(_salt), new Bytes32(_bytecodeHash), - new DynamicBytes(_input), + new org.web3j.abi.datatypes.DynamicBytes(_input), new Uint8(_aaVersion)), Collections.>emptyList()); return executeRemoteCallTransaction(function, weiValue); } - public RemoteFunctionCall createAccount(byte[] param0, byte[] _bytecodeHash, byte[] _input, BigInteger _aaVersion, BigInteger weiValue) { + public RemoteFunctionCall createAccount(byte[] _salt, byte[] _bytecodeHash, byte[] _input, BigInteger _aaVersion, BigInteger weiValue) { final Function function = new Function( FUNC_CREATEACCOUNT, - Arrays.asList(new Bytes32(param0), + Arrays.asList(new Bytes32(_salt), new Bytes32(_bytecodeHash), - new DynamicBytes(_input), + new org.web3j.abi.datatypes.DynamicBytes(_input), new Uint8(_aaVersion)), Collections.>emptyList()); return executeRemoteCallTransaction(function, weiValue); } - public RemoteFunctionCall extendedAccountVersion(String _address) { - final Function function = new Function(FUNC_EXTENDEDACCOUNTVERSION, - Arrays.asList(new Address(160, _address)), - Arrays.>asList(new TypeReference() {})); - return executeRemoteCallSingleValueReturn(function, BigInteger.class); - } - - public RemoteFunctionCall forceDeployOnAddress(ForceDeployment _deployment, String _sender, BigInteger weiValue) { - final Function function = new Function( - FUNC_FORCEDEPLOYONADDRESS, - Arrays.asList(_deployment, - new Address(160, _sender)), - Collections.>emptyList()); - return executeRemoteCallTransaction(function, weiValue); - } - - public RemoteFunctionCall forceDeployOnAddresses(List _deployments, BigInteger weiValue) { - final Function function = new Function( - FUNC_FORCEDEPLOYONADDRESSES, - Arrays.asList(new org.web3j.abi.datatypes.DynamicArray(ForceDeployment.class, _deployments)), - Collections.>emptyList()); - return executeRemoteCallTransaction(function, weiValue); - } - public RemoteFunctionCall getAccountInfo(String _address) { final Function function = new Function(FUNC_GETACCOUNTINFO, Arrays.asList(new Address(160, _address)), @@ -272,7 +238,7 @@ public RemoteFunctionCall getAccountInfo(String _address) { public RemoteFunctionCall getNewAddressCreate(String _sender, BigInteger _senderNonce) { final Function function = new Function(FUNC_GETNEWADDRESSCREATE, Arrays.asList(new Address(160, _sender), - new Uint256(_senderNonce)), + new org.web3j.abi.datatypes.generated.Uint256(_senderNonce)), Arrays.>asList(new TypeReference
() {})); return executeRemoteCallSingleValueReturn(function, String.class); } @@ -282,7 +248,7 @@ public RemoteFunctionCall getNewAddressCreate2(String _sender, byte[] _b Arrays.asList(new Address(160, _sender), new Bytes32(_bytecodeHash), new Bytes32(_salt), - new DynamicBytes(_input)), + new org.web3j.abi.datatypes.DynamicBytes(_input)), Arrays.>asList(new TypeReference
() {})); return executeRemoteCallSingleValueReturn(function, String.class); } @@ -321,40 +287,6 @@ public static IContractDeployer load(String contractAddress, Web3j web3j, Transa return new IContractDeployer(contractAddress, web3j, transactionManager, contractGasProvider); } - public static class ForceDeployment extends DynamicStruct { - public byte[] bytecodeHash; - - public String newAddress; - - public Boolean callConstructor; - - public BigInteger value; - - public byte[] input; - - public ForceDeployment(byte[] bytecodeHash, String newAddress, Boolean callConstructor, BigInteger value, byte[] input) { - super(new Bytes32(bytecodeHash), - new Address(160, newAddress), - new Bool(callConstructor), - new Uint256(value), - new DynamicBytes(input)); - this.bytecodeHash = bytecodeHash; - this.newAddress = newAddress; - this.callConstructor = callConstructor; - this.value = value; - this.input = input; - } - - public ForceDeployment(Bytes32 bytecodeHash, Address newAddress, Bool callConstructor, Uint256 value, DynamicBytes input) { - super(bytecodeHash, newAddress, callConstructor, value, input); - this.bytecodeHash = bytecodeHash.getValue(); - this.newAddress = newAddress.getValue(); - this.callConstructor = callConstructor.getValue(); - this.value = value.getValue(); - this.input = input.getValue(); - } - } - public static class AccountInfo extends StaticStruct { public BigInteger supportedAAVersion; diff --git a/src/main/java/io/zksync/wrappers/IEthToken.java b/src/main/java/io/zksync/wrappers/IEthToken.java index f09f23a..fba05a1 100644 --- a/src/main/java/io/zksync/wrappers/IEthToken.java +++ b/src/main/java/io/zksync/wrappers/IEthToken.java @@ -284,7 +284,7 @@ public RemoteFunctionCall transferFromTo(String _from, Strin return executeRemoteCallTransaction(function); } - public String encodeWithdraw(String _l1Receiver, BigInteger weiValue) { + public String encodeWithdraw(String _l1Receiver) { final Function function = new Function( FUNC_WITHDRAW, Arrays.asList(new Address(160, _l1Receiver)), diff --git a/src/main/java/io/zksync/wrappers/IL1Bridge.java b/src/main/java/io/zksync/wrappers/IL1Bridge.java index 141eeb6..89a9c26 100644 --- a/src/main/java/io/zksync/wrappers/IL1Bridge.java +++ b/src/main/java/io/zksync/wrappers/IL1Bridge.java @@ -1,18 +1,13 @@ package io.zksync.wrappers; import io.reactivex.Flowable; - -import java.io.IOException; import java.math.BigInteger; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.stream.Collectors; - -import io.zksync.abi.ZkFunctionEncoder; import org.web3j.abi.EventEncoder; -import org.web3j.abi.FunctionEncoder; import org.web3j.abi.TypeReference; import org.web3j.abi.datatypes.Address; import org.web3j.abi.datatypes.Bool; @@ -32,10 +27,8 @@ import org.web3j.protocol.core.methods.response.BaseEventResponse; import org.web3j.protocol.core.methods.response.Log; import org.web3j.protocol.core.methods.response.TransactionReceipt; -import org.web3j.protocol.exceptions.TransactionException; import org.web3j.tx.Contract; import org.web3j.tx.TransactionManager; -import org.web3j.tx.gas.ContractEIP1559GasProvider; import org.web3j.tx.gas.ContractGasProvider; /** @@ -351,19 +344,6 @@ public RemoteFunctionCall claimFailedDeposit(BigInteger _cha return executeRemoteCallTransaction(function); } - public String encodeDeposit(String _l2Receiver, String _l1Token, BigInteger _amount, BigInteger _l2TxGasLimit, BigInteger _l2TxGasPerPubdataByte, String _refundRecipient, BigInteger weiValue) { - final org.web3j.abi.datatypes.Function function = new org.web3j.abi.datatypes.Function( - FUNC_DEPOSIT, - Arrays.asList(new Address(160, _l2Receiver), - new Address(160, _l1Token), - new Uint256(_amount), - new Uint256(_l2TxGasLimit), - new Uint256(_l2TxGasPerPubdataByte), - new Address(160, _refundRecipient)), - Collections.>emptyList()); - return FunctionEncoder.encode(function); - } - public RemoteFunctionCall deposit(BigInteger _chainId, String _l2Receiver, String _l1Token, BigInteger _mintValue, BigInteger _amount, BigInteger _l2TxGasLimit, BigInteger _l2TxGasPerPubdataByte, String _refundRecipient, BigInteger weiValue) { final Function function = new Function( FUNC_DEPOSIT, @@ -387,20 +367,19 @@ public RemoteFunctionCall depositHappened(BigInteger _chainId, byte[] _l return executeRemoteCallSingleValueReturn(function, byte[].class); } - public RemoteFunctionCall finalizeWithdrawal(BigInteger _chainId, BigInteger _l2BatchNumber, BigInteger _l2MessageIndex, BigInteger _l2TxNumberInBatch, byte[] _message, List _merkleProof) throws TransactionException, IOException { + public RemoteFunctionCall finalizeWithdrawal(BigInteger _chainId, BigInteger _l2BatchNumber, BigInteger _l2MessageIndex, BigInteger _l2TxNumberInBatch, byte[] _message, List _merkleProof) { final Function function = new Function( - FUNC_FINALIZEWITHDRAWAL, + FUNC_FINALIZEWITHDRAWAL, Arrays.asList(new Uint256(_chainId), - new Uint256(_l2BatchNumber), - new Uint256(_l2MessageIndex), - new org.web3j.abi.datatypes.generated.Uint16(_l2TxNumberInBatch), - new DynamicBytes(_message), - new DynamicArray( - Bytes32.class, - org.web3j.abi.Utils.typeMap(_merkleProof, Bytes32.class))), + new Uint256(_l2BatchNumber), + new Uint256(_l2MessageIndex), + new org.web3j.abi.datatypes.generated.Uint16(_l2TxNumberInBatch), + new DynamicBytes(_message), + new DynamicArray( + Bytes32.class, + org.web3j.abi.Utils.typeMap(_merkleProof, Bytes32.class))), Collections.>emptyList()); - - return new RemoteFunctionCall(function, () -> this.send(this.contractAddress, ZkFunctionEncoder.encode(function), BigInteger.ZERO, this.gasProvider.getGasPrice(FUNC_FINALIZEWITHDRAWAL), this.gasProvider.getGasLimit(FUNC_FINALIZEWITHDRAWAL), false)); + return executeRemoteCallTransaction(function); } public RemoteFunctionCall isWithdrawalFinalizedShared(BigInteger _chainId, BigInteger _l2BatchNumber, BigInteger _l2MessageIndex) { diff --git a/src/main/java/io/zksync/wrappers/IL1SharedBridge.java b/src/main/java/io/zksync/wrappers/IL1SharedBridge.java index d8e835d..838befb 100644 --- a/src/main/java/io/zksync/wrappers/IL1SharedBridge.java +++ b/src/main/java/io/zksync/wrappers/IL1SharedBridge.java @@ -44,7 +44,9 @@ public class IL1SharedBridge extends Contract { public static final String BINARY = "Bin file was not provided"; - public static final String FUNC_BRIDGEHUB = "bridgehub"; + public static final String FUNC_BRIDGE_HUB = "BRIDGE_HUB"; + + public static final String FUNC_L1_WETH_TOKEN = "L1_WETH_TOKEN"; public static final String FUNC_BRIDGEHUBCONFIRML2TRANSACTION = "bridgehubConfirmL2Transaction"; @@ -66,15 +68,17 @@ public class IL1SharedBridge extends Contract { public static final String FUNC_ISWITHDRAWALFINALIZED = "isWithdrawalFinalized"; - public static final String FUNC_L1WETHADDRESS = "l1WethAddress"; - public static final String FUNC_L2BRIDGEADDRESS = "l2BridgeAddress"; public static final String FUNC_LEGACYBRIDGE = "legacyBridge"; public static final String FUNC_RECEIVEETH = "receiveEth"; - public static final String FUNC_SETERAFIRSTPOSTUPGRADEBATCH = "setEraFirstPostUpgradeBatch"; + public static final String FUNC_SETERALEGACYBRIDGELASTDEPOSITTIME = "setEraLegacyBridgeLastDepositTime"; + + public static final String FUNC_SETERAPOSTDIAMONDUPGRADEFIRSTBATCH = "setEraPostDiamondUpgradeFirstBatch"; + + public static final String FUNC_SETERAPOSTLEGACYBRIDGEUPGRADEFIRSTBATCH = "setEraPostLegacyBridgeUpgradeFirstBatch"; public static final Event BRIDGEHUBDEPOSITBASETOKENINITIATED_EVENT = new Event("BridgehubDepositBaseTokenInitiated", Arrays.>asList(new TypeReference(true) {}, new TypeReference
(true) {}, new TypeReference
() {}, new TypeReference() {})); @@ -340,8 +344,15 @@ public Flowable withdrawalFinalize return withdrawalFinalizedSharedBridgeEventFlowable(filter); } - public RemoteFunctionCall bridgehub() { - final Function function = new Function(FUNC_BRIDGEHUB, + public RemoteFunctionCall BRIDGE_HUB() { + final Function function = new Function(FUNC_BRIDGE_HUB, + Arrays.asList(), + Arrays.>asList(new TypeReference
() {})); + return executeRemoteCallSingleValueReturn(function, String.class); + } + + public RemoteFunctionCall L1_WETH_TOKEN() { + final Function function = new Function(FUNC_L1_WETH_TOKEN, Arrays.asList(), Arrays.>asList(new TypeReference
() {})); return executeRemoteCallSingleValueReturn(function, String.class); @@ -474,13 +485,6 @@ public RemoteFunctionCall isWithdrawalFinalized(BigInteger _chainId, Bi return executeRemoteCallSingleValueReturn(function, Boolean.class); } - public RemoteFunctionCall l1WethAddress() { - final Function function = new Function(FUNC_L1WETHADDRESS, - Arrays.asList(), - Arrays.>asList(new TypeReference
() {})); - return executeRemoteCallSingleValueReturn(function, String.class); - } - public RemoteFunctionCall l2BridgeAddress(BigInteger _chainId) { final Function function = new Function(FUNC_L2BRIDGEADDRESS, Arrays.asList(new Uint256(_chainId)), @@ -503,10 +507,27 @@ public RemoteFunctionCall receiveEth(BigInteger _chainId, Bi return executeRemoteCallTransaction(function, weiValue); } - public RemoteFunctionCall setEraFirstPostUpgradeBatch(BigInteger _eraFirstPostUpgradeBatch) { + public RemoteFunctionCall setEraLegacyBridgeLastDepositTime(BigInteger _eraLegacyBridgeLastDepositBatch, BigInteger _eraLegacyBridgeLastDepositTxNumber) { + final Function function = new Function( + FUNC_SETERALEGACYBRIDGELASTDEPOSITTIME, + Arrays.asList(new Uint256(_eraLegacyBridgeLastDepositBatch), + new Uint256(_eraLegacyBridgeLastDepositTxNumber)), + Collections.>emptyList()); + return executeRemoteCallTransaction(function); + } + + public RemoteFunctionCall setEraPostDiamondUpgradeFirstBatch(BigInteger _eraPostDiamondUpgradeFirstBatch) { + final Function function = new Function( + FUNC_SETERAPOSTDIAMONDUPGRADEFIRSTBATCH, + Arrays.asList(new Uint256(_eraPostDiamondUpgradeFirstBatch)), + Collections.>emptyList()); + return executeRemoteCallTransaction(function); + } + + public RemoteFunctionCall setEraPostLegacyBridgeUpgradeFirstBatch(BigInteger _eraPostLegacyBridgeUpgradeFirstBatch) { final Function function = new Function( - FUNC_SETERAFIRSTPOSTUPGRADEBATCH, - Arrays.asList(new Uint256(_eraFirstPostUpgradeBatch)), + FUNC_SETERAPOSTLEGACYBRIDGEUPGRADEFIRSTBATCH, + Arrays.asList(new Uint256(_eraPostLegacyBridgeUpgradeFirstBatch)), Collections.>emptyList()); return executeRemoteCallTransaction(function); } diff --git a/src/main/java/io/zksync/wrappers/IL2Bridge.java b/src/main/java/io/zksync/wrappers/IL2Bridge.java index 8055cd4..4b0e8a6 100644 --- a/src/main/java/io/zksync/wrappers/IL2Bridge.java +++ b/src/main/java/io/zksync/wrappers/IL2Bridge.java @@ -56,7 +56,7 @@ protected IL2Bridge(String contractAddress, Web3j web3j, TransactionManager tran super(BINARY, contractAddress, web3j, transactionManager, contractGasProvider); } - public RemoteFunctionCall finalizeDeposit(String _l1Sender, String _l2Receiver, String _l1Token, BigInteger _amount, byte[] _data, BigInteger weiValue) { + public RemoteFunctionCall finalizeDeposit(String _l1Sender, String _l2Receiver, String _l1Token, BigInteger _amount, byte[] _data) { final Function function = new Function( FUNC_FINALIZEDEPOSIT, Arrays.asList(new Address(160, _l1Sender), @@ -65,7 +65,7 @@ public RemoteFunctionCall finalizeDeposit(String _l1Sender, new org.web3j.abi.datatypes.generated.Uint256(_amount), new org.web3j.abi.datatypes.DynamicBytes(_data)), Collections.>emptyList()); - return executeRemoteCallTransaction(function, weiValue); + return executeRemoteCallTransaction(function); } public RemoteFunctionCall l1Bridge() { diff --git a/src/main/java/io/zksync/wrappers/IZkSyncHyperchain.java b/src/main/java/io/zksync/wrappers/IZkSyncHyperchain.java index d8d2406..3bfa07e 100644 --- a/src/main/java/io/zksync/wrappers/IZkSyncHyperchain.java +++ b/src/main/java/io/zksync/wrappers/IZkSyncHyperchain.java @@ -281,9 +281,9 @@ protected IZkSyncHyperchain(String contractAddress, Web3j web3j, TransactionMana } public static List getBlockCommitEvents(TransactionReceipt transactionReceipt) { - List valueList = staticExtractEventParametersWithLog(BLOCKCOMMIT_EVENT, transactionReceipt); + List valueList = staticExtractEventParametersWithLog(BLOCKCOMMIT_EVENT, transactionReceipt); ArrayList responses = new ArrayList(valueList.size()); - for (Contract.EventValuesWithLog eventValues : valueList) { + for (EventValuesWithLog eventValues : valueList) { BlockCommitEventResponse typedResponse = new BlockCommitEventResponse(); typedResponse.log = eventValues.getLog(); typedResponse.batchNumber = (BigInteger) eventValues.getIndexedValues().get(0).getValue(); @@ -295,7 +295,7 @@ public static List getBlockCommitEvents(TransactionRec } public static BlockCommitEventResponse getBlockCommitEventFromLog(Log log) { - Contract.EventValuesWithLog eventValues = staticExtractEventParametersWithLog(BLOCKCOMMIT_EVENT, log); + EventValuesWithLog eventValues = staticExtractEventParametersWithLog(BLOCKCOMMIT_EVENT, log); BlockCommitEventResponse typedResponse = new BlockCommitEventResponse(); typedResponse.log = log; typedResponse.batchNumber = (BigInteger) eventValues.getIndexedValues().get(0).getValue(); @@ -315,9 +315,9 @@ public Flowable blockCommitEventFlowable(DefaultBlockP } public static List getBlockExecutionEvents(TransactionReceipt transactionReceipt) { - List valueList = staticExtractEventParametersWithLog(BLOCKEXECUTION_EVENT, transactionReceipt); + List valueList = staticExtractEventParametersWithLog(BLOCKEXECUTION_EVENT, transactionReceipt); ArrayList responses = new ArrayList(valueList.size()); - for (Contract.EventValuesWithLog eventValues : valueList) { + for (EventValuesWithLog eventValues : valueList) { BlockExecutionEventResponse typedResponse = new BlockExecutionEventResponse(); typedResponse.log = eventValues.getLog(); typedResponse.batchNumber = (BigInteger) eventValues.getIndexedValues().get(0).getValue(); @@ -329,7 +329,7 @@ public static List getBlockExecutionEvents(Transact } public static BlockExecutionEventResponse getBlockExecutionEventFromLog(Log log) { - Contract.EventValuesWithLog eventValues = staticExtractEventParametersWithLog(BLOCKEXECUTION_EVENT, log); + EventValuesWithLog eventValues = staticExtractEventParametersWithLog(BLOCKEXECUTION_EVENT, log); BlockExecutionEventResponse typedResponse = new BlockExecutionEventResponse(); typedResponse.log = log; typedResponse.batchNumber = (BigInteger) eventValues.getIndexedValues().get(0).getValue(); @@ -349,9 +349,9 @@ public Flowable blockExecutionEventFlowable(Default } public static List getBlocksRevertEvents(TransactionReceipt transactionReceipt) { - List valueList = staticExtractEventParametersWithLog(BLOCKSREVERT_EVENT, transactionReceipt); + List valueList = staticExtractEventParametersWithLog(BLOCKSREVERT_EVENT, transactionReceipt); ArrayList responses = new ArrayList(valueList.size()); - for (Contract.EventValuesWithLog eventValues : valueList) { + for (EventValuesWithLog eventValues : valueList) { BlocksRevertEventResponse typedResponse = new BlocksRevertEventResponse(); typedResponse.log = eventValues.getLog(); typedResponse.totalBatchesCommitted = (BigInteger) eventValues.getNonIndexedValues().get(0).getValue(); @@ -363,7 +363,7 @@ public static List getBlocksRevertEvents(TransactionR } public static BlocksRevertEventResponse getBlocksRevertEventFromLog(Log log) { - Contract.EventValuesWithLog eventValues = staticExtractEventParametersWithLog(BLOCKSREVERT_EVENT, log); + EventValuesWithLog eventValues = staticExtractEventParametersWithLog(BLOCKSREVERT_EVENT, log); BlocksRevertEventResponse typedResponse = new BlocksRevertEventResponse(); typedResponse.log = log; typedResponse.totalBatchesCommitted = (BigInteger) eventValues.getNonIndexedValues().get(0).getValue(); @@ -383,9 +383,9 @@ public Flowable blocksRevertEventFlowable(DefaultBloc } public static List getBlocksVerificationEvents(TransactionReceipt transactionReceipt) { - List valueList = staticExtractEventParametersWithLog(BLOCKSVERIFICATION_EVENT, transactionReceipt); + List valueList = staticExtractEventParametersWithLog(BLOCKSVERIFICATION_EVENT, transactionReceipt); ArrayList responses = new ArrayList(valueList.size()); - for (Contract.EventValuesWithLog eventValues : valueList) { + for (EventValuesWithLog eventValues : valueList) { BlocksVerificationEventResponse typedResponse = new BlocksVerificationEventResponse(); typedResponse.log = eventValues.getLog(); typedResponse.previousLastVerifiedBatch = (BigInteger) eventValues.getIndexedValues().get(0).getValue(); @@ -396,7 +396,7 @@ public static List getBlocksVerificationEvents( } public static BlocksVerificationEventResponse getBlocksVerificationEventFromLog(Log log) { - Contract.EventValuesWithLog eventValues = staticExtractEventParametersWithLog(BLOCKSVERIFICATION_EVENT, log); + EventValuesWithLog eventValues = staticExtractEventParametersWithLog(BLOCKSVERIFICATION_EVENT, log); BlocksVerificationEventResponse typedResponse = new BlocksVerificationEventResponse(); typedResponse.log = log; typedResponse.previousLastVerifiedBatch = (BigInteger) eventValues.getIndexedValues().get(0).getValue(); @@ -415,9 +415,9 @@ public Flowable blocksVerificationEventFlowable } public static List getExecuteUpgradeEvents(TransactionReceipt transactionReceipt) { - List valueList = staticExtractEventParametersWithLog(EXECUTEUPGRADE_EVENT, transactionReceipt); + List valueList = staticExtractEventParametersWithLog(EXECUTEUPGRADE_EVENT, transactionReceipt); ArrayList responses = new ArrayList(valueList.size()); - for (Contract.EventValuesWithLog eventValues : valueList) { + for (EventValuesWithLog eventValues : valueList) { ExecuteUpgradeEventResponse typedResponse = new ExecuteUpgradeEventResponse(); typedResponse.log = eventValues.getLog(); typedResponse.diamondCut = (DiamondCutData) eventValues.getNonIndexedValues().get(0); @@ -427,7 +427,7 @@ public static List getExecuteUpgradeEvents(Transact } public static ExecuteUpgradeEventResponse getExecuteUpgradeEventFromLog(Log log) { - Contract.EventValuesWithLog eventValues = staticExtractEventParametersWithLog(EXECUTEUPGRADE_EVENT, log); + EventValuesWithLog eventValues = staticExtractEventParametersWithLog(EXECUTEUPGRADE_EVENT, log); ExecuteUpgradeEventResponse typedResponse = new ExecuteUpgradeEventResponse(); typedResponse.log = log; typedResponse.diamondCut = (DiamondCutData) eventValues.getNonIndexedValues().get(0); @@ -445,9 +445,9 @@ public Flowable executeUpgradeEventFlowable(Default } public static List getFreezeEvents(TransactionReceipt transactionReceipt) { - List valueList = staticExtractEventParametersWithLog(FREEZE_EVENT, transactionReceipt); + List valueList = staticExtractEventParametersWithLog(FREEZE_EVENT, transactionReceipt); ArrayList responses = new ArrayList(valueList.size()); - for (Contract.EventValuesWithLog eventValues : valueList) { + for (EventValuesWithLog eventValues : valueList) { FreezeEventResponse typedResponse = new FreezeEventResponse(); typedResponse.log = eventValues.getLog(); responses.add(typedResponse); @@ -456,7 +456,7 @@ public static List getFreezeEvents(TransactionReceipt trans } public static FreezeEventResponse getFreezeEventFromLog(Log log) { - Contract.EventValuesWithLog eventValues = staticExtractEventParametersWithLog(FREEZE_EVENT, log); + EventValuesWithLog eventValues = staticExtractEventParametersWithLog(FREEZE_EVENT, log); FreezeEventResponse typedResponse = new FreezeEventResponse(); typedResponse.log = log; return typedResponse; @@ -473,9 +473,9 @@ public Flowable freezeEventFlowable(DefaultBlockParameter s } public static List getIsPorterAvailableStatusUpdateEvents(TransactionReceipt transactionReceipt) { - List valueList = staticExtractEventParametersWithLog(ISPORTERAVAILABLESTATUSUPDATE_EVENT, transactionReceipt); + List valueList = staticExtractEventParametersWithLog(ISPORTERAVAILABLESTATUSUPDATE_EVENT, transactionReceipt); ArrayList responses = new ArrayList(valueList.size()); - for (Contract.EventValuesWithLog eventValues : valueList) { + for (EventValuesWithLog eventValues : valueList) { IsPorterAvailableStatusUpdateEventResponse typedResponse = new IsPorterAvailableStatusUpdateEventResponse(); typedResponse.log = eventValues.getLog(); typedResponse.isPorterAvailable = (Boolean) eventValues.getNonIndexedValues().get(0).getValue(); @@ -485,7 +485,7 @@ public static List getIsPorterAvaila } public static IsPorterAvailableStatusUpdateEventResponse getIsPorterAvailableStatusUpdateEventFromLog(Log log) { - Contract.EventValuesWithLog eventValues = staticExtractEventParametersWithLog(ISPORTERAVAILABLESTATUSUPDATE_EVENT, log); + EventValuesWithLog eventValues = staticExtractEventParametersWithLog(ISPORTERAVAILABLESTATUSUPDATE_EVENT, log); IsPorterAvailableStatusUpdateEventResponse typedResponse = new IsPorterAvailableStatusUpdateEventResponse(); typedResponse.log = log; typedResponse.isPorterAvailable = (Boolean) eventValues.getNonIndexedValues().get(0).getValue(); @@ -503,9 +503,9 @@ public Flowable isPorterAvailableSta } public static List getNewAdminEvents(TransactionReceipt transactionReceipt) { - List valueList = staticExtractEventParametersWithLog(NEWADMIN_EVENT, transactionReceipt); + List valueList = staticExtractEventParametersWithLog(NEWADMIN_EVENT, transactionReceipt); ArrayList responses = new ArrayList(valueList.size()); - for (Contract.EventValuesWithLog eventValues : valueList) { + for (EventValuesWithLog eventValues : valueList) { NewAdminEventResponse typedResponse = new NewAdminEventResponse(); typedResponse.log = eventValues.getLog(); typedResponse.oldAdmin = (String) eventValues.getIndexedValues().get(0).getValue(); @@ -516,7 +516,7 @@ public static List getNewAdminEvents(TransactionReceipt t } public static NewAdminEventResponse getNewAdminEventFromLog(Log log) { - Contract.EventValuesWithLog eventValues = staticExtractEventParametersWithLog(NEWADMIN_EVENT, log); + EventValuesWithLog eventValues = staticExtractEventParametersWithLog(NEWADMIN_EVENT, log); NewAdminEventResponse typedResponse = new NewAdminEventResponse(); typedResponse.log = log; typedResponse.oldAdmin = (String) eventValues.getIndexedValues().get(0).getValue(); @@ -535,9 +535,9 @@ public Flowable newAdminEventFlowable(DefaultBlockParamet } public static List getNewBaseTokenMultiplierEvents(TransactionReceipt transactionReceipt) { - List valueList = staticExtractEventParametersWithLog(NEWBASETOKENMULTIPLIER_EVENT, transactionReceipt); + List valueList = staticExtractEventParametersWithLog(NEWBASETOKENMULTIPLIER_EVENT, transactionReceipt); ArrayList responses = new ArrayList(valueList.size()); - for (Contract.EventValuesWithLog eventValues : valueList) { + for (EventValuesWithLog eventValues : valueList) { NewBaseTokenMultiplierEventResponse typedResponse = new NewBaseTokenMultiplierEventResponse(); typedResponse.log = eventValues.getLog(); typedResponse.oldNominator = (BigInteger) eventValues.getNonIndexedValues().get(0).getValue(); @@ -550,7 +550,7 @@ public static List getNewBaseTokenMultiplie } public static NewBaseTokenMultiplierEventResponse getNewBaseTokenMultiplierEventFromLog(Log log) { - Contract.EventValuesWithLog eventValues = staticExtractEventParametersWithLog(NEWBASETOKENMULTIPLIER_EVENT, log); + EventValuesWithLog eventValues = staticExtractEventParametersWithLog(NEWBASETOKENMULTIPLIER_EVENT, log); NewBaseTokenMultiplierEventResponse typedResponse = new NewBaseTokenMultiplierEventResponse(); typedResponse.log = log; typedResponse.oldNominator = (BigInteger) eventValues.getNonIndexedValues().get(0).getValue(); @@ -571,9 +571,9 @@ public Flowable newBaseTokenMultiplierEvent } public static List getNewFeeParamsEvents(TransactionReceipt transactionReceipt) { - List valueList = staticExtractEventParametersWithLog(NEWFEEPARAMS_EVENT, transactionReceipt); + List valueList = staticExtractEventParametersWithLog(NEWFEEPARAMS_EVENT, transactionReceipt); ArrayList responses = new ArrayList(valueList.size()); - for (Contract.EventValuesWithLog eventValues : valueList) { + for (EventValuesWithLog eventValues : valueList) { NewFeeParamsEventResponse typedResponse = new NewFeeParamsEventResponse(); typedResponse.log = eventValues.getLog(); typedResponse.oldFeeParams = (FeeParams) eventValues.getNonIndexedValues().get(0); @@ -584,7 +584,7 @@ public static List getNewFeeParamsEvents(TransactionR } public static NewFeeParamsEventResponse getNewFeeParamsEventFromLog(Log log) { - Contract.EventValuesWithLog eventValues = staticExtractEventParametersWithLog(NEWFEEPARAMS_EVENT, log); + EventValuesWithLog eventValues = staticExtractEventParametersWithLog(NEWFEEPARAMS_EVENT, log); NewFeeParamsEventResponse typedResponse = new NewFeeParamsEventResponse(); typedResponse.log = log; typedResponse.oldFeeParams = (FeeParams) eventValues.getNonIndexedValues().get(0); @@ -603,9 +603,9 @@ public Flowable newFeeParamsEventFlowable(DefaultBloc } public static List getNewPendingAdminEvents(TransactionReceipt transactionReceipt) { - List valueList = staticExtractEventParametersWithLog(NEWPENDINGADMIN_EVENT, transactionReceipt); + List valueList = staticExtractEventParametersWithLog(NEWPENDINGADMIN_EVENT, transactionReceipt); ArrayList responses = new ArrayList(valueList.size()); - for (Contract.EventValuesWithLog eventValues : valueList) { + for (EventValuesWithLog eventValues : valueList) { NewPendingAdminEventResponse typedResponse = new NewPendingAdminEventResponse(); typedResponse.log = eventValues.getLog(); typedResponse.oldPendingAdmin = (String) eventValues.getIndexedValues().get(0).getValue(); @@ -616,7 +616,7 @@ public static List getNewPendingAdminEvents(Transa } public static NewPendingAdminEventResponse getNewPendingAdminEventFromLog(Log log) { - Contract.EventValuesWithLog eventValues = staticExtractEventParametersWithLog(NEWPENDINGADMIN_EVENT, log); + EventValuesWithLog eventValues = staticExtractEventParametersWithLog(NEWPENDINGADMIN_EVENT, log); NewPendingAdminEventResponse typedResponse = new NewPendingAdminEventResponse(); typedResponse.log = log; typedResponse.oldPendingAdmin = (String) eventValues.getIndexedValues().get(0).getValue(); @@ -635,9 +635,9 @@ public Flowable newPendingAdminEventFlowable(Defau } public static List getNewPriorityRequestEvents(TransactionReceipt transactionReceipt) { - List valueList = staticExtractEventParametersWithLog(NEWPRIORITYREQUEST_EVENT, transactionReceipt); + List valueList = staticExtractEventParametersWithLog(NEWPRIORITYREQUEST_EVENT, transactionReceipt); ArrayList responses = new ArrayList(valueList.size()); - for (Contract.EventValuesWithLog eventValues : valueList) { + for (EventValuesWithLog eventValues : valueList) { NewPriorityRequestEventResponse typedResponse = new NewPriorityRequestEventResponse(); typedResponse.log = eventValues.getLog(); typedResponse.txId = (BigInteger) eventValues.getNonIndexedValues().get(0).getValue(); @@ -651,7 +651,7 @@ public static List getNewPriorityRequestEvents( } public static NewPriorityRequestEventResponse getNewPriorityRequestEventFromLog(Log log) { - Contract.EventValuesWithLog eventValues = staticExtractEventParametersWithLog(NEWPRIORITYREQUEST_EVENT, log); + EventValuesWithLog eventValues = staticExtractEventParametersWithLog(NEWPRIORITYREQUEST_EVENT, log); NewPriorityRequestEventResponse typedResponse = new NewPriorityRequestEventResponse(); typedResponse.log = log; typedResponse.txId = (BigInteger) eventValues.getNonIndexedValues().get(0).getValue(); @@ -673,9 +673,9 @@ public Flowable newPriorityRequestEventFlowable } public static List getNewPriorityTxMaxGasLimitEvents(TransactionReceipt transactionReceipt) { - List valueList = staticExtractEventParametersWithLog(NEWPRIORITYTXMAXGASLIMIT_EVENT, transactionReceipt); + List valueList = staticExtractEventParametersWithLog(NEWPRIORITYTXMAXGASLIMIT_EVENT, transactionReceipt); ArrayList responses = new ArrayList(valueList.size()); - for (Contract.EventValuesWithLog eventValues : valueList) { + for (EventValuesWithLog eventValues : valueList) { NewPriorityTxMaxGasLimitEventResponse typedResponse = new NewPriorityTxMaxGasLimitEventResponse(); typedResponse.log = eventValues.getLog(); typedResponse.oldPriorityTxMaxGasLimit = (BigInteger) eventValues.getNonIndexedValues().get(0).getValue(); @@ -686,7 +686,7 @@ public static List getNewPriorityTxMaxGas } public static NewPriorityTxMaxGasLimitEventResponse getNewPriorityTxMaxGasLimitEventFromLog(Log log) { - Contract.EventValuesWithLog eventValues = staticExtractEventParametersWithLog(NEWPRIORITYTXMAXGASLIMIT_EVENT, log); + EventValuesWithLog eventValues = staticExtractEventParametersWithLog(NEWPRIORITYTXMAXGASLIMIT_EVENT, log); NewPriorityTxMaxGasLimitEventResponse typedResponse = new NewPriorityTxMaxGasLimitEventResponse(); typedResponse.log = log; typedResponse.oldPriorityTxMaxGasLimit = (BigInteger) eventValues.getNonIndexedValues().get(0).getValue(); @@ -705,9 +705,9 @@ public Flowable newPriorityTxMaxGasLimitE } public static List getNewTransactionFiltererEvents(TransactionReceipt transactionReceipt) { - List valueList = staticExtractEventParametersWithLog(NEWTRANSACTIONFILTERER_EVENT, transactionReceipt); + List valueList = staticExtractEventParametersWithLog(NEWTRANSACTIONFILTERER_EVENT, transactionReceipt); ArrayList responses = new ArrayList(valueList.size()); - for (Contract.EventValuesWithLog eventValues : valueList) { + for (EventValuesWithLog eventValues : valueList) { NewTransactionFiltererEventResponse typedResponse = new NewTransactionFiltererEventResponse(); typedResponse.log = eventValues.getLog(); typedResponse.oldTransactionFilterer = (String) eventValues.getNonIndexedValues().get(0).getValue(); @@ -718,7 +718,7 @@ public static List getNewTransactionFiltere } public static NewTransactionFiltererEventResponse getNewTransactionFiltererEventFromLog(Log log) { - Contract.EventValuesWithLog eventValues = staticExtractEventParametersWithLog(NEWTRANSACTIONFILTERER_EVENT, log); + EventValuesWithLog eventValues = staticExtractEventParametersWithLog(NEWTRANSACTIONFILTERER_EVENT, log); NewTransactionFiltererEventResponse typedResponse = new NewTransactionFiltererEventResponse(); typedResponse.log = log; typedResponse.oldTransactionFilterer = (String) eventValues.getNonIndexedValues().get(0).getValue(); @@ -737,9 +737,9 @@ public Flowable newTransactionFiltererEvent } public static List getProposeTransparentUpgradeEvents(TransactionReceipt transactionReceipt) { - List valueList = staticExtractEventParametersWithLog(PROPOSETRANSPARENTUPGRADE_EVENT, transactionReceipt); + List valueList = staticExtractEventParametersWithLog(PROPOSETRANSPARENTUPGRADE_EVENT, transactionReceipt); ArrayList responses = new ArrayList(valueList.size()); - for (Contract.EventValuesWithLog eventValues : valueList) { + for (EventValuesWithLog eventValues : valueList) { ProposeTransparentUpgradeEventResponse typedResponse = new ProposeTransparentUpgradeEventResponse(); typedResponse.log = eventValues.getLog(); typedResponse.proposalId = (BigInteger) eventValues.getIndexedValues().get(0).getValue(); @@ -751,7 +751,7 @@ public static List getProposeTransparent } public static ProposeTransparentUpgradeEventResponse getProposeTransparentUpgradeEventFromLog(Log log) { - Contract.EventValuesWithLog eventValues = staticExtractEventParametersWithLog(PROPOSETRANSPARENTUPGRADE_EVENT, log); + EventValuesWithLog eventValues = staticExtractEventParametersWithLog(PROPOSETRANSPARENTUPGRADE_EVENT, log); ProposeTransparentUpgradeEventResponse typedResponse = new ProposeTransparentUpgradeEventResponse(); typedResponse.log = log; typedResponse.proposalId = (BigInteger) eventValues.getIndexedValues().get(0).getValue(); @@ -771,9 +771,9 @@ public Flowable proposeTransparentUpgrad } public static List getUnfreezeEvents(TransactionReceipt transactionReceipt) { - List valueList = staticExtractEventParametersWithLog(UNFREEZE_EVENT, transactionReceipt); + List valueList = staticExtractEventParametersWithLog(UNFREEZE_EVENT, transactionReceipt); ArrayList responses = new ArrayList(valueList.size()); - for (Contract.EventValuesWithLog eventValues : valueList) { + for (EventValuesWithLog eventValues : valueList) { UnfreezeEventResponse typedResponse = new UnfreezeEventResponse(); typedResponse.log = eventValues.getLog(); responses.add(typedResponse); @@ -782,7 +782,7 @@ public static List getUnfreezeEvents(TransactionReceipt t } public static UnfreezeEventResponse getUnfreezeEventFromLog(Log log) { - Contract.EventValuesWithLog eventValues = staticExtractEventParametersWithLog(UNFREEZE_EVENT, log); + EventValuesWithLog eventValues = staticExtractEventParametersWithLog(UNFREEZE_EVENT, log); UnfreezeEventResponse typedResponse = new UnfreezeEventResponse(); typedResponse.log = log; return typedResponse; @@ -799,9 +799,9 @@ public Flowable unfreezeEventFlowable(DefaultBlockParamet } public static List getValidatorStatusUpdateEvents(TransactionReceipt transactionReceipt) { - List valueList = staticExtractEventParametersWithLog(VALIDATORSTATUSUPDATE_EVENT, transactionReceipt); + List valueList = staticExtractEventParametersWithLog(VALIDATORSTATUSUPDATE_EVENT, transactionReceipt); ArrayList responses = new ArrayList(valueList.size()); - for (Contract.EventValuesWithLog eventValues : valueList) { + for (EventValuesWithLog eventValues : valueList) { ValidatorStatusUpdateEventResponse typedResponse = new ValidatorStatusUpdateEventResponse(); typedResponse.log = eventValues.getLog(); typedResponse.validatorAddress = (String) eventValues.getIndexedValues().get(0).getValue(); @@ -812,7 +812,7 @@ public static List getValidatorStatusUpdateE } public static ValidatorStatusUpdateEventResponse getValidatorStatusUpdateEventFromLog(Log log) { - Contract.EventValuesWithLog eventValues = staticExtractEventParametersWithLog(VALIDATORSTATUSUPDATE_EVENT, log); + EventValuesWithLog eventValues = staticExtractEventParametersWithLog(VALIDATORSTATUSUPDATE_EVENT, log); ValidatorStatusUpdateEventResponse typedResponse = new ValidatorStatusUpdateEventResponse(); typedResponse.log = log; typedResponse.validatorAddress = (String) eventValues.getIndexedValues().get(0).getValue(); @@ -831,9 +831,9 @@ public Flowable validatorStatusUpdateEventFl } public static List getValidiumModeStatusUpdateEvents(TransactionReceipt transactionReceipt) { - List valueList = staticExtractEventParametersWithLog(VALIDIUMMODESTATUSUPDATE_EVENT, transactionReceipt); + List valueList = staticExtractEventParametersWithLog(VALIDIUMMODESTATUSUPDATE_EVENT, transactionReceipt); ArrayList responses = new ArrayList(valueList.size()); - for (Contract.EventValuesWithLog eventValues : valueList) { + for (EventValuesWithLog eventValues : valueList) { ValidiumModeStatusUpdateEventResponse typedResponse = new ValidiumModeStatusUpdateEventResponse(); typedResponse.log = eventValues.getLog(); typedResponse.validiumMode = (BigInteger) eventValues.getNonIndexedValues().get(0).getValue(); @@ -843,7 +843,7 @@ public static List getValidiumModeStatusU } public static ValidiumModeStatusUpdateEventResponse getValidiumModeStatusUpdateEventFromLog(Log log) { - Contract.EventValuesWithLog eventValues = staticExtractEventParametersWithLog(VALIDIUMMODESTATUSUPDATE_EVENT, log); + EventValuesWithLog eventValues = staticExtractEventParametersWithLog(VALIDIUMMODESTATUSUPDATE_EVENT, log); ValidiumModeStatusUpdateEventResponse typedResponse = new ValidiumModeStatusUpdateEventResponse(); typedResponse.log = log; typedResponse.validiumMode = (BigInteger) eventValues.getNonIndexedValues().get(0).getValue(); @@ -902,7 +902,7 @@ public RemoteFunctionCall commitBatches(StoredBatchInfo _las final Function function = new Function( FUNC_COMMITBATCHES, Arrays.asList(_lastCommittedBatchData, - new org.web3j.abi.datatypes.DynamicArray(CommitBatchInfo.class, _newBatchesData)), + new DynamicArray(CommitBatchInfo.class, _newBatchesData)), Collections.>emptyList()); return executeRemoteCallTransaction(function); } @@ -910,9 +910,9 @@ public RemoteFunctionCall commitBatches(StoredBatchInfo _las public RemoteFunctionCall commitBatchesSharedBridge(BigInteger _chainId, StoredBatchInfo _lastCommittedBatchData, List _newBatchesData) { final Function function = new Function( FUNC_COMMITBATCHESSHAREDBRIDGE, - Arrays.asList(new org.web3j.abi.datatypes.generated.Uint256(_chainId), + Arrays.asList(new Uint256(_chainId), _lastCommittedBatchData, - new org.web3j.abi.datatypes.DynamicArray(CommitBatchInfo.class, _newBatchesData)), + new DynamicArray(CommitBatchInfo.class, _newBatchesData)), Collections.>emptyList()); return executeRemoteCallTransaction(function); } @@ -920,7 +920,7 @@ public RemoteFunctionCall commitBatchesSharedBridge(BigInteg public RemoteFunctionCall executeBatches(List _batchesData) { final Function function = new Function( FUNC_EXECUTEBATCHES, - Arrays.asList(new org.web3j.abi.datatypes.DynamicArray(StoredBatchInfo.class, _batchesData)), + Arrays.asList(new DynamicArray(StoredBatchInfo.class, _batchesData)), Collections.>emptyList()); return executeRemoteCallTransaction(function); } @@ -928,8 +928,8 @@ public RemoteFunctionCall executeBatches(List executeBatchesSharedBridge(BigInteger _chainId, List _batchesData) { final Function function = new Function( FUNC_EXECUTEBATCHESSHAREDBRIDGE, - Arrays.asList(new org.web3j.abi.datatypes.generated.Uint256(_chainId), - new org.web3j.abi.datatypes.DynamicArray(StoredBatchInfo.class, _batchesData)), + Arrays.asList(new Uint256(_chainId), + new DynamicArray(StoredBatchInfo.class, _batchesData)), Collections.>emptyList()); return executeRemoteCallTransaction(function); } @@ -944,7 +944,7 @@ public RemoteFunctionCall executeUpgrade(DiamondCutData _dia public RemoteFunctionCall facetAddress(byte[] _selector) { final Function function = new Function(FUNC_FACETADDRESS, - Arrays.asList(new org.web3j.abi.datatypes.generated.Bytes4(_selector)), + Arrays.asList(new Bytes4(_selector)), Arrays.>asList(new TypeReference
() {})); return executeRemoteCallSingleValueReturn(function, String.class); } @@ -966,7 +966,7 @@ public List call() throws Exception { public RemoteFunctionCall facetFunctionSelectors(String _facet) { final Function function = new Function(FUNC_FACETFUNCTIONSELECTORS, - Arrays.asList(new org.web3j.abi.datatypes.Address(160, _facet)), + Arrays.asList(new Address(160, _facet)), Arrays.>asList(new TypeReference>() {})); return new RemoteFunctionCall(function, new Callable() { @@ -997,13 +997,13 @@ public List call() throws Exception { public RemoteFunctionCall finalizeEthWithdrawal(BigInteger _l2BatchNumber, BigInteger _l2MessageIndex, BigInteger _l2TxNumberInBatch, byte[] _message, List _merkleProof) { final Function function = new Function( FUNC_FINALIZEETHWITHDRAWAL, - Arrays.asList(new org.web3j.abi.datatypes.generated.Uint256(_l2BatchNumber), - new org.web3j.abi.datatypes.generated.Uint256(_l2MessageIndex), - new org.web3j.abi.datatypes.generated.Uint16(_l2TxNumberInBatch), - new org.web3j.abi.datatypes.DynamicBytes(_message), - new org.web3j.abi.datatypes.DynamicArray( - org.web3j.abi.datatypes.generated.Bytes32.class, - org.web3j.abi.Utils.typeMap(_merkleProof, org.web3j.abi.datatypes.generated.Bytes32.class))), + Arrays.asList(new Uint256(_l2BatchNumber), + new Uint256(_l2MessageIndex), + new Uint16(_l2TxNumberInBatch), + new DynamicBytes(_message), + new DynamicArray( + Bytes32.class, + org.web3j.abi.Utils.typeMap(_merkleProof, Bytes32.class))), Collections.>emptyList()); return executeRemoteCallTransaction(function); } @@ -1196,45 +1196,45 @@ public RemoteFunctionCall isDiamondStorageFrozen() { public RemoteFunctionCall isEthWithdrawalFinalized(BigInteger _l2BatchNumber, BigInteger _l2MessageIndex) { final Function function = new Function(FUNC_ISETHWITHDRAWALFINALIZED, - Arrays.asList(new org.web3j.abi.datatypes.generated.Uint256(_l2BatchNumber), - new org.web3j.abi.datatypes.generated.Uint256(_l2MessageIndex)), + Arrays.asList(new Uint256(_l2BatchNumber), + new Uint256(_l2MessageIndex)), Arrays.>asList(new TypeReference() {})); return executeRemoteCallSingleValueReturn(function, Boolean.class); } public RemoteFunctionCall isFacetFreezable(String _facet) { final Function function = new Function(FUNC_ISFACETFREEZABLE, - Arrays.asList(new org.web3j.abi.datatypes.Address(160, _facet)), + Arrays.asList(new Address(160, _facet)), Arrays.>asList(new TypeReference() {})); return executeRemoteCallSingleValueReturn(function, Boolean.class); } public RemoteFunctionCall isFunctionFreezable(byte[] _selector) { final Function function = new Function(FUNC_ISFUNCTIONFREEZABLE, - Arrays.asList(new org.web3j.abi.datatypes.generated.Bytes4(_selector)), + Arrays.asList(new Bytes4(_selector)), Arrays.>asList(new TypeReference() {})); return executeRemoteCallSingleValueReturn(function, Boolean.class); } public RemoteFunctionCall isValidator(String _address) { final Function function = new Function(FUNC_ISVALIDATOR, - Arrays.asList(new org.web3j.abi.datatypes.Address(160, _address)), + Arrays.asList(new Address(160, _address)), Arrays.>asList(new TypeReference() {})); return executeRemoteCallSingleValueReturn(function, Boolean.class); } public RemoteFunctionCall l2LogsRootHash(BigInteger _batchNumber) { final Function function = new Function(FUNC_L2LOGSROOTHASH, - Arrays.asList(new org.web3j.abi.datatypes.generated.Uint256(_batchNumber)), + Arrays.asList(new Uint256(_batchNumber)), Arrays.>asList(new TypeReference() {})); return executeRemoteCallSingleValueReturn(function, byte[].class); } public RemoteFunctionCall l2TransactionBaseCost(BigInteger _gasPrice, BigInteger _l2GasLimit, BigInteger _l2GasPerPubdataByteLimit) { final Function function = new Function(FUNC_L2TRANSACTIONBASECOST, - Arrays.asList(new org.web3j.abi.datatypes.generated.Uint256(_gasPrice), - new org.web3j.abi.datatypes.generated.Uint256(_l2GasLimit), - new org.web3j.abi.datatypes.generated.Uint256(_l2GasPerPubdataByteLimit)), + Arrays.asList(new Uint256(_gasPrice), + new Uint256(_l2GasLimit), + new Uint256(_l2GasPerPubdataByteLimit)), Arrays.>asList(new TypeReference() {})); return executeRemoteCallSingleValueReturn(function, BigInteger.class); } @@ -1250,7 +1250,7 @@ public RemoteFunctionCall proveBatches(StoredBatchInfo _prev final Function function = new Function( FUNC_PROVEBATCHES, Arrays.asList(_prevBatch, - new org.web3j.abi.datatypes.DynamicArray(StoredBatchInfo.class, _committedBatches), + new DynamicArray(StoredBatchInfo.class, _committedBatches), _proof), Collections.>emptyList()); return executeRemoteCallTransaction(function); @@ -1259,9 +1259,9 @@ public RemoteFunctionCall proveBatches(StoredBatchInfo _prev public RemoteFunctionCall proveBatchesSharedBridge(BigInteger _chainId, StoredBatchInfo _prevBatch, List _committedBatches, ProofInput _proof) { final Function function = new Function( FUNC_PROVEBATCHESSHAREDBRIDGE, - Arrays.asList(new org.web3j.abi.datatypes.generated.Uint256(_chainId), + Arrays.asList(new Uint256(_chainId), _prevBatch, - new org.web3j.abi.datatypes.DynamicArray(StoredBatchInfo.class, _committedBatches), + new DynamicArray(StoredBatchInfo.class, _committedBatches), _proof), Collections.>emptyList()); return executeRemoteCallTransaction(function); @@ -1269,38 +1269,38 @@ public RemoteFunctionCall proveBatchesSharedBridge(BigIntege public RemoteFunctionCall proveL1ToL2TransactionStatus(byte[] _l2TxHash, BigInteger _l2BatchNumber, BigInteger _l2MessageIndex, BigInteger _l2TxNumberInBatch, List _merkleProof, BigInteger _status) { final Function function = new Function(FUNC_PROVEL1TOL2TRANSACTIONSTATUS, - Arrays.asList(new org.web3j.abi.datatypes.generated.Bytes32(_l2TxHash), - new org.web3j.abi.datatypes.generated.Uint256(_l2BatchNumber), - new org.web3j.abi.datatypes.generated.Uint256(_l2MessageIndex), - new org.web3j.abi.datatypes.generated.Uint16(_l2TxNumberInBatch), - new org.web3j.abi.datatypes.DynamicArray( - org.web3j.abi.datatypes.generated.Bytes32.class, - org.web3j.abi.Utils.typeMap(_merkleProof, org.web3j.abi.datatypes.generated.Bytes32.class)), - new org.web3j.abi.datatypes.generated.Uint8(_status)), + Arrays.asList(new Bytes32(_l2TxHash), + new Uint256(_l2BatchNumber), + new Uint256(_l2MessageIndex), + new Uint16(_l2TxNumberInBatch), + new DynamicArray( + Bytes32.class, + org.web3j.abi.Utils.typeMap(_merkleProof, Bytes32.class)), + new Uint8(_status)), Arrays.>asList(new TypeReference() {})); return executeRemoteCallSingleValueReturn(function, Boolean.class); } public RemoteFunctionCall proveL2LogInclusion(BigInteger _batchNumber, BigInteger _index, L2Log _log, List _proof) { final Function function = new Function(FUNC_PROVEL2LOGINCLUSION, - Arrays.asList(new org.web3j.abi.datatypes.generated.Uint256(_batchNumber), - new org.web3j.abi.datatypes.generated.Uint256(_index), + Arrays.asList(new Uint256(_batchNumber), + new Uint256(_index), _log, - new org.web3j.abi.datatypes.DynamicArray( - org.web3j.abi.datatypes.generated.Bytes32.class, - org.web3j.abi.Utils.typeMap(_proof, org.web3j.abi.datatypes.generated.Bytes32.class))), + new DynamicArray( + Bytes32.class, + org.web3j.abi.Utils.typeMap(_proof, Bytes32.class))), Arrays.>asList(new TypeReference() {})); return executeRemoteCallSingleValueReturn(function, Boolean.class); } public RemoteFunctionCall proveL2MessageInclusion(BigInteger _batchNumber, BigInteger _index, L2Message _message, List _proof) { final Function function = new Function(FUNC_PROVEL2MESSAGEINCLUSION, - Arrays.asList(new org.web3j.abi.datatypes.generated.Uint256(_batchNumber), - new org.web3j.abi.datatypes.generated.Uint256(_index), + Arrays.asList(new Uint256(_batchNumber), + new Uint256(_index), _message, - new org.web3j.abi.datatypes.DynamicArray( - org.web3j.abi.datatypes.generated.Bytes32.class, - org.web3j.abi.Utils.typeMap(_proof, org.web3j.abi.datatypes.generated.Bytes32.class))), + new DynamicArray( + Bytes32.class, + org.web3j.abi.Utils.typeMap(_proof, Bytes32.class))), Arrays.>asList(new TypeReference() {})); return executeRemoteCallSingleValueReturn(function, Boolean.class); } @@ -1308,15 +1308,15 @@ public RemoteFunctionCall proveL2MessageInclusion(BigInteger _batchNumb public RemoteFunctionCall requestL2Transaction(String _contractL2, BigInteger _l2Value, byte[] _calldata, BigInteger _l2GasLimit, BigInteger _l2GasPerPubdataByteLimit, List _factoryDeps, String _refundRecipient, BigInteger weiValue) { final Function function = new Function( FUNC_REQUESTL2TRANSACTION, - Arrays.asList(new org.web3j.abi.datatypes.Address(160, _contractL2), - new org.web3j.abi.datatypes.generated.Uint256(_l2Value), - new org.web3j.abi.datatypes.DynamicBytes(_calldata), - new org.web3j.abi.datatypes.generated.Uint256(_l2GasLimit), - new org.web3j.abi.datatypes.generated.Uint256(_l2GasPerPubdataByteLimit), - new org.web3j.abi.datatypes.DynamicArray( - org.web3j.abi.datatypes.DynamicBytes.class, - org.web3j.abi.Utils.typeMap(_factoryDeps, org.web3j.abi.datatypes.DynamicBytes.class)), - new org.web3j.abi.datatypes.Address(160, _refundRecipient)), + Arrays.asList(new Address(160, _contractL2), + new Uint256(_l2Value), + new DynamicBytes(_calldata), + new Uint256(_l2GasLimit), + new Uint256(_l2GasPerPubdataByteLimit), + new DynamicArray( + DynamicBytes.class, + org.web3j.abi.Utils.typeMap(_factoryDeps, DynamicBytes.class)), + new Address(160, _refundRecipient)), Collections.>emptyList()); return executeRemoteCallTransaction(function, weiValue); } @@ -1324,7 +1324,7 @@ public RemoteFunctionCall requestL2Transaction(String _contr public RemoteFunctionCall revertBatches(BigInteger _newLastBatch) { final Function function = new Function( FUNC_REVERTBATCHES, - Arrays.asList(new org.web3j.abi.datatypes.generated.Uint256(_newLastBatch)), + Arrays.asList(new Uint256(_newLastBatch)), Collections.>emptyList()); return executeRemoteCallTransaction(function); } @@ -1332,8 +1332,8 @@ public RemoteFunctionCall revertBatches(BigInteger _newLastB public RemoteFunctionCall revertBatchesSharedBridge(BigInteger _chainId, BigInteger _newLastBatch) { final Function function = new Function( FUNC_REVERTBATCHESSHAREDBRIDGE, - Arrays.asList(new org.web3j.abi.datatypes.generated.Uint256(_chainId), - new org.web3j.abi.datatypes.generated.Uint256(_newLastBatch)), + Arrays.asList(new Uint256(_chainId), + new Uint256(_newLastBatch)), Collections.>emptyList()); return executeRemoteCallTransaction(function); } @@ -1341,7 +1341,7 @@ public RemoteFunctionCall revertBatchesSharedBridge(BigInteg public RemoteFunctionCall setPendingAdmin(String _newPendingAdmin) { final Function function = new Function( FUNC_SETPENDINGADMIN, - Arrays.asList(new org.web3j.abi.datatypes.Address(160, _newPendingAdmin)), + Arrays.asList(new Address(160, _newPendingAdmin)), Collections.>emptyList()); return executeRemoteCallTransaction(function); } @@ -1349,7 +1349,7 @@ public RemoteFunctionCall setPendingAdmin(String _newPending public RemoteFunctionCall setPorterAvailability(Boolean _zkPorterIsAvailable) { final Function function = new Function( FUNC_SETPORTERAVAILABILITY, - Arrays.asList(new org.web3j.abi.datatypes.Bool(_zkPorterIsAvailable)), + Arrays.asList(new Bool(_zkPorterIsAvailable)), Collections.>emptyList()); return executeRemoteCallTransaction(function); } @@ -1357,7 +1357,7 @@ public RemoteFunctionCall setPorterAvailability(Boolean _zkP public RemoteFunctionCall setPriorityTxMaxGasLimit(BigInteger _newPriorityTxMaxGasLimit) { final Function function = new Function( FUNC_SETPRIORITYTXMAXGASLIMIT, - Arrays.asList(new org.web3j.abi.datatypes.generated.Uint256(_newPriorityTxMaxGasLimit)), + Arrays.asList(new Uint256(_newPriorityTxMaxGasLimit)), Collections.>emptyList()); return executeRemoteCallTransaction(function); } @@ -1365,7 +1365,7 @@ public RemoteFunctionCall setPriorityTxMaxGasLimit(BigIntege public RemoteFunctionCall setPubdataPricingMode(BigInteger _pricingMode) { final Function function = new Function( FUNC_SETPUBDATAPRICINGMODE, - Arrays.asList(new org.web3j.abi.datatypes.generated.Uint8(_pricingMode)), + Arrays.asList(new Uint8(_pricingMode)), Collections.>emptyList()); return executeRemoteCallTransaction(function); } @@ -1373,8 +1373,8 @@ public RemoteFunctionCall setPubdataPricingMode(BigInteger _ public RemoteFunctionCall setTokenMultiplier(BigInteger _nominator, BigInteger _denominator) { final Function function = new Function( FUNC_SETTOKENMULTIPLIER, - Arrays.asList(new org.web3j.abi.datatypes.generated.Uint128(_nominator), - new org.web3j.abi.datatypes.generated.Uint128(_denominator)), + Arrays.asList(new Uint128(_nominator), + new Uint128(_denominator)), Collections.>emptyList()); return executeRemoteCallTransaction(function); } @@ -1382,7 +1382,7 @@ public RemoteFunctionCall setTokenMultiplier(BigInteger _nom public RemoteFunctionCall setTransactionFilterer(String _transactionFilterer) { final Function function = new Function( FUNC_SETTRANSACTIONFILTERER, - Arrays.asList(new org.web3j.abi.datatypes.Address(160, _transactionFilterer)), + Arrays.asList(new Address(160, _transactionFilterer)), Collections.>emptyList()); return executeRemoteCallTransaction(function); } @@ -1390,15 +1390,15 @@ public RemoteFunctionCall setTransactionFilterer(String _tra public RemoteFunctionCall setValidator(String _validator, Boolean _active) { final Function function = new Function( FUNC_SETVALIDATOR, - Arrays.asList(new org.web3j.abi.datatypes.Address(160, _validator), - new org.web3j.abi.datatypes.Bool(_active)), + Arrays.asList(new Address(160, _validator), + new Bool(_active)), Collections.>emptyList()); return executeRemoteCallTransaction(function); } public RemoteFunctionCall storedBatchHash(BigInteger _batchNumber) { final Function function = new Function(FUNC_STOREDBATCHHASH, - Arrays.asList(new org.web3j.abi.datatypes.generated.Uint256(_batchNumber)), + Arrays.asList(new Uint256(_batchNumber)), Arrays.>asList(new TypeReference() {})); return executeRemoteCallSingleValueReturn(function, byte[].class); } @@ -1422,7 +1422,7 @@ public RemoteFunctionCall unfreezeDiamond() { public RemoteFunctionCall upgradeChainFromVersion(BigInteger _protocolVersion, DiamondCutData _cutData) { final Function function = new Function( FUNC_UPGRADECHAINFROMVERSION, - Arrays.asList(new org.web3j.abi.datatypes.generated.Uint256(_protocolVersion), + Arrays.asList(new Uint256(_protocolVersion), _cutData), Collections.>emptyList()); return executeRemoteCallTransaction(function); @@ -1456,12 +1456,12 @@ public static class FacetCut extends DynamicStruct { public List selectors; public FacetCut(String facet, BigInteger action, Boolean isFreezable, List selectors) { - super(new org.web3j.abi.datatypes.Address(160, facet), - new org.web3j.abi.datatypes.generated.Uint8(action), - new org.web3j.abi.datatypes.Bool(isFreezable), - new org.web3j.abi.datatypes.DynamicArray( - org.web3j.abi.datatypes.generated.Bytes4.class, - org.web3j.abi.Utils.typeMap(selectors, org.web3j.abi.datatypes.generated.Bytes4.class))); + super(new Address(160, facet), + new Uint8(action), + new Bool(isFreezable), + new DynamicArray( + Bytes4.class, + org.web3j.abi.Utils.typeMap(selectors, Bytes4.class))); this.facet = facet; this.action = action; this.isFreezable = isFreezable; @@ -1491,12 +1491,12 @@ public static class FeeParams extends StaticStruct { public BigInteger minimalL2GasPrice; public FeeParams(BigInteger pubdataPricingMode, BigInteger batchOverheadL1Gas, BigInteger maxPubdataPerBatch, BigInteger maxL2GasPerBatch, BigInteger priorityTxMaxPubdata, BigInteger minimalL2GasPrice) { - super(new org.web3j.abi.datatypes.generated.Uint8(pubdataPricingMode), - new org.web3j.abi.datatypes.generated.Uint32(batchOverheadL1Gas), - new org.web3j.abi.datatypes.generated.Uint32(maxPubdataPerBatch), - new org.web3j.abi.datatypes.generated.Uint32(maxL2GasPerBatch), - new org.web3j.abi.datatypes.generated.Uint32(priorityTxMaxPubdata), - new org.web3j.abi.datatypes.generated.Uint64(minimalL2GasPrice)); + super(new Uint8(pubdataPricingMode), + new Uint32(batchOverheadL1Gas), + new Uint32(maxPubdataPerBatch), + new Uint32(maxL2GasPerBatch), + new Uint32(priorityTxMaxPubdata), + new Uint64(minimalL2GasPrice)); this.pubdataPricingMode = pubdataPricingMode; this.batchOverheadL1Gas = batchOverheadL1Gas; this.maxPubdataPerBatch = maxPubdataPerBatch; @@ -1550,26 +1550,26 @@ public static class L2CanonicalTransaction extends DynamicStruct { public byte[] reservedDynamic; public L2CanonicalTransaction(BigInteger txType, BigInteger from, BigInteger to, BigInteger gasLimit, BigInteger gasPerPubdataByteLimit, BigInteger maxFeePerGas, BigInteger maxPriorityFeePerGas, BigInteger paymaster, BigInteger nonce, BigInteger value, List reserved, byte[] data, byte[] signature, List factoryDeps, byte[] paymasterInput, byte[] reservedDynamic) { - super(new org.web3j.abi.datatypes.generated.Uint256(txType), - new org.web3j.abi.datatypes.generated.Uint256(from), - new org.web3j.abi.datatypes.generated.Uint256(to), - new org.web3j.abi.datatypes.generated.Uint256(gasLimit), - new org.web3j.abi.datatypes.generated.Uint256(gasPerPubdataByteLimit), - new org.web3j.abi.datatypes.generated.Uint256(maxFeePerGas), - new org.web3j.abi.datatypes.generated.Uint256(maxPriorityFeePerGas), - new org.web3j.abi.datatypes.generated.Uint256(paymaster), - new org.web3j.abi.datatypes.generated.Uint256(nonce), - new org.web3j.abi.datatypes.generated.Uint256(value), - new org.web3j.abi.datatypes.generated.StaticArray4( - org.web3j.abi.datatypes.generated.Uint256.class, - org.web3j.abi.Utils.typeMap(reserved, org.web3j.abi.datatypes.generated.Uint256.class)), - new org.web3j.abi.datatypes.DynamicBytes(data), - new org.web3j.abi.datatypes.DynamicBytes(signature), - new org.web3j.abi.datatypes.DynamicArray( - org.web3j.abi.datatypes.generated.Uint256.class, - org.web3j.abi.Utils.typeMap(factoryDeps, org.web3j.abi.datatypes.generated.Uint256.class)), - new org.web3j.abi.datatypes.DynamicBytes(paymasterInput), - new org.web3j.abi.datatypes.DynamicBytes(reservedDynamic)); + super(new Uint256(txType), + new Uint256(from), + new Uint256(to), + new Uint256(gasLimit), + new Uint256(gasPerPubdataByteLimit), + new Uint256(maxFeePerGas), + new Uint256(maxPriorityFeePerGas), + new Uint256(paymaster), + new Uint256(nonce), + new Uint256(value), + new StaticArray4( + Uint256.class, + org.web3j.abi.Utils.typeMap(reserved, Uint256.class)), + new DynamicBytes(data), + new DynamicBytes(signature), + new DynamicArray( + Uint256.class, + org.web3j.abi.Utils.typeMap(factoryDeps, Uint256.class)), + new DynamicBytes(paymasterInput), + new DynamicBytes(reservedDynamic)); this.txType = txType; this.from = from; this.to = to; @@ -1629,17 +1629,17 @@ public static class BridgehubL2TransactionRequest extends DynamicStruct { public String refundRecipient; public BridgehubL2TransactionRequest(String sender, String contractL2, BigInteger mintValue, BigInteger l2Value, byte[] l2Calldata, BigInteger l2GasLimit, BigInteger l2GasPerPubdataByteLimit, List factoryDeps, String refundRecipient) { - super(new org.web3j.abi.datatypes.Address(160, sender), - new org.web3j.abi.datatypes.Address(160, contractL2), - new org.web3j.abi.datatypes.generated.Uint256(mintValue), - new org.web3j.abi.datatypes.generated.Uint256(l2Value), - new org.web3j.abi.datatypes.DynamicBytes(l2Calldata), - new org.web3j.abi.datatypes.generated.Uint256(l2GasLimit), - new org.web3j.abi.datatypes.generated.Uint256(l2GasPerPubdataByteLimit), - new org.web3j.abi.datatypes.DynamicArray( - org.web3j.abi.datatypes.DynamicBytes.class, - org.web3j.abi.Utils.typeMap(factoryDeps, org.web3j.abi.datatypes.DynamicBytes.class)), - new org.web3j.abi.datatypes.Address(160, refundRecipient)); + super(new Address(160, sender), + new Address(160, contractL2), + new Uint256(mintValue), + new Uint256(l2Value), + new DynamicBytes(l2Calldata), + new Uint256(l2GasLimit), + new Uint256(l2GasPerPubdataByteLimit), + new DynamicArray( + DynamicBytes.class, + org.web3j.abi.Utils.typeMap(factoryDeps, DynamicBytes.class)), + new Address(160, refundRecipient)); this.sender = sender; this.contractL2 = contractL2; this.mintValue = mintValue; @@ -1683,14 +1683,14 @@ public static class StoredBatchInfo extends StaticStruct { public byte[] commitment; public StoredBatchInfo(BigInteger batchNumber, byte[] batchHash, BigInteger indexRepeatedStorageChanges, BigInteger numberOfLayer1Txs, byte[] priorityOperationsHash, byte[] l2LogsTreeRoot, BigInteger timestamp, byte[] commitment) { - super(new org.web3j.abi.datatypes.generated.Uint64(batchNumber), - new org.web3j.abi.datatypes.generated.Bytes32(batchHash), - new org.web3j.abi.datatypes.generated.Uint64(indexRepeatedStorageChanges), - new org.web3j.abi.datatypes.generated.Uint256(numberOfLayer1Txs), - new org.web3j.abi.datatypes.generated.Bytes32(priorityOperationsHash), - new org.web3j.abi.datatypes.generated.Bytes32(l2LogsTreeRoot), - new org.web3j.abi.datatypes.generated.Uint256(timestamp), - new org.web3j.abi.datatypes.generated.Bytes32(commitment)); + super(new Uint64(batchNumber), + new Bytes32(batchHash), + new Uint64(indexRepeatedStorageChanges), + new Uint256(numberOfLayer1Txs), + new Bytes32(priorityOperationsHash), + new Bytes32(l2LogsTreeRoot), + new Uint256(timestamp), + new Bytes32(commitment)); this.batchNumber = batchNumber; this.batchHash = batchHash; this.indexRepeatedStorageChanges = indexRepeatedStorageChanges; @@ -1736,16 +1736,16 @@ public static class CommitBatchInfo extends DynamicStruct { public byte[] pubdataCommitments; public CommitBatchInfo(BigInteger batchNumber, BigInteger timestamp, BigInteger indexRepeatedStorageChanges, byte[] newStateRoot, BigInteger numberOfLayer1Txs, byte[] priorityOperationsHash, byte[] bootloaderHeapInitialContentsHash, byte[] eventsQueueStateHash, byte[] systemLogs, byte[] pubdataCommitments) { - super(new org.web3j.abi.datatypes.generated.Uint64(batchNumber), - new org.web3j.abi.datatypes.generated.Uint64(timestamp), - new org.web3j.abi.datatypes.generated.Uint64(indexRepeatedStorageChanges), - new org.web3j.abi.datatypes.generated.Bytes32(newStateRoot), - new org.web3j.abi.datatypes.generated.Uint256(numberOfLayer1Txs), - new org.web3j.abi.datatypes.generated.Bytes32(priorityOperationsHash), - new org.web3j.abi.datatypes.generated.Bytes32(bootloaderHeapInitialContentsHash), - new org.web3j.abi.datatypes.generated.Bytes32(eventsQueueStateHash), - new org.web3j.abi.datatypes.DynamicBytes(systemLogs), - new org.web3j.abi.datatypes.DynamicBytes(pubdataCommitments)); + super(new Uint64(batchNumber), + new Uint64(timestamp), + new Uint64(indexRepeatedStorageChanges), + new Bytes32(newStateRoot), + new Uint256(numberOfLayer1Txs), + new Bytes32(priorityOperationsHash), + new Bytes32(bootloaderHeapInitialContentsHash), + new Bytes32(eventsQueueStateHash), + new DynamicBytes(systemLogs), + new DynamicBytes(pubdataCommitments)); this.batchNumber = batchNumber; this.timestamp = timestamp; this.indexRepeatedStorageChanges = indexRepeatedStorageChanges; @@ -1779,10 +1779,10 @@ public static class Facet extends DynamicStruct { public List selectors; public Facet(String addr, List selectors) { - super(new org.web3j.abi.datatypes.Address(160, addr), - new org.web3j.abi.datatypes.DynamicArray( - org.web3j.abi.datatypes.generated.Bytes4.class, - org.web3j.abi.Utils.typeMap(selectors, org.web3j.abi.datatypes.generated.Bytes4.class))); + super(new Address(160, addr), + new DynamicArray( + Bytes4.class, + org.web3j.abi.Utils.typeMap(selectors, Bytes4.class))); this.addr = addr; this.selectors = selectors; } @@ -1802,9 +1802,9 @@ public static class VerifierParams extends StaticStruct { public byte[] recursionCircuitsSetVksHash; public VerifierParams(byte[] recursionNodeLevelVkHash, byte[] recursionLeafLevelVkHash, byte[] recursionCircuitsSetVksHash) { - super(new org.web3j.abi.datatypes.generated.Bytes32(recursionNodeLevelVkHash), - new org.web3j.abi.datatypes.generated.Bytes32(recursionLeafLevelVkHash), - new org.web3j.abi.datatypes.generated.Bytes32(recursionCircuitsSetVksHash)); + super(new Bytes32(recursionNodeLevelVkHash), + new Bytes32(recursionLeafLevelVkHash), + new Bytes32(recursionCircuitsSetVksHash)); this.recursionNodeLevelVkHash = recursionNodeLevelVkHash; this.recursionLeafLevelVkHash = recursionLeafLevelVkHash; this.recursionCircuitsSetVksHash = recursionCircuitsSetVksHash; @@ -1826,9 +1826,9 @@ public static class PriorityOperation extends StaticStruct { public BigInteger layer2Tip; public PriorityOperation(byte[] canonicalTxHash, BigInteger expirationTimestamp, BigInteger layer2Tip) { - super(new org.web3j.abi.datatypes.generated.Bytes32(canonicalTxHash), - new org.web3j.abi.datatypes.generated.Uint64(expirationTimestamp), - new org.web3j.abi.datatypes.generated.Uint192(layer2Tip)); + super(new Bytes32(canonicalTxHash), + new Uint64(expirationTimestamp), + new Uint192(layer2Tip)); this.canonicalTxHash = canonicalTxHash; this.expirationTimestamp = expirationTimestamp; this.layer2Tip = layer2Tip; @@ -1848,12 +1848,12 @@ public static class ProofInput extends DynamicStruct { public List serializedProof; public ProofInput(List recursiveAggregationInput, List serializedProof) { - super(new org.web3j.abi.datatypes.DynamicArray( - org.web3j.abi.datatypes.generated.Uint256.class, - org.web3j.abi.Utils.typeMap(recursiveAggregationInput, org.web3j.abi.datatypes.generated.Uint256.class)), - new org.web3j.abi.datatypes.DynamicArray( - org.web3j.abi.datatypes.generated.Uint256.class, - org.web3j.abi.Utils.typeMap(serializedProof, org.web3j.abi.datatypes.generated.Uint256.class))); + super(new DynamicArray( + Uint256.class, + org.web3j.abi.Utils.typeMap(recursiveAggregationInput, Uint256.class)), + new DynamicArray( + Uint256.class, + org.web3j.abi.Utils.typeMap(serializedProof, Uint256.class))); this.recursiveAggregationInput = recursiveAggregationInput; this.serializedProof = serializedProof; } @@ -1879,12 +1879,12 @@ public static class L2Log extends StaticStruct { public byte[] value; public L2Log(BigInteger l2ShardId, Boolean isService, BigInteger txNumberInBatch, String sender, byte[] key, byte[] value) { - super(new org.web3j.abi.datatypes.generated.Uint8(l2ShardId), - new org.web3j.abi.datatypes.Bool(isService), - new org.web3j.abi.datatypes.generated.Uint16(txNumberInBatch), - new org.web3j.abi.datatypes.Address(160, sender), - new org.web3j.abi.datatypes.generated.Bytes32(key), - new org.web3j.abi.datatypes.generated.Bytes32(value)); + super(new Uint8(l2ShardId), + new Bool(isService), + new Uint16(txNumberInBatch), + new Address(160, sender), + new Bytes32(key), + new Bytes32(value)); this.l2ShardId = l2ShardId; this.isService = isService; this.txNumberInBatch = txNumberInBatch; @@ -1912,9 +1912,9 @@ public static class L2Message extends DynamicStruct { public byte[] data; public L2Message(BigInteger txNumberInBatch, String sender, byte[] data) { - super(new org.web3j.abi.datatypes.generated.Uint16(txNumberInBatch), - new org.web3j.abi.datatypes.Address(160, sender), - new org.web3j.abi.datatypes.DynamicBytes(data)); + super(new Uint16(txNumberInBatch), + new Address(160, sender), + new DynamicBytes(data)); this.txNumberInBatch = txNumberInBatch; this.sender = sender; this.data = data; @@ -1936,9 +1936,9 @@ public static class DiamondCutData extends DynamicStruct { public byte[] initCalldata; public DiamondCutData(List facetCuts, String initAddress, byte[] initCalldata) { - super(new org.web3j.abi.datatypes.DynamicArray(FacetCut.class, facetCuts), - new org.web3j.abi.datatypes.Address(160, initAddress), - new org.web3j.abi.datatypes.DynamicBytes(initCalldata)); + super(new DynamicArray(FacetCut.class, facetCuts), + new Address(160, initAddress), + new DynamicBytes(initCalldata)); this.facetCuts = facetCuts; this.initAddress = initAddress; this.initCalldata = initCalldata;