Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(primary-names): add patch for adding demand factor data to primar… (
#408) …y name requests Steps to test: 1. Deploy new process against original module ```bash ❯ aos df-data-event-patch-2 --module=CWxzoe4IoNpFHiykadZWphZtLWybDF8ocNi7gmK6zCg --cu-url https://localhost:6363 _____ _______ _____ /\ \ /::\ \ /\ \ /::\ \ /::::\ \ /::\ \ /::::\ \ /::::::\ \ /::::\ \ /::::::\ \ /::::::::\ \ /::::::\ \ /:::/\:::\ \ /:::/~~\:::\ \ /:::/\:::\ \ /:::/__\:::\ \ /:::/ \:::\ \ /:::/__\:::\ \ /::::\ \:::\ \ /:::/ / \:::\ \ \:::\ \:::\ \ /::::::\ \:::\ \ /:::/____/ \:::\____\ ___\:::\ \:::\ \ /:::/\:::\ \:::\ \ |:::| | |:::| | /\ \:::\ \:::\ \ /:::/ \:::\ \:::\____\|:::|____| |:::| |/::\ \:::\ \:::\____\ \::/ \:::\ /:::/ / \:::\ \ /:::/ / \:::\ \:::\ \::/ / \/____/ \:::\/:::/ / \:::\ \ /:::/ / \:::\ \:::\ \/____/ \::::::/ / \:::\ /:::/ / \:::\ \:::\ \ \::::/ / \:::\__/:::/ / \:::\ \:::\____\ /:::/ / \::::::::/ / \:::\ /:::/ / /:::/ / \::::::/ / \:::\/:::/ / /:::/ / \::::/ / \::::::/ / /:::/ / \::/____/ \::::/ / \::/ / ~~ \::/ / \/____/ \/____/ Welcome to AOS: Your operating system for AO, the decentralized open access supercomputer. Type ".load-blueprint chat" to join the community chat and ask questions! Using CU: https://localhost:6363 AOS Client Version: 2.0.4. 2024 Type "Ctrl-C" twice to exit Your AOS process: 4_zQY9ZhaiiODch4r1YCUKQWq6-CQcs1TdJc3AQHzQY ``` 2. Give balance to test address via AOS ```bash [email protected][Inbox:1]> Balances[ao.id] = Balances[ao.id] - 1000000 { "_e": 1, "Message-Id": "7zOtAV2QWo4aqSvtZnoNAt6xM22x48jSK-cKtfSUZ4s", "From": "TeWsA2tuo4aFnhWy-ZiP5t2FYXLisp3s4KagrX9LXEI", "Action": "Eval", "Timestamp": 1741618445018} [email protected][Inbox:1]> Balances["trkCV2r8suvQYcEgJBKAspcx0oVFCrDOhd7aU-VXmDo"] = 1000000 { "_e": 1, "Message-Id": "pwxdD4vpoJXOKa0crdyuEz-6KJr0w6L_vOOs43h3Ol0", "From": "TeWsA2tuo4aFnhWy-ZiP5t2FYXLisp3s4KagrX9LXEI", "Action": "Eval", "Timestamp": 1741618468668} ``` 3. Load the patch file ```bash [email protected][Inbox:1]> .load patches/2025-03-10-create-primary-name-request-demand-factor.lua Loading... patches/2025-03-10-create-primary-name-request-demand-factor.lua ``` 4. Request a primary name with the test wallet ```bash ❯ ar.io request-primary-name --name ao --cu-url http://localhost:6363 --ario-process-id 4_zQY9ZhaiiODch4r1YCUKQWq6-CQcs1TdJc3AQHzQY --wallet-file test-wallet.json ✔ Are you sure you want to request the primary name ao? … yes { "id": "5qpKoQvJYkfrrxd7JGLrqSe2eTS9zpMJONLYh-EnoAQ", "result": { "request": { "name": "ao", "endTimestamp": 1742223323568, "startTimestamp": 1741618523568 }, "fundingPlan": { "stakes": [], "address": "trkCV2r8suvQYcEgJBKAspcx0oVFCrDOhd7aU-VXmDo", "balance": 1000000, "shortfall": 0 }, "baseNameOwner": "HY021r2MQL9Zi0qSNFAQ9QRshIc2mNPYf65pZBP04cE", "demandFactor": { "trailingPeriodPurchases": [ 0, 0, 0, 0, 0, 0, 0 ], "fees": [ 1000000000000, 200000000000, 20000000000, 10000000000, 2500000000, 1500000000, 800000000, 500000000, 400000000, 350000000, 300000000, 250000000, 200000000, 200000000, 200000000, 200000000, 200000000, 200000000, 200000000, 200000000, 200000000, 200000000, 200000000, 200000000, 200000000, 200000000, 200000000, 200000000, 200000000, 200000000, 200000000, 200000000, 200000000, 200000000, 200000000, 200000000, 200000000, 200000000, 200000000, 200000000, 200000000, 200000000, 200000000, 200000000, 200000000, 200000000, 200000000, 200000000, 200000000, 200000000, 200000000 ], "currentPeriod": 1, "trailingPeriodRevenues": [ 0, 0, 0, 0, 0, 0, 0 ], "revenueThisPeriod": 1000000, "currentDemandFactor": 1, "purchasesThisPeriod": 1, "consecutivePeriodsWithMinDemandFactor": 0 }, "fundingResult": { "newWithdrawVaults": [], "totalFunded": 1000000 } } } ``` 5. Review the event data [TODO]
- Loading branch information