Comments (1)
Changes
I am expecting the VaultId
to contain the AccountId
for the stash key, the control key will be defined separately.
- Add
control: AccountId
to theVault
struct - Ensure
origin
ofregister_address
is signed by thecontrol
account - Ensure
origin
ofaccept_new_issues
is signed by thecontrol
account - Ensure
origin
ofrequest_replace
is signed by thecontrol
account - Ensure
origin
ofwithdraw_replace
is signed by thecontrol
account - Ensure
origin
ofaccept_replace
is signed by thecontrol
account - Ensure
origin
ofcancel_replace
is signed by thecontrol
account
Since the VaultId
will comprise the stash account (to minimize changes and since the control account may change) any function which checks the validity of the origin
for the control account should require either a stash_id
parameter for lookup and comparison or we may decide instead to define a separate storage map in the vault-registry
.
Migration
Follow this implementation to iterate through all Vaults in storage and set the control
key as the stash
(VaultId
) key.
Other Notes
Extrinsics which target nomination / staking & rewards will use the stash key by default, if we want a running Vault (signing with the control key) to be able to claim rewards on behalf of the stack account we may want to consider an alternate approach.
Related reading: https://docs.substrate.io/v3/concepts/account-abstractions/
Client Changes
I would expect the client changes to be largely incidental to most users. That is for auto-registration, the current Vault should use the same key for both control and stash. The front-end Vault dashboard should allow advanced registration for the stash account to explicitly set the control key.
from interbtc.
Related Issues (20)
- Allow sending of arbitrary xcm messages
- Add support for `rust-bitcoin` in ink! smart contracts HOT 4
- Runtime for testing Bitcoin smart contracts HOT 1
- Add EVM precompiles
- upgrade to polkadot v1.0.0 HOT 2
- Parachain peers HOT 1
- qToken Vaults
- EVM Compatibility
- Rust smart contracts via ink! and the contract pallet
- Remove griefing collateral from mandatory replace request HOT 1
- Benchmarking for sudo pallet
- Usage of longest-chain instead of most-work HOT 2
- Add XCM Test
- Set the max PoV size
- Add update_inflation extrinsic in supply pallet HOT 1
- InsufficientVaultCollateralAmount error when trying to withdraw an amount takes the vault below MinimumCollateral HOT 1
- Version number displayed is wrong HOT 1
- Building raw spec for interlay-dev
- Supply inflation hook is wrong
- Build error at `crates/bitcoin`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from interbtc.