🚀 What happens when we merge Stellar accounts?
Did Alice account gone or still there? Did Bob still Bob? moon?
- Will we lost replaced account history?
- Can we merge activated account to unactivated account?
- Did Alice data merge to Bob data? Overwrite Bob data?
- Can we merge multi-sig account with activated account? How?
- Can we merge multi-sig account with multi-sig account? How?
- Can we prevent account from merging? How?
- (Form reddit) What happens with issued assets if you remove the issuer by merging?
Let’s find out! Now go to Stellar lab for test net and funding the accounts.
Create Alice account (+10,000XLM)
Public Key GA3TMHASYEZAFGGPVHVRQJSEVSYTJPMI5P32SAZZG5WZ262T5JJ6YYUX
Secret Key SA53NUOKSV3Y247ICLWFZNH3N5JP7JYGLA63UWSDF4XQFY6LQCOSNX6Y
Create Bob account (+10,000XLM)
Public Key GC2BPTOTVQ7UMPC2WYUPP3ABQZBSBV6D2YLARYBQYRSQLFMQJ66IRGE4
Secret Key SAQVRSJTSNO4CILPXXVR3KG6YMD5Y56IR3XUM5EH4JQHMMHMB4ANSZXI
Create Cat account (+10,000XLM)
Public Key GAGPBFTZFMTG7FWREWH2IDN263GXGILUC4LEFLN3BLLSTUCMWMC6WULU
Secret Key SBJNNYJQLTXZFUALBDC5E2QZAPV3JSDCJOIHYXBQXYUP5JDKF6GMTIIS
Question #1 — Will we lost replaced account history?
Let’s make some history by make a payments with 2 operations
- 1,000 XLM from Alice to Bob with “FOO” as memo
- 1,000 XLM from Alice to Cat with “FOO” as memo
- 500 XLM from Alice to Cat with “BAR” as memo
Then merge Alice to Bob
Alice account appear 404, Bob take all money, Cat still remember Alice ID but she is gone…poor Alice. All history attach to her is gone (not true! see update from reddit below) but history on other account still remain.
UPDATE : Alice account is gone 404 but her history still there forever, yeah! Alice history is here https://www.stellar.org/laboratory/#explorer?resource=effects&endpoint=for_account&values=eyJhY2NvdW50X2lkIjoiR0EzVE1IQVNZRVpBRkdHUFZIVlJRSlNFVlNZVEpQTUk1UDMyU0FaWkc1V1oyNjJUNUpKNllZVVgifQ%3D%3D&network=test
Question #2 — Can we merge activated account to unactivated account?
Create Dog account (0 XLM)
Public Key GATZLBQUVOIDL24HOHAMTVCNM5YHZJHIWVUNKOWSB2TPSYCH4NFNLTRE
Secret Key SAVHUVVZGMXQE4EXLJ7CFENTZMKZNWZV536MRSGQH6UOR4R4S4FYIKH2
Then merge Bob to Dog
Bob refuse to merge with empty Dog and return op_no_account, wise choice Bob!
Question #3 — Did Alice data merge to Bob data? Overwrite Bob data?
Public Key GARQGJEDJGMRYNVZGBF7PON4HNCGGYR23NMPUXBXXX3AX2CIZ5Z2MRSM
Secret Key SCJZUWZL42UXT34JCHXWF7CE5NKD7TYSPKKQHANYWCEPJZZJVYZECATE
With her data
Public Key GAHQG767G5WR66W7W2WZ7ZR6DDDJXWUOY3SHIJT3OWPGQF5EMK7MQ6W4
Secret Key SD7OWHLU5GD4J4WLUOLK22TOYA3C3BBQ3LTHAINDOHI5NHYPRA25V2E2
With his data
Then merge Alice to Bob
Bob refused to get merge and return op_has_sub_entries and we will need to clean Alice subentries (trustlines, offers, data) first!
For question 4, 5, 6, 7 You’ll need to figure it out by yourself or donate below to let me reveal the answers 🚀, all donation belong to my cats food! 🐈