Skip to content

keypom/account-factory

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Account Factory Contract

Simplified and owner controlled version of create_account from Linkdrop Contract.

Quick How To / Testing

  1. Build the contract locally
  2. Login to [YOUR_ACCOUNT_FACTORY_ID] using near-cli
near login
  1. Deploy the wasm ./res/account_factory.wasm
near deploy [YOUR_ACCOUNT_FACTORY_ID] ./res/account_factory.wasm

// init the contract
near call [YOUR_ACCOUNT_FACTORY_ID] new --accountId=[YOUR_ACCOUNT_FACTORY_ID]
  1. This account is the owner which can add approved_creators
  2. Add an approved creator
near call [YOUR_ACCOUNT_FACTORY_ID] add_approved_creator '{"account_id":"[SOME_APPROVED_CREATOR_ACCOUNT_ID]"}' --accountId=[YOUR_ACCOUNT_FACTORY_ID]
  1. Login to [SOME_APPROVED_CREATOR_ACCOUNT_ID] using near-cli
near login
  1. Create an account from the approved creator account
near call [YOUR_ACCOUNT_FACTORY_ID] create_account '{"new_account_id":"foo.testnet","new_public_key":"ed25519:BonsbmfRMRNzRwn92827kfGCwkNLjNDritF1LwrbZKn2"}' --deposit=1 --accountId=[SOME_APPROVED_CREATOR_ACCOUNT_ID]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published