Skip to content
This repository has been archived by the owner on Mar 23, 2021. It is now read-only.

Commit

Permalink
Merge #64
Browse files Browse the repository at this point in the history
64: Add constant for ERC20 transfer events r=D4nte a=D4nte

As per suggestion from comit-network/comit-rs#2450 (comment)

Co-authored-by: Franck Royer <[email protected]>
  • Loading branch information
bors[bot] and Franck Royer authored Apr 15, 2020
2 parents b80476f + 965635b commit a8754e3
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/ethereum/rfc003/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,24 @@ pub use ether_htlc::EtherHtlc;
/// These are the hex-encoded ASCII-codepoints of the word "redeemed", padded to a length of 32 bytes.
pub const REDEEMED_LOG_MSG: &str =
"72656465656d6564000000000000000000000000000000000000000000000000";

/// The log message emitted when the HTLC is refunded.
///
/// These are the hex-encoded ASCII-codepoints of the word "refund", padded to a length of 32 bytes.
pub const REFUNDED_LOG_MSG: &str =
"726566756e646564000000000000000000000000000000000000000000000000";
/// The return message emitted when someone attempted to refund the HTLC before the timeout.

/// The returned message when someone attempted to refund the HTLC before the timeout.
///
/// These are the hex-encoded ASCII-codepoints of the word "tooEarly", padded to a length of 32 bytes.
pub const TOO_EARLY: &str = "746f6f4561726c79000000000000000000000000000000000000000000000000";
/// The return message emitted when someone attempted to redeem the HTLC with an invalid secret.

/// The returned message when someone attempted to redeem the HTLC with an invalid secret.
///
/// These are the hex-encoded ASCII-codepoints of the word "invalidSecret", padded to a length of 32 bytes.
pub const INVALID_SECRET: &str = "696e76616c696453656372657400000000000000000000000000000000000000";

/// The log message emitted by an ERC-20 token contract when a transfer is done, as per the ERC-20 EIP.
///
/// This is the result of keccak('Transfer(address,address,uint256)')/
pub const ERC20_TRANSFER: &str = "ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef";

0 comments on commit a8754e3

Please sign in to comment.