Only tech topics about Waves: dev tools, libs, RIDE, dApps, Nodes Github: http://tiny.cc/github-waves IDE: https://ide.wavesplatform.com/ Online Course: https://stepik.org/course/54415 StackOverflow: #wavesplatform Jobs: https://t.me/wavesridejobs
let's create what I ask and everyone will be in profit and the platform will be in profit due to new users and new users will be in profit
Читать полностью…You have a referral link in your inbox
Читать полностью…How it should work? I don't know what "referral" is and how it works.
Читать полностью…what does wavez recommend in such cases
Читать полностью…Why do you need an asset script? Asset scripts are designed to determine whether certain transactions involving the asset, such as transfers, burns, or issuances are allowed or rejected. The script is bound to the asset and defines the rules for these operations.
It has to be a boolean expression. https://docs.waves.tech/en/ride/script/script-types/asset-script#asset-script-format
Regarding you script it lacks a callable function https://docs.waves.tech/en/ride/functions/callable-function#annotation
Читать полностью…{-# STDLIB_VERSION 5 #-}
{-# CONTENT_TYPE EXPRESSION #-}
{-# SCRIPT_TYPE ASSET #-}
let refTokenName = "REF-AMANAT"
let refTokenDescription = "Реферальный токен фонда AMANAT"
let refTokenQuantity = 1000000
let refTokenDecimals = 8
let fee = 1000000
issue(refTokenName, refTokenQuantity, refTokenDecimals, refTokenDescription, reissuable = true, fee = fee)
What am I doing to create a scrypt token?
I'm interested in this smart is written for distribution I'm testing for accrual to the referrer no what could be what's the problem
Читать полностью…May be this is AI asking, again?
Читать полностью…While you keep not providing technical data of your problem, no-one can help.
Читать полностью…Installing how? Shows where? Error which?
Читать полностью…tried https://bridge.pepe.team/?
Читать полностью…https://github.com/PyWaves/PyWaves/blob/d491242815b89d257a3e74d5e63bee4f9a48289e/txGenerator.py#L370
Its a string, not an object
What do you mean you don't know the referral link?
Читать полностью…I wouldn’t recommend using asset scripts. They are rarely used and may be deprecated in the future.
Читать полностью…{-# STDLIB_VERSION 5 #-}
{-# CONTENT_TYPE EXPRESSION #-}
{-# SCRIPT_TYPE ASSET #-}
let refTokenName = "REFAMANAT" // Название токена
let refTokenDescription = "Реферальный токен фонда AMANAT" // Описание токена
let refTokenQuantity = 1000000 // Количество токенов
let refTokenDecimals = 8 // Количество знаков после запятой
let fee = 1000000 // Плата за транзакцию (минимальная плата)
issue(refTokenName, refTokenQuantity, refTokenDecimals, refTokenDescription, reissuable = true, fee = fee)
I read all this but I fixed some mistakes but it still shows up and I can't understand what's going on
Читать полностью…If you need one token you can issue it by issue transaction and late reissue or burn it by script. https://docs.waves.tech/en/blockchain/transaction-type/issue-transaction
Читать полностью…There is a referrer in the contract, where will he find out about his contract from the referral or should he write it down, who will tell him?
Читать полностью…Definitely AI, no human would ignore such comments :)))
Читать полностью…Why it should work? It seems its written by some AI. Strange errors never seen from any dev. I made it at least compilable:{-# STDLIB_VERSION 5 #-}
{-# CONTENT_TYPE DAPP #-}
{-# SCRIPT_TYPE ACCOUNT #-}
# Константы
let AMANAT_ASSET_ID = base58'8DkyFnkirQNRJs1YqaPUxPxgpLph7Zh4AnLtqqbc8xXf' # ID токена AMANAT
let FUND_ADDRESS = Address(base58'3PEDxtVDNovJViuBSbjRyE5TKrMnttenw6S') # Адрес фонда
let DEPOSIT_AMOUNT = 100000000 # 1 AMANAT в минимальных единицах (1 AMANAT = 10^8 минимальных единиц)
# Внесение депозита
@Callable(i)
func deposit(referrer: String) = {
let sender = i.caller
let payment = i.payments
# Проверка платежа
if (size(payment) != 1) then throw("Требуется отправить ровно один платеж") else
let payAsset = payment[0].assetId
let payAmount = payment[0].amount
# Проверка токена и суммы
if (payAsset != AMANAT_ASSET_ID) then throw("Неверный токен. Требуется AMANAT.") else
if (payAmount != DEPOSIT_AMOUNT) then throw("Требуется ровно 1 AMANAT.") else
# Проверка, что адрес еще не вносил депозит
if (getBoolean(toBase58String(sender.bytes)) != unit) then throw("Вы уже внесли депозит") else
# Распределение средств
let halfAmount = payAmount / 2
if (referrer != "" && referrer != toBase58String(sender.bytes)) then
let referrerAddress = addressFromStringValue(referrer)
[
ScriptTransfer(referrerAddress, halfAmount, AMANAT_ASSET_ID), # 50% рефереру
ScriptTransfer(FUND_ADDRESS, halfAmount, AMANAT_ASSET_ID), # 50% фонду
BooleanEntry(toBase58String(sender.bytes), true) # Отмечаем, что депозит внесен
]
else
[
ScriptTransfer(FUND_ADDRESS, payAmount, AMANAT_ASSET_ID), # 100% фонду, если реферер не указан
BooleanEntry(toBase58String(sender.bytes), true) # Отмечаем, что депозит внесен
]
}
# Получение баланса контракта
@Callable(i)
func getBalance() = {
let balance = assetBalance(this, AMANAT_ASSET_ID)
([], balance)
}
# Вывод средств (только для фонда)
@Callable(i)
func withdraw(amount: Int) = {
if (i.caller != FUND_ADDRESS) then throw("Только фонд может выводить средства") else
let balance = assetBalance(this, AMANAT_ASSET_ID)
if (amount > balance) then throw("Недостаточно средств") else
[
ScriptTransfer(FUND_ADDRESS, amount, AMANAT_ASSET_ID)
]
}
Have fun with AI.
Hi guys! How can I bridge into Waves network, cheapest option
Читать полностью…hi, i am trying to call a script with wavespy
pw.setNode(config['waves']['node'], config['waves']['chain']);
addr = pw.address.Address(privateKey=config['waves']['pk']);
logger.info(f"Operating from address: {addr.address}");
dappaddr = pw.address.Address(config['waves']['claimwavesdaolpdappaddress'])
addr.invokeScript(dappaddr, 'processBlocks')
dApp.public_key_hash = base58.b58decode(tx['dApp'])[2:22]
base58.py", line 77, in b58decode
v = v.decode('ascii')
AttributeError: 'Address' object has no attribute 'decode'