private static Internal.Protobuf.Address AddressToProtobufAddress(Address address)
 {
     return(new Internal.Protobuf.Address
     {
         ChainId = address.ChainId,
         Local = ByteString.CopyFrom(CryptoUtils.HexStringToBytes(address.LocalAddress))
     });
 }
Beispiel #2
0
 private async Task <byte[]> StaticCallAsyncByteArray(string callInput)
 {
     return(await this.Client.QueryAsync <byte[]>(
                this.Address,
                CryptoUtils.HexStringToBytes(callInput),
                this.Caller,
                Protobuf.VMType.Evm,
                new CallDescription("_evmQuery", true)
                ));
 }
Beispiel #3
0
 internal Transaction CreateContractMethodCallTx(string hexData, VMType vmType)
 {
     return(CreateContractMethodCallTx(ByteString.CopyFrom(CryptoUtils.HexStringToBytes(hexData)), vmType));
 }
Beispiel #4
0
 private async Task <byte[]> StaticCallAsyncByteArray(string callInput)
 {
     return(await this.Client.QueryAsync <byte[]>(this.Address, CryptoUtils.HexStringToBytes(callInput), this.Caller, Protobuf::VMType.Evm));
 }
Beispiel #5
0
 /// <summary>
 /// Returns binary 20-byte array representation of the address.
 /// </summary>
 /// <returns>20-byte array containing the address.</returns>
 public byte[] ToByteArray()
 {
     return(CryptoUtils.HexStringToBytes(LocalAddress.Substring(2)));
 }