/// <summary> /// Returns binary 20-byte array representing of the address. /// </summary> /// <returns>20-byte array containing the address.</returns> public byte[] ToByteArray() { return(CryptoUtils.HexStringToBytes(LocalAddress.Substring(2))); }
/// <summary> /// Decodes event data into event DTO. /// </summary> /// <typeparam name="T"></typeparam> /// <returns>Decoded event DTO.</returns> /// <see href="https://nethereum.readthedocs.io/en/latest/contracts/calling-transactions-events/"/> public T DecodeEventDto <T>() where T : new() { EventTopicDecoder eventTopicDecoder = new EventTopicDecoder(); return(eventTopicDecoder.DecodeTopics <T>(this.Topics, CryptoUtils.BytesToHexString(this.Data))); }
private async Task <byte[]> StaticCallAsyncByteArray(string callInput) { return(await this.client.QueryAsync <byte[]>(this.Address, CryptoUtils.HexStringToBytes(callInput), this.Caller, Protobuf::VMType.Evm)); }
internal Transaction CreateContractMethodCallTx(string hexData, VMType vmType) { return(CreateContractMethodCallTx(ByteString.CopyFrom(CryptoUtils.HexStringToBytes(hexData)), vmType)); }