Skip to content

How do I check if an account has opted in to direct transfer? #21

Answered by 0xaptosj
0xaptosj asked this question in Questions
Discussion options

You must be logged in to vote

You can tell if an account has opted-in to direct transfer by looking at the 0x3::token::TokenStore resource on their account. For example, using curl:

curl https://fullnode.mainnet.aptoslabs.com/v1/accounts/0x232098630cfad4734812fa37dc18d9b8d59242feabe49259e26318d468a99584/resource/0x3::token::TokenStore

This curl above means "get me the 0x3::token::TokenStore resource on account 0x232098630cfad4734812fa37dc18d9b8d59242feabe49259e26318d468a99584.

The output (run through jq):

{
  "type": "0x3::token::TokenStore",
  "data": {
    "burn_events": {
      "counter": "0",
      "guid": {
        "id": {
          "addr": "0x232098630cfad4734812fa37dc18d9b8d59242feabe49259e26318d468a99584",
   …

Replies: 2 comments

Comment options

0xaptosj
Mar 6, 2024
Maintainer Author

You must be logged in to vote
0 replies
Answer selected by 0xaptosj
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
move Questions related to the Move Language
2 participants