Create minimal data seeding script for local dev bootstrap #197
Closed
opened 2024-12-02 16:47:21 +01:00 by lash
·
2 comments
No Branch/Tag Specified
master
phone-ussd
lash/stalecache
lash/purify-max
postgres-switch-for-tests
copy-language-code
lash/purify-more
account-pin-block-v2
lash/helpcomma
send-input-fix
lash/gettext
lash/dump-format
account-pin-block
lash/ssh-fixes
lash/ssh-4
log-session-id-at-sessionid
lash/purify
logs-at-sessionid
language-change-fix
hash-pin
menu-primary-selectors
lash/dump-key-prefix
force-restart-state
restart-state-devtool
mixed-languages
add-space-after-colon
link-terms-and-conditions
lash/store-dumper
back-state-check
double-session-id
profile-edit-traverse
data-items-cleanup
minor-bug-fixes
lash/persister-freakout
trigger-balance-reload
lash/no-persister-deadlock
voucher-details
single-error-node
sohail/trace-build-29-11
alias-address-validation
sohail/upgrade-deps
account-statement
sohail/docker-build
menu-balances
send-node
profile-edit-show
terminal-logs
readme-documentation
africastalking-endpoint
http-logs
log-file
swahili-templates-menu
api-error-fix
lash/export-to-term
pre-mock-remove
remove-db-mocks
pin-reset
tests-refactor
consolidate-temp-data-storage
profile-update-pin-check
voucher-data
lash/reverse-session
address-sessionId
menu-voucherlist
api-context
api-structs
send-menu-update
check-balance-update
postgres-switch
menu-api-errors
menu-traversal-v2
psql-switch
menu-traversal-refactor
menu-traversals
lash/subprefix
tests-update
menu-profile-edit
fix-repeated-nodes
wip-menu-select-fix
lash/ssh
go-vise-0.2.0
wip-main-refactor
at-return-output
wip-unit-tests
wip-pin-guard
change-language
wip-menu-help
wip-pin-reset
lash/vise-make-var
lash/async-driver
menu-options
unit-tests
wip-code-check
lash/draft-dev-0.1.0
wip-go-vise-dev-0.1.0
wip-flag-migration
v0.8.0-beta.11
v0.8.0-beta.10
v0.8.0-beta.9
v0.8.0-beta.8
v0.8.0-beta.7
v0.8.0-beta.6
v0.8.0-beta.5
v0.8.0-beta.4
v0.8.0-beta.3
v0.8.0-beta.2
v0.8.0-beta
v0.7.0-beta
v0.6.0-beta
v0.5.0-beta
v0.4.0-beta
v0.3.0-beta
v0.2.0-beta
v0.1.2-beta
v0.1.1-beta
v0.1.0-beta
Labels
Clear labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
cleanup
devops
documentation
easypeasy
exchange
i18n
legacy
meta
migration
optimization
privilege
refactor
smell
support
tooling
ux
Breaking change that won't be backward compatible
Something is not working
Documentation changes
Improve existing functionality
New functionality
This is security issue
Issue or pull request related to testing
Priority
Critical
The priority is critical
Priority
High
The priority is high
Priority
Low
The priority is low
Priority
Medium
The priority is medium
Reviewed
Confirmed
Issue has been confirmed
Reviewed
Duplicate
This issue or pull request already exists
Reviewed
Invalid
Invalid issue
Reviewed
Won't Fix
This issue won't be fixed
Status
Abandoned
Somebody has started to work on this but abandoned work
Status
Blocked
Something is blocking this issue or pull request
Status
Need More Info
Feedback is required to reproduce issue or to continue work
Activity
Doing
An item actively being worked on currently
Activity
Hold
Not being actively worked on
Activity
Proposal
A proposal for a new feature or enhancement
Activity
QA
Ready for QA testing
Activity
Validate
Dev team validating changes
Runner
AT
Runner
CLI
Runner
HTTP
Runner
SSH
A task that can be completed with little effort
relating to swapping of assets and offramps
Languages and translations
Legacy features from the old ussd system to be ported
container for other issues
features that have to do with special, privileged axx
Code smell
transparency and help with exception states
Milestone
No items
No Milestone
Projects
Clear projects
No project
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: urdt/ussd#197
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
needs data-seeding-ng parts to be completed,
should bring up enough vouchers, accounts and transfers to have fully working menus for at least two accounts.
Data seeding proceedure
1.Setup
Prerequistes
1.Custodial stack
2. Ge-publish
3. Cast
4. Seed commands parser
1.Custodial stack
You should be able to run a local instance of the GE custodial stack to be able to perform GE related api calls.
2.Ge-publish
A CLI tool that lets you publish GE related smart contracts to any EVM chain.To install:
Note: You will need to re-publish all the GE smart contracts as defined here to get the required contract addresses ,if using any other testnet that is not Celo Alfajores testnet.
3.Cast
The data seeding parser relies heavily on Cast to interact with deployed smart contracts and it MUST be installed.To install:
4.Seed commands parser
You will need a parser to run your data seeding commands:
Then:
Environment variables
Inside your
env,you can define your own testnet configurations or use the default values.MASTER_PRIVATE_KEY:Private key with custodial permissions (atleast the key should be able to add a new token to the token index )
CHAIN_ID:Specific identifier for a specific blockchain network
Default:
44787.RPC:Rpc endpoint from the node provider
Default:
https://alfajores-forno.celo-testnet.org/.GAS_FEE_CAP:Default:
35000000000.GAS_TOP_UP:Amount of gas to topup each newly generated accounts.
Default:
0.01etherTOKEN_INDEX:Address to token index smart contract
Default:
0xD774bc082003eaF8DF74eEcD43AD44F03D488418BEARER_TOKEN:Token required to perform custodial api calls.
2.Define your data seeding commands:
1.using pre-defined seeding commands
It is only possible to run commands defined inside a file.To get started with an initial set of seed commands, create a text file and copy the below commands into it.
Example: custodial_seed_commands.txt
2.Defining your custom data seeding commands
You can create your own set of vouchers,keys and transactions by following the instruction signatures defined here
3.Executing the commands:
If you are working with a virtual environment (recommended for isolating dependencies), follow these steps:
1.Skip step if you have virtual env installed
4.Install the required python packages
To run your script,pass the path to the file where your seed commands are defined as an argument.
Note: If you have multiple versions of Python installed, make sure you're using the correct version (for example, python3 for Python 3.x).
@kamikazechaser where do we put docs like this?