The walletFactory
contract provisions and manages smart wallets.
There can be zero or one wallets per Cosmos address.
1 Address : 0/1 Bank
1 Address : 1 myAddressNamesAdmin
1 Bank : 0/1 Wallet
By design there's a 1:1 across all four.
namesByAddress
and board
are shared by everybody.
myAddressNamesAdmin
is from the account you provision.
See the Attackers Guide for security requirements.
Product requirements:
Each of the above has to work over two channels:
Non-requirements:
There are no automated tests yet verifying the smart wallet running on chain. Here are procedures you can use instead.
# freshen sdk
cd agoric-sdk
yarn install && yarn build
# tab 1 (chain)
cd packages/cosmic-swingset/
make scenario2-setup scenario2-run-chain
# starts bare chain, don’t need AMM
# tab 2 (client server)
cd packages/cosmic-swingset/
make scenario2-run-client
# confirm no errors in logs
# tab 3 (interactive)
agoric open --repl
# confirm in browser that `home.wallet` and `home.smartWallet` exist
agd query vstorage keys 'published.wallet'
# confirm it has a key like `published.wallet.agoric1nqxg4pye30n3trct0hf7dclcwfxz8au84hr3ht`
agoric follow :published.wallet.agoric1nqxg4pye30n3trct0hf7dclcwfxz8au84hr3ht
# confirm it has JSON data