Comments (10)
yeah merging a trustline may mean many things depending on the asset type (in some cases you want to send back to the issuer, in others send to the destination account). I'd rather have explicit business logic to deal with this than guess at the protocol layer (and potentially cause grief).
from stellar-protocol.
I mean, right now payments really mean "Send this exact amount to account" I want a payment that is "Send at most this amount to account"
So it won't fail if there isn't enough. This is a super set of "drain balance into X account" since you can just set amount=MAX_INT
from stellar-protocol.
Shouldn't you just need 1 transaction with 4 operations?
from stellar-protocol.
No. Depending on a stage we're in, account may have trust lines (or not) or have credit assets (or not).
from stellar-protocol.
I don't understand why that's an issue: If they don't have trustlines, don't remove them, just do the account merge. If they have trustlines send the money to wherever they want in an operation that occurs before the account merge.
from stellar-protocol.
Well, we're doing this now but for more complicated processes you basically end up with bunch of transactions (and bunch of code to create them). You also need to know exact amount of asset you have to send them back and sometimes it's not possible to determine.
Let's say I'm OK with the current solution but with forced account_merge
it would be just way easier.
from stellar-protocol.
What situation requires more than one transaction?
My concern is that people will not understand the ramifications of performing a forced merge. Indeed, the entire concept of account merging is something that IMO we will need to hide from end users: My hunch is that people just want to close their accounts... they don't care about the technicalities beyond "where is my money going when I close this?"
Frankly, if a developer is merging and account on behalf of an end user I think it is strictly better if we make them drain the account manually. Closing an account shouldn't be easy enough that you put at risk the certainty of what is going to happen when you close the account.
IMO a safer solution would be to build a comprehensive document titled "Every dirty little secret you need to know when closing a stellar account" or something similarly cheeky ;)
from stellar-protocol.
I think the issue bartek is having is that the account you are trying to merge back in can be in several states. and the merge operations have to be presigned by the client so the server can't just look at the state of the account and craft the merge (since the server doesn't have the secret)
But, I'm still not sure we should have this operation. It seems too heavy handed. I could buy having an operation that sends as much of an asset as it can rather than failing if the account doesn't have enough. I could see that being useful in a lot of contexts
from stellar-protocol.
But, I'm still not sure we should have this operation. It seems too heavy handed. I could buy having an operation that sends as much of an asset as it can rather than failing if the account doesn't have enough. I could see that being useful in a lot of contexts
A "drain balance into X account" operation?
from stellar-protocol.
Closing as is but someone could reopen with a "Send at most this amount to account" operation
from stellar-protocol.
Related Issues (20)
- SEP-9: add proof_of_liveness field HOT 1
- Transfer SEPs: add optional `refund_account` attribute to transaction initiation requests HOT 2
- SEPs (6, 12, 24, 31): Update callback header from `X-Stellar-Signature` to `Signature` HOT 4
- SEP-9: define a generalized account identifier format HOT 4
- SEP-9: add `bank_account_type` field HOT 2
- SEP-6: /deposit and /withdraw IDs should map to list of transactions rather than a single transaction HOT 22
- SEP-24: make `account` for deposit request optional to match withdraw request
- Add SEP for Soroban token interface HOT 1
- Nice
- SEP-7: thoughts on using "web+stellar://" instead of "web+stellar:"? HOT 1
- SEP-6: standardize structured off-chain deposit instructions for users HOT 1
- SEP-6: Providing deposit instructions asynchronously
- security HOT 1
- SEP-24: Layered fee structure HOT 1
- SEP-24: Configure fees by payment method HOT 1
- SEP-9: support `organization.referrer`
- Add deviation parameter instead of pure uniform periods HOT 8
- Support for `memo` field in SEP-9 Financial Account Fields
- Prettier SEP CI workflow failing suddenly HOT 1
- Blog
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 stellar-protocol.