deploy
This commit is contained in:
@@ -2,22 +2,45 @@ struct Content {
|
|||||||
content: String;
|
content: String;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
message Notification {}
|
||||||
|
|
||||||
contract Gift {
|
contract Gift {
|
||||||
// owner: Address;
|
owner: Address;
|
||||||
// content: Content;
|
receiver: Address;
|
||||||
|
content: Content;
|
||||||
|
|
||||||
// init(
|
init(
|
||||||
// owner: Address,
|
content: Content,
|
||||||
// content: Content
|
receiver: Address
|
||||||
// ) {
|
) {
|
||||||
// self.owner = owner;
|
self.owner = sender();
|
||||||
// self.content = content;
|
self.receiver = receiver;
|
||||||
// }
|
self.content = content;
|
||||||
|
nativeReserve(ton("0.001"), ReserveExact);
|
||||||
|
self.sendNotify();
|
||||||
|
}
|
||||||
|
|
||||||
receive() {
|
inline fun sendNotify() {
|
||||||
self.reply(
|
message(MessageParameters {
|
||||||
"Hello, world!".asComment()
|
to: self.receiver,
|
||||||
);
|
value: 0,
|
||||||
|
mode: SendRemainingBalance,
|
||||||
|
body: Notification {}.toCell(),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
receive() {}
|
||||||
|
|
||||||
|
get fun owner(): Address {
|
||||||
|
return self.owner;
|
||||||
|
}
|
||||||
|
|
||||||
|
get fun receiver(): Address {
|
||||||
|
return self.receiver;
|
||||||
|
}
|
||||||
|
|
||||||
|
get fun content(): Content {
|
||||||
|
return self.content;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user