commit 9e8b692d0c062f0df0203fa6edc1b6ca33bdf17d Author: npub1smarczws3grrrm3vgd3t6tx6vw25xn48jdqv7xrujnf5c5ghh7ps5yj78s <86fa3c09d08a0631ee2c4362bd2cda6395434ea79340cf187c94d34c5117bf83@git.nostr> Date: Fri May 24 10:52:44 2024 +0200 genesis diff --git a/.txo/txo.txt b/.txo/txo.txt new file mode 100644 index 0000000..579c7bc --- /dev/null +++ b/.txo/txo.txt @@ -0,0 +1 @@ +txo:tbtc4:21ebc6077ae613d266dcd45ec1b90c54e228d02c945a7754cdd4dcf63e563d13:0 10000 diff --git a/README.md b/README.md new file mode 100644 index 0000000..1a507b8 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +`sethue` allows you to set a value between 0 and 360 that will be used as the "hue" of the background-color of this website in an HSL formula. + +Be sure to pay at least 1000 sat as the price for having this amazing color-changing opportunity! diff --git a/contract.lua b/contract.lua new file mode 100644 index 0000000..63b96d9 --- /dev/null +++ b/contract.lua @@ -0,0 +1,20 @@ +function __init__ () + return {hue=0} +end + +function sethue () + if call.msatoshi < 1000000 then + error('pay at least 1000 sats!') + end + + if type(call.payload.hue) ~= 'number' then + error('hue is not a number!') + end + + if call.payload.hue < 0 or call.payload.hue > 360 then + error('hue is out of the 0~360 range!') + end + + contract.state.hue = call.payload.hue + contract.send('86fa35962e3c40d400f983422284ce5470fb7c3900deb0606d1e2be8ba0f5d9a', call.msatoshi) +end diff --git a/index.html b/index.html new file mode 100644 index 0000000..0929611 --- /dev/null +++ b/index.html @@ -0,0 +1,219 @@ + + +
+ + + + + + +