Create minimal data seeding script for local dev bootstrap #197
Labels
No Label
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
Activity
Doing
Activity
Hold
Activity
Proposal
Activity
QA
Activity
Validate
Runner
AT
Runner
CLI
Runner
HTTP
Runner
SSH
cleanup
devops
documentation
easypeasy
exchange
i18n
legacy
meta
migration
optimization
privilege
refactor
smell
support
tooling
ux
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: urdt/ussd#197
Loading…
Reference in New Issue
Block a user
No description provided.
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.01ether
TOKEN_INDEX
:Address to token index smart contract
Default:
0xD774bc082003eaF8DF74eEcD43AD44F03D488418
BEARER_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?