Dipper-Protocol

module
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 8, 2020 License: Apache-2.0

README

Dipper-Protocol

the next generation of basic finance protocol.

Quick start

To build a private blockchain, if you want to jion our testnet or get more detail, you can click this link.

1.0 install

cd Dipper-Protocol
make install

1.1 Initialize configuration files and genesis file

dipd init dipd-official --chain-id dipd-chain
NOTE: If you have run the tutorial before, you can start from scratch with 
dipd unsafe-reset-all
or by deleting both of the home folders
rm -rf ~/.dip*

1.2 Add both accounts, with coins to the genesis file

dipcli keys add alice
dipcli keys add bob
dipd add-genesis-account $(dipcli keys show alice -a) 10000000000000000pdip
dipd add-genesis-account $(dipcli keys show bob -a) 10000000000000000pdip

1.3 create validator

dipd gentx --amount 1000000pdip --commission-rate "0.10" --commission-max-rate "0.20" --commission-max-change-rate "0.10" --pubkey $(dipd tendermint show-validator) --name alice

1.4 collect gentx

dipd collect-gentxs

1.5 Configure your CLI to eliminate need for chain-id flag

dipcli config chain-id dipd-chain
dipcli config output json
dipcli config indent true
dipcli config trust-node true
dipd start --log_level "*:debug" --trace
curl http://127.0.0.1:26657/status

1.6 transfer asset

dipcli send --from $(dipcli keys show bob -a)  --to $(dipcli keys show alice -a) --amount 1000000000000pdip

1.7 query account

dipcli query account  $(dipcli keys show jack -a)
dipcli query account  $(dipcli keys show alice -a)

Smart contract property

2.1 deploy contract

dipcli vm create --code_file=./contract/demo/demo.bc --abi_file=./contract/demo/demo.abi --from $(dipcli keys show -a alice) --args '' --amount=0pdip --gas=1000000

2.2 query txhash

dipcli query tx <txhash>

2.3 query contract code

dipcli query vm code <contract address>

2.4 call contract method

dipcli vm call --from $(dipcli keys show -a alice) --contract_addr=dip1jd8jqhnruunhrxh75da02dm7fr29cdkqtq8wmq --abi_file ./contract/demo/demo.abi --method=transfer --args 'dip1dcu73lw9uqkygpde4z4z22f079skta49vxs2r0 10'  --amount 0pdip --gas 2000000

2.5 call contract method, such as balanceOf

dipcli query account dip1gtp5xtfnuqpw3dgaxqdk3n8m6d9t4uvwwqt6ms

2.6 call contract method, such as query alice money

dipcli query vm call $(dipcli keys show -a alice) dip1gcwk24al08lul80aejyq409mjgtqfu9uhgwtw4 balanceOf ./contract/demo/demo.abi --args "dip16g54d2akrlln48j5p7gcv4nucfzdn2zsxe54j4" --amount 0pdip

Directories

