From 24cff2a5236f05117eb49c28f03d02feb3c06836 Mon Sep 17 00:00:00 2001 From: Nathan Woodburn Date: Mon, 9 Dec 2024 13:07:11 +1100 Subject: [PATCH] feat: Add small minting fee to pay for token account creations --- cache/1981e30de11cf0845e8b5affb4dc75e0.json | 2 +- cache/1ccff5c6f117409fea0c861aa44b8e62.json | 2 +- cache/29409a8a40dd2d547a7a44b8f6758f54.json | 2 +- cache/4104ed0427efe63d4ca0dead970a4391.json | 2 +- cache/46c1ec7f5edb30c070003dc54e072f41.json | 2 +- cache/598f5dbf97fb0d45cbc6e1a5b0a3b575.json | 2 +- cache/6cc6c6a0b2d0654f551d33209c1fd824.json | 2 +- cache/6eec370e2713cfc84c84e1080b8a191a.json | 2 +- cache/790b28a9a21cf694ad9577ef1072ac9e.json | 2 +- cache/a071d7bdda25c22e42ad7840f17c4b0e.json | 2 +- cache/a099e7e540e16a185b0279b9494e5099.json | 2 +- cache/a0ee60913ba556f39d128e7d7249e788.json | 2 +- cache/c652e896f57f598d23e3dbebdb815ef6.json | 2 +- cache/ccf2a009e56f1b05d471a55d9c9ea8ea.json | 2 +- server.py | 5 +++++ 15 files changed, 19 insertions(+), 14 deletions(-) diff --git a/cache/1981e30de11cf0845e8b5affb4dc75e0.json b/cache/1981e30de11cf0845e8b5affb4dc75e0.json index 04efad8..f17a884 100644 --- a/cache/1981e30de11cf0845e8b5affb4dc75e0.json +++ b/cache/1981e30de11cf0845e8b5affb4dc75e0.json @@ -1 +1 @@ -{"timestamp": 1733465874.1379163, "result": 3903.27} \ No newline at end of file +{"timestamp": 1733709841.1727908, "result": 3951.21} \ No newline at end of file diff --git a/cache/1ccff5c6f117409fea0c861aa44b8e62.json b/cache/1ccff5c6f117409fea0c861aa44b8e62.json index f5cfd69..d1d47de 100644 --- a/cache/1ccff5c6f117409fea0c861aa44b8e62.json +++ b/cache/1ccff5c6f117409fea0c861aa44b8e62.json @@ -1 +1 @@ -{"timestamp": 1733465936.7649121, "result": 1.19} \ No newline at end of file +{"timestamp": 1733709904.048873, "result": 1.17} \ No newline at end of file diff --git a/cache/29409a8a40dd2d547a7a44b8f6758f54.json b/cache/29409a8a40dd2d547a7a44b8f6758f54.json index 08fd012..4d5053a 100644 --- a/cache/29409a8a40dd2d547a7a44b8f6758f54.json +++ b/cache/29409a8a40dd2d547a7a44b8f6758f54.json @@ -1 +1 @@ -{"timestamp": 1733465934.9081368, "result": 4.18} \ No newline at end of file +{"timestamp": 1733709837.4863276, "result": 4.19} \ No newline at end of file diff --git a/cache/4104ed0427efe63d4ca0dead970a4391.json b/cache/4104ed0427efe63d4ca0dead970a4391.json index 0f0adbd..7c55730 100644 --- a/cache/4104ed0427efe63d4ca0dead970a4391.json +++ b/cache/4104ed0427efe63d4ca0dead970a4391.json @@ -1 +1 @@ -{"timestamp": 1733465873.396875, "result": 253.41} \ No newline at end of file +{"timestamp": 1733709838.508297, "result": 246.79} \ No newline at end of file diff --git a/cache/46c1ec7f5edb30c070003dc54e072f41.json b/cache/46c1ec7f5edb30c070003dc54e072f41.json index f373190..9e3f8c2 100644 --- a/cache/46c1ec7f5edb30c070003dc54e072f41.json +++ b/cache/46c1ec7f5edb30c070003dc54e072f41.json @@ -1 +1 @@ -{"timestamp": 1733465935.473603, "result": 4.29} \ No newline at end of file +{"timestamp": 1733709902.6437316, "result": 4.22} \ No newline at end of file diff --git a/cache/598f5dbf97fb0d45cbc6e1a5b0a3b575.json b/cache/598f5dbf97fb0d45cbc6e1a5b0a3b575.json index ccac3d4..deed8ab 100644 --- a/cache/598f5dbf97fb0d45cbc6e1a5b0a3b575.json +++ b/cache/598f5dbf97fb0d45cbc6e1a5b0a3b575.json @@ -1 +1 @@ -{"timestamp": 1733465868.6108558, "result": 238.91} \ No newline at end of file +{"timestamp": 1733709835.4421465, "result": 232.42} \ No newline at end of file diff --git a/cache/6cc6c6a0b2d0654f551d33209c1fd824.json b/cache/6cc6c6a0b2d0654f551d33209c1fd824.json index d9532eb..8e2cc52 100644 --- a/cache/6cc6c6a0b2d0654f551d33209c1fd824.json +++ b/cache/6cc6c6a0b2d0654f551d33209c1fd824.json @@ -1 +1 @@ -{"timestamp": 1733465935.8754933, "result": 4.44} \ No newline at end of file +{"timestamp": 1733709903.0252566, "result": 4.38} \ No newline at end of file diff --git a/cache/6eec370e2713cfc84c84e1080b8a191a.json b/cache/6eec370e2713cfc84c84e1080b8a191a.json index e26687a..ed932ff 100644 --- a/cache/6eec370e2713cfc84c84e1080b8a191a.json +++ b/cache/6eec370e2713cfc84c84e1080b8a191a.json @@ -1 +1 @@ -{"timestamp": 1733465866.4457877, "result": 220.385447719} \ No newline at end of file +{"timestamp": 1733709833.6583126, "result": 303.899783283} \ No newline at end of file diff --git a/cache/790b28a9a21cf694ad9577ef1072ac9e.json b/cache/790b28a9a21cf694ad9577ef1072ac9e.json index a1bf276..fca5427 100644 --- a/cache/790b28a9a21cf694ad9577ef1072ac9e.json +++ b/cache/790b28a9a21cf694ad9577ef1072ac9e.json @@ -1 +1 @@ -{"timestamp": 1733465868.2397482, "result": 0.00927176} \ No newline at end of file +{"timestamp": 1733709835.0307581, "result": 0.009281764} \ No newline at end of file diff --git a/cache/a071d7bdda25c22e42ad7840f17c4b0e.json b/cache/a071d7bdda25c22e42ad7840f17c4b0e.json index 78e3807..f275292 100644 --- a/cache/a071d7bdda25c22e42ad7840f17c4b0e.json +++ b/cache/a071d7bdda25c22e42ad7840f17c4b0e.json @@ -1 +1 @@ -{"timestamp": 1733465870.028333, "result": 1.0} \ No newline at end of file +{"timestamp": 1733709839.3296363, "result": 0.99943} \ No newline at end of file diff --git a/cache/a099e7e540e16a185b0279b9494e5099.json b/cache/a099e7e540e16a185b0279b9494e5099.json index d328ac6..5894ea1 100644 --- a/cache/a099e7e540e16a185b0279b9494e5099.json +++ b/cache/a099e7e540e16a185b0279b9494e5099.json @@ -1 +1 @@ -{"timestamp": 1733465871.5495713, "result": 97776} \ No newline at end of file +{"timestamp": 1733709841.9973485, "result": 99348} \ No newline at end of file diff --git a/cache/a0ee60913ba556f39d128e7d7249e788.json b/cache/a0ee60913ba556f39d128e7d7249e788.json index ce98b57..4be53e4 100644 --- a/cache/a0ee60913ba556f39d128e7d7249e788.json +++ b/cache/a0ee60913ba556f39d128e7d7249e788.json @@ -1 +1 @@ -{"timestamp": 1733465935.8780353, "result": [{"mint": "3NZ9JMVBmGAqocybic2c7LQCJScmgsAZ6vQqTDzcqmJh", "balance": 0.00011819, "price": 97776, "value": 11.55614544, "name": "Wrapped BTC (Wormhole)", "symbol": "wbtc"}, {"mint": "jupSoLaHXQiZZTSfEWMTRRgpnyFm8f6sZdosWBjx93v", "balance": 0.039815492, "price": 253.41, "value": 10.08964382772, "name": "Jupiter Staked SOL", "symbol": "jupsol"}, {"mint": "7vfCXTUXx5WJV5JADk17DUJ4ksgau7utNKj4b963voxs", "balance": 0.00255735, "price": 3903.27, "value": 9.9820275345, "name": "Ethereum (Wormhole)", "symbol": "eth"}, {"mint": "27G8MtK7VtTcCHkpASjSDdkWWYfoqT6ggEuKidVJidD4", "balance": 10.355235, "price": 4.18, "value": 43.2848823, "name": "Jupiter Perpetuals Liquidity Provider Token", "symbol": "jlp"}, {"mint": "0x2::sui::SUI", "balance": 0.902850107, "price": 4.29, "value": 3.87322695903, "name": "Sui", "symbol": "sui"}, {"mint": "0x549e8b69270defbfafd4f94e17ec44cdbdd99820b33bda2278dea3b9a32d3f55::cert::CERT", "balance": 9.658874002, "price": 4.44, "value": 42.88540056888, "name": "Volo Staked SUI", "symbol": "vsui"}]} \ No newline at end of file +{"timestamp": 1733709903.03487, "result": [{"mint": "27G8MtK7VtTcCHkpASjSDdkWWYfoqT6ggEuKidVJidD4", "balance": 24.661756, "price": 4.19, "value": 103.33275764000001, "name": "Jupiter Perpetuals Liquidity Provider Token", "symbol": "jlp"}, {"mint": "jupSoLaHXQiZZTSfEWMTRRgpnyFm8f6sZdosWBjx93v", "balance": 0.039815492, "price": 246.79, "value": 9.82606527068, "name": "Jupiter Staked SOL", "symbol": "jupsol"}, {"mint": "7vfCXTUXx5WJV5JADk17DUJ4ksgau7utNKj4b963voxs", "balance": 0.00255735, "price": 3951.21, "value": 10.104626893499999, "name": "Ethereum (Wormhole)", "symbol": "eth"}, {"mint": "3NZ9JMVBmGAqocybic2c7LQCJScmgsAZ6vQqTDzcqmJh", "balance": 0.00035766, "price": 99348, "value": 35.532805679999996, "name": "Wrapped BTC (Wormhole)", "symbol": "wbtc"}, {"mint": "0x2::sui::SUI", "balance": 0.902850107, "price": 4.22, "value": 3.81002745154, "name": "Sui", "symbol": "sui"}, {"mint": "0x549e8b69270defbfafd4f94e17ec44cdbdd99820b33bda2278dea3b9a32d3f55::cert::CERT", "balance": 9.658874002, "price": 4.38, "value": 42.30586812876, "name": "Volo Staked SUI", "symbol": "vsui"}]} \ No newline at end of file diff --git a/cache/c652e896f57f598d23e3dbebdb815ef6.json b/cache/c652e896f57f598d23e3dbebdb815ef6.json index dd6c99b..e2b3345 100644 --- a/cache/c652e896f57f598d23e3dbebdb815ef6.json +++ b/cache/c652e896f57f598d23e3dbebdb815ef6.json @@ -1 +1 @@ -{"timestamp": 1733465935.8775811, "result": [{"mint": "0x2::sui::SUI", "balance": 0.902850107, "price": 4.29, "value": 3.87322695903, "name": "Sui", "symbol": "sui"}, {"mint": "0x549e8b69270defbfafd4f94e17ec44cdbdd99820b33bda2278dea3b9a32d3f55::cert::CERT", "balance": 9.658874002, "price": 4.44, "value": 42.88540056888, "name": "Volo Staked SUI", "symbol": "vsui"}]} \ No newline at end of file +{"timestamp": 1733709903.0345013, "result": [{"mint": "0x2::sui::SUI", "balance": 0.902850107, "price": 4.22, "value": 3.81002745154, "name": "Sui", "symbol": "sui"}, {"mint": "0x549e8b69270defbfafd4f94e17ec44cdbdd99820b33bda2278dea3b9a32d3f55::cert::CERT", "balance": 9.658874002, "price": 4.38, "value": 42.30586812876, "name": "Volo Staked SUI", "symbol": "vsui"}]} \ No newline at end of file diff --git a/cache/ccf2a009e56f1b05d471a55d9c9ea8ea.json b/cache/ccf2a009e56f1b05d471a55d9c9ea8ea.json index bbb9629..27c0089 100644 --- a/cache/ccf2a009e56f1b05d471a55d9c9ea8ea.json +++ b/cache/ccf2a009e56f1b05d471a55d9c9ea8ea.json @@ -1 +1 @@ -{"timestamp": 1733465936.4269736, "result": 82.815227} \ No newline at end of file +{"timestamp": 1733709903.5823874, "result": 82.815227} \ No newline at end of file diff --git a/server.py b/server.py index 634523e..8b55ce7 100644 --- a/server.py +++ b/server.py @@ -541,6 +541,11 @@ def mint_stWDBRN(amount, to_user_account): if amount < 0.5: print(f"Skipping minting of {amount} stWDBRN to {to_user_account} as it is less than 0.5", flush=True) return + + # Small fee for minting + if amount > 10: + amount = amount - 0.05 + print(f"Minting {amount} stWDBRN to {to_user_account}", flush=True) TOKEN_PROGRAM_ID = Pubkey.from_string("TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb") WALLET = os.getenv("WALLET")