Skip to content

Commit

Permalink
fmt + starknet address on events
Browse files Browse the repository at this point in the history
  • Loading branch information
MSghais committed Jun 19, 2024
1 parent 2ce604f commit 2c1a98c
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions onchain/src/social/deposit.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ pub mod DepositEscrow {
sender: ContractAddress,
#[key]
recipient: NostrPublicKey,
#[key]
starknet_recipient: ContractAddress,
amount: u256,
token_address: ContractAddress,
}
Expand All @@ -109,6 +111,8 @@ pub mod DepositEscrow {
sender: ContractAddress,
#[key]
recipient: NostrPublicKey,
#[key]
starknet_recipient: ContractAddress,
amount: u256,
token_address: ContractAddress,
}
Expand All @@ -118,7 +122,9 @@ pub mod DepositEscrow {
#[key]
sender: ContractAddress,
#[key]
recipient: NostrPublicKey,
nostr_recipient: NostrPublicKey,
#[key]
starknet_recipient: ContractAddress,
amount: u256,
token_address: ContractAddress,
}
Expand Down Expand Up @@ -159,7 +165,8 @@ pub mod DepositEscrow {
.emit(
TransferEvent {
sender: get_caller_address(),
recipient: recipient,
nostr_recipient,
starknet_recipient: recipient,
amount: amount,
token_address: token_address
}
Expand Down Expand Up @@ -188,7 +195,7 @@ pub mod DepositEscrow {
self
.emit(
DepositEvent {
deposit_id: deposit_id,
deposit_id,
sender: get_caller_address(),
recipient: nostr_recipient,
amount: amount,
Expand All @@ -214,10 +221,11 @@ pub mod DepositEscrow {
self
.emit(
CancelEvent {
deposit_id: deposit_id,
deposit_id,
sender: get_caller_address(),
recipient: deposit.recipient,
amount: deposit.amount,
starknet_recipient: get_caller_address(),
token_address: deposit.token_address
}
);
Expand All @@ -238,10 +246,11 @@ pub mod DepositEscrow {
self
.emit(
ClaimEvent {
deposit_id: deposit_id,
deposit_id,
sender: get_caller_address(),
recipient: request.public_key,
amount: deposit.amount,
starknet_recipient: get_caller_address(),
token_address: deposit.token_address
}
);
Expand Down

0 comments on commit 2c1a98c

Please sign in to comment.