Path Synopsis
app
Package baseapp contains data structures that provide basic data storage functionality and act as a bridge between the ABCI interface and the SDK abstractions.
Package baseapp contains data structures that provide basic data storage functionality and act as a bridge between the ABCI interface and the SDK abstractions.
simapp/params
Package params defines the simulation parameters in the simapp.
Package params defines the simulation parameters in the simapp.
v0
v0/auth
nolint autogenerated code using github.com/rigelrozanski/multitool aliases generated for the following subdirectories:
nolint autogenerated code using github.com/rigelrozanski/multitool aliases generated for the following subdirectories:
v0/auth/types
nolint noalias
nolint noalias
v0/bank
nolint autogenerated code using github.com/rigelrozanski/multitool aliases generated for the following subdirectories:
nolint autogenerated code using github.com/rigelrozanski/multitool aliases generated for the following subdirectories:
v0/crisis
nolint autogenerated code using github.com/rigelrozanski/multitool aliases generated for the following subdirectories: ALIASGEN: github.com/Dipper-Labs/Dipper-Protocol/app/v0/crisis/types
nolint autogenerated code using github.com/rigelrozanski/multitool aliases generated for the following subdirectories: ALIASGEN: github.com/Dipper-Labs/Dipper-Protocol/app/v0/crisis/types
nolint
nolint
v0/distribution/types
nolint nolint
nolint nolint
v0/genaccounts
nolint autogenerated code using github.com/rigelrozanski/multitool aliases generated for the following subdirectories:
nolint autogenerated code using github.com/rigelrozanski/multitool aliases generated for the following subdirectories:
v0/genutil
nolint autogenerated code using github.com/rigelrozanski/multitool aliases generated for the following subdirectories:
nolint autogenerated code using github.com/rigelrozanski/multitool aliases generated for the following subdirectories:
v0/gov
nolint autogenerated code using github.com/rigelrozanski/multitool aliases generated for the following subdirectories:
nolint autogenerated code using github.com/rigelrozanski/multitool aliases generated for the following subdirectories:
v0/gov/legacy/v0_34
DONTCOVER nolint
DONTCOVER nolint
v0/gov/types
nolint
nolint
v0/mint
nolint autogenerated code using github.com/rigelrozanski/multitool aliases generated for the following subdirectories: ALIASGEN: github.com/Dipper-Labs/Dipper-Protocol/app/v0/mint/internal/keeper ALIASGEN: github.com/Dipper-Labs/Dipper-Protocol/app/v0/mint/internal/types
nolint autogenerated code using github.com/rigelrozanski/multitool aliases generated for the following subdirectories: ALIASGEN: github.com/Dipper-Labs/Dipper-Protocol/app/v0/mint/internal/keeper ALIASGEN: github.com/Dipper-Labs/Dipper-Protocol/app/v0/mint/internal/types
v0/mint/internal/keeper
nolint:deadcode unused
nolint:deadcode unused
v0/simulation
Package simulation implements a full fledged Cosmos SDK application used for executing simulation test suites.
Package simulation implements a full fledged Cosmos SDK application used for executing simulation test suites.
v0/slashing
nolint autogenerated code using github.com/rigelrozanski/multitool aliases generated for the following subdirectories: ALIASGEN: github.com/Dipper-Labs/Dipper-Protocol/app/v0/slashing/types nolint
nolint autogenerated code using github.com/rigelrozanski/multitool aliases generated for the following subdirectories: ALIASGEN: github.com/Dipper-Labs/Dipper-Protocol/app/v0/slashing/types nolint
nolint
nolint
nolint: golint
nolint: golint
nolint autogenerated code using github.com/rigelrozanski/multitool aliases generated for the following subdirectories: ALIASGEN: github.com/Dipper-Labs/Dipper-Protocol/client/context ALIASGEN: github.com/Dipper-Labs/Dipper-Protocol/client/flags ALIASGEN: github.com/Dipper-Labs/Dipper-Protocol/client/keys ALIASGEN: github.com/Dipper-Labs/Dipper-Protocol/client/lcd ALIASGEN: github.com/Dipper-Labs/Dipper-Protocol/client/rest ALIASGEN: github.com/Dipper-Labs/Dipper-Protocol/client/rpc ALIASGEN: github.com/Dipper-Labs/Dipper-Protocol/client/tx ALIASGEN: github.com/Dipper-Labs/Dipper-Protocol/client/utils ALIASGEN: github.com/Dipper-Labs/Dipper-Protocol/client/input
nolint autogenerated code using github.com/rigelrozanski/multitool aliases generated for the following subdirectories: ALIASGEN: github.com/Dipper-Labs/Dipper-Protocol/client/context ALIASGEN: github.com/Dipper-Labs/Dipper-Protocol/client/flags ALIASGEN: github.com/Dipper-Labs/Dipper-Protocol/client/keys ALIASGEN: github.com/Dipper-Labs/Dipper-Protocol/client/lcd ALIASGEN: github.com/Dipper-Labs/Dipper-Protocol/client/rest ALIASGEN: github.com/Dipper-Labs/Dipper-Protocol/client/rpc ALIASGEN: github.com/Dipper-Labs/Dipper-Protocol/client/tx ALIASGEN: github.com/Dipper-Labs/Dipper-Protocol/client/utils ALIASGEN: github.com/Dipper-Labs/Dipper-Protocol/client/input
lcd
rpc
cmd
keys/hd
Package hd provides basic functionality Hierarchical Deterministic Wallets.
Package hd provides basic functionality Hierarchical Deterministic Wallets.
sim
module
Package module contains application module patterns and associated "manager" functionality.
Package module contains application module patterns and associated "manager" functionality.
rest
Package rest provides HTTP types and primitives for REST requests validation and responses handling.
Package rest provides HTTP types and primitives for REST requests validation and responses handling.
Package version is a convenience utility that provides SDK consumers with a ready-to-use version command that produces apps versioning information based on flags passed at compile time.
Package version is a convenience utility that provides SDK consumers with a ready-to-use version command that produces apps versioning information based on flags passed at compile time.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL