Skip to content

Instantly share code, notes, and snippets.

@ItayPodhajcer
Last active January 16, 2020 08:42
Show Gist options
  • Save ItayPodhajcer/7d1f12021b0f612349baca9453ff118a to your computer and use it in GitHub Desktop.
Save ItayPodhajcer/7d1f12021b0f612349baca9453ff118a to your computer and use it in GitHub Desktop.
ethereum-event-azure-function-trigger/EthereumEventTriggerAttribute
[Binding]
[AttributeUsage(AttributeTargets.Parameter)]
public sealed class EthereumEventTriggerAttribute : Attribute
{
private const string DefaultUrl = "http://localhost:8545/";
public EthereumEventTriggerAttribute(string abi, string contractAddress, string eventName, string url = DefaultUrl)
{
Url = url;
Abi = abi;
ContractAddress = contractAddress;
EventName = eventName;
}
public string Url { get; private set; }
public string Abi { get; private set; }
public string ContractAddress { get; private set; }
public string EventName { get; set; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment