I hereby claim:
- I am alexesc on github.
- I am aramisesc (https://keybase.io/aramisesc) on keybase.
- I have a public key ASDLA7euhV1VdaBPOalQyZPEmdkoAmHlaM3qAfQtgDuOLgo
To claim this, I am signing this object:
from decimal import Decimal | |
from datetime import datetime | |
import time | |
from hummingbot.script.script_base import ScriptBase | |
from hummingbot.core.event.events import BuyOrderCompletedEvent, SellOrderCompletedEvent | |
from os.path import realpath, join | |
s_decimal_1 = Decimal("1") | |
LOGS_PATH = realpath(join(__file__, "../../logs/")) |
I hereby claim:
To claim this, I am signing this object:
let startHeight = 10000 | |
let interval = 44000 | |
let limit = 1500 | |
match tx { | |
case t: TransferTransaction | MassTransferTransaction | ExchangeTransaction => | |
(height - startHeight) % interval < limit | |
case _ => true | |
} |
let startPrice = 10 | |
let startHeight = 1000 | |
let interval = 1000 | |
#porciento en el que aumenta el precio en cada paso | |
let raise = 5 | |
match tx { | |
case t: TransferTransaction | MassTransferTransaction => false | |
case e: ExchangeTransaction => | |
e.price == startPrice + ((height - startHeight) / interval) * (100 + raise) / 100 |
let oracle = Address(base58'3PLNmokt22NrSiNvCLvwMUP84LCMJqbXwAD') | |
let assetId = toBase58String(base58'oWgJN6YGZFtZrV8BWQ1PGktZikgg7jzGmtm16Ktyvjd') | |
match tx { | |
#se prohibe la transferencia del activo | |
case t: TransferTransaction | MassTransferTransaction => false | |
case e: ExchangeTransaction => | |
#chequeando que el intercambio es a un precio fijado en el estado del oracle para ese activo | |
let correctPrice = e.price == extract(getInteger(oracle, assetId)) | |
#comprobamos que el intercambio es por WAVES |
let BTCId = base58'8LQW8f7P5d5PZM7GtZEBgaqRPGSzS3DfPuiXrURJ4AJS' | |
match tx { | |
case t : ExchangeTransaction => | |
t.sellOrder.assetPair.priceAsset == BTCId || | |
t.sellOrder.assetPair.amountAsset == BTCId | |
case _ => true | |
} |
match tx { | |
case t : TransferTransaction => | |
let issuer = extract(addressFromString("3P6ms9EotRX8JwSrebeTXYVnzpsGCrKWLv4")) | |
# chequeamos que el estado del emisor (issuer) contiene el ID de la transacción | |
isDefined(getInteger(issuer, toBase58String(t.id))) | |
case _ => false | |
} |
match tx { | |
case t : TransferTransaction => | |
let bannedRecipient1 = addressFromString("3P6ms9EotRX8JwSrebeTXYVnzpsGCrKWLv4") | |
let bannedRecipient2 = addressFromString("3PLZcCJyYQnfWfzhKXRA4rteCQC9J1ewf5K") | |
let bannedRecipient3 = addressFromString("3PHrS6VNPRtUD8MHkfkmELavL8JnGtSq5sx") | |
t.recipient != bannedRecipient1 && t.recipient != bannedRecipient2 && t.recipient != bannedRecipient3 | |
case _ => false | |
} |
match tx { | |
case t : TransferTransaction => | |
let trustedRecipient1 = addressFromString("3P6ms9EotRX8JwSrebeTXYVnzpsGCrKWLv4") | |
let trustedRecipient2 = addressFromString("3PLZcCJyYQnfWfzhKXRA4rteCQC9J1ewf5K") | |
let trustedRecipient3 = addressFromString("3PHrS6VNPRtUD8MHkfkmELavL8JnGtSq5sx") | |
t.recipient == trustedRecipient1 || t.recipient == trustedRecipient2 || t.recipient == trustedRecipient3 | |
case _ => false | |
} |
#the account owner pledges to sell a certain number of the asset's units | |
#at sellPrice between block heights expirationStart and expirationEnd | |
let expirationStart = 100000 | |
let expirationEnd = 101440 | |
let sellPrice = 10000 | |
let amountAsset = base58'8jfD2JBLe23XtCCSQoTx5eAW5QCU6Mbxi3r78aNQLcNf' | |
let priceAsset = base58'9jfD2JBLe23XtCCSQoTx5eAW5QCU6Mbxi3r78aNQLcNf' | |
#option asset ID | |
let optionsAsset = base58'7jfD2JBLe23XtCCSQoTx5eAW5QCU6Mbxi3r78aNQLcNf' | |
#extracting the sender's address from the transaction |