metaplex-foundation / metaplex

A directory of what the Metaplex Foundation works on!
https://metaplex.com
Apache License 2.0
3.31k stars 6.27k forks source link

Gumdrop mainnet bug #1110

Closed cultureofwomen closed 2 years ago

cultureofwomen commented 2 years ago

I created a gumdrop successfully today where I create a drop for over 100 users. Now I am trying to create another drop of over 1000 users but getting this error. Any idea how to fix it?

ts-node gumdrop-cli.ts create -e mainnet-beta --transfer-mint TA -k /Users/rklo/Desktop/Anna/Dev/website-mint/metaplex/\~config/solana/devnet-test.json --claim-integration transfer --distribution-method wallets --distribution-list /Users/rklo/Desktop/Anna/Dev/CoW-Token/gumdrop/whitelist.json --log-level debug
setting the log value to: debug
Parsed options: {
  env: 'mainnet-beta',
  keypair: '/Users/rklo/Desktop/Anna/Dev/website-mint/metaplex/~config/solana/devnet-test.json',
  host: 'https://lwus.github.io/gumdrop',
  transferMint: 'TA’,
  claimIntegration: 'transfer',
  distributionMethod: 'wallets',
  distributionList: '/Users/rklo/Desktop/Anna/Dev/CoW-Token/gumdrop/whitelist.json',
  logLevel: true
}
wallet public key: AXcdDYokznEhghgLfW9JkcwEbuJvXu2dnPydRf
temporal signer: gdrpGjVDRrQmySw4aTHr8a3xmQzzxSwFD1a
(node:5230) UnhandledPromiseRejectionWarning: Error: Number can only safely store up to 53 bits
    at assert (/Users/rklo/Desktop/Anna/Dev/CoW-Token/gumdrop/metaplex/js/packages/cli/node_modules/bn.js/lib/bn.js:6:21)
    at BN.toNumber (/Users/rklo/Desktop/Anna/Dev/CoW-Token/gumdrop/metaplex/js/packages/cli/node_modules/bn.js/lib/bn.js:547:7)
    at /Users/rklo/Desktop/Anna/Dev/CoW-Token/gumdrop/metaplex/js/packages/cli/src/helpers/gumdrop/claimant.ts:205:48
    at step (/Users/rklo/Desktop/Anna/Dev/CoW-Token/gumdrop/metaplex/js/packages/cli/src/helpers/gumdrop/claimant.ts:52:23)
    at Object.next (/Users/rklo/Desktop/Anna/Dev/CoW-Token/gumdrop/metaplex/js/packages/cli/src/helpers/gumdrop/claimant.ts:33:53)
    at fulfilled (/Users/rklo/Desktop/Anna/Dev/CoW-Token/gumdrop/metaplex/js/packages/cli/src/helpers/gumdrop/claimant.ts:24:58)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:5230) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:5230) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
lwus commented 2 years ago

This looks like it's just a bug in the CLI. Are you sending over 2**53 tokens out? The validation math should use BN,

cultureofwomen commented 2 years ago

@lwus I am trying to send 10M tokens. So 10k tokens per user to 1k users.

lwus commented 2 years ago

Oh I see, this is because including decimals there are over that 2**53 in your ATA. I switched the logic to use BN there on https://github.com/lwus/metaplex/tree/gumdrop/cm-tokens

Also FYI gumdrop does not add decimals for you for the token transfers so you'll need to manually specify the extra 0s

cultureofwomen commented 2 years ago

@lwus thanks for the quick reply but I am still getting this error

Create failed
Error: Number can only safely store up to 53 bits

The token is CVj6FV4HmhEsn7xQXCjj5iqbDQHB7hQ8AwZjB6P8UMDu

I am running using http://localhost:3000/gumdrop/create

Here is the whitelist file that I am using: [ { "handle": "EzVKMAKQVxW2kTDJd1j9B4i7J2x3DrJF8eNJK1DiTfwV", "amount": 1000000000000 }, { "handle": "9fcJeoyHzviuHpkF2rxRZWoocmebp45CBfir19Jpz5jw", "amount": 1000000000000 }, { "handle": "5eJSsQ78JYkeJYwQSF8ugJkE4gjHHf44cFWkdZ3Mo4ai", "amount": 1000000000000 }, { "handle": "H37wbxDrNAoh1DVGSsEJMkhN3sJfRU8xF9NE5Az12URF", "amount": 1000000000000 }, { "handle": "AGJ8F6y43Naa9pLTQiXPijTLEVhoR3Fjiyc2XZPesr6K", "amount": 1000000000000 }, { "handle": "9o4rERNF1NJbNN5FrzJkfWrhatvr6fP26TMSHPs83yJW", "amount": 1000000000000 }, { "handle": "3rxSMb1zV77ruigewJm4WZGbAe8Z6myhKUtNP2Q5GujJ", "amount": 1000000000000 }, { "handle": "BUEpPBgbsr9f7ZjdNuhXWWbmd9U3TEQGgQbd98vk55tC", "amount": 1000000000000 }, { "handle": "EgUCdsZ8wrcvr9yuRAM6aarbRAwRya7oX91zcPYazUNi", "amount": 1000000000000 }, { "handle": "CqWNQx8Ua75TcQdJQLbjYsvBbQdGPVRMie417FEYTduB", "amount": 1000000000000 }, { "handle": "BBtejFHBBa3dSzvbqvJaiF5JUn4r834hSsNwkkpTxF5a", "amount": 1000000000000 }, { "handle": "D6tCm7V1d6bnrHi5CR8kri7a2HFyuNt9cpSg2VnDpt3f", "amount": 1000000000000 }, { "handle": "BunmYQc12TLwbvyEttm8egwjkW1aMbx5TeKiLdtZNc3z", "amount": 1000000000000 }, { "handle": "6GndaUCBCqgc1vGK94Q3ozoeNiRyXJozhRAYWZuvESQj", "amount": 1000000000000 }, { "handle": "EKzXWveR22DEhzwnQxvZQnJQp6GnS35KyW9rCpaqU7YG", "amount": 1000000000000 }, { "handle": "8eNqDeGY3dGvjHVyot3ZkDbVosV9ofGtPmpa4BgBK8eN", "amount": 1000000000000 }, { "handle": "5SkAYNeZRefS1NN9Vz5khP9QpFKRNfFUZmQWZ9yNjKPQ", "amount": 1000000000000 }, { "handle": "AfUXnziwpGg9TDJ9h21ng7FR9oDtubpivq7D338mD8mu", "amount": 1000000000000 }, { "handle": "DQh8hz7PdntgkKdciHfQ27356w8kknu7bs9yW5ZbPrBg", "amount": 1000000000000 }, { "handle": "5Jc4yFH4y4zSPRPussvZyWqVmPbFoeBvCj8JA9RzQ1G", "amount": 1000000000000 }, { "handle": "EZpdne8jBL7G8bRmSN2Bh5dJKozyu2BFnWaNmtvGHBFW", "amount": 1000000000000 }, { "handle": "CgbKFbLf7a5cnfDpt9tPL58C3c48W8ge4wtU7uCfLs54", "amount": 1000000000000 }, { "handle": "ESzAJLH532wX6RgdvAqepkKjSwBwRMcq1uPvseJkhBxW", "amount": 1000000000000 }, { "handle": "BB6fwpndmM8H5QgiavajZBvdc7zFaQTJcvQ5VKWhVWPq", "amount": 1000000000000 }, { "handle": "B5R1jiE5WAMFGBFfgiueHAoHHQuQAgmPvTCpXH9Tf4E4", "amount": 1000000000000 }, { "handle": "BaWHAcd3DwyJ8xjEFsZpmA2xfY6rT9s9aRf7PUtyK7hf", "amount": 1000000000000 }, { "handle": "B1szGkWTivvZZZpEH6wghZNzG6WXSbGDxSRMyWFVhrt2", "amount": 1000000000000 }, { "handle": "9qMMb7CKUjWG1gg3TpieDSHZqCcYNFKVG6Pf626Z1tho", "amount": 1000000000000 }, { "handle": "7asmcUFkTEduRMtY3XjDJTDHJhKCtEg6p1sqLhDEr4Sg", "amount": 1000000000000 }, { "handle": "BCdtoQ3RbKtJZ8doBRkjjumkHZFMR2wP56qb2d8j9137", "amount": 1000000000000 }, { "handle": "GhH5aaGMopvy5Z8fnQgbj96FeW3hPmwXa1qzXJq5VF9m", "amount": 1000000000000 }, { "handle": "HPpbrQxfGxtgnAKkUPkDENT317rCSvxcgBgXkwDnpYfE", "amount": 1000000000000 }, { "handle": "AeTwVxLqJnVexT283JeQVFr3G3dahqzVLWfCDzXta1HU", "amount": 1000000000000 }, { "handle": "AycM6uWXLmbCYtBwW54AY5AgCrCxwiDWbNEmHYY6am76", "amount": 1000000000000 }, { "handle": "EwuA1KP7DELvoaWtEs6UqBkem1BvPoJUCUwTvVvbKxwG", "amount": 1000000000000 }, { "handle": "5vbDy6avxqe32ErtgXhorGubnsY9yPWhBbyKSFQ4fT4", "amount": 1000000000000 }, { "handle": "BzFFqbkTGg9EwFHzfmFMnKSPFmbD23rnUuRCfPQDrEBq", "amount": 1000000000000 }, { "handle": "EVNWgBUWoh1aBcPyMdvZopeYiq6LWMHarw3W79Cu1DKg", "amount": 1000000000000 }, { "handle": "8wzSq5HivgGinycGHE9uwGyM6hgwexEMvaLkMa2VMx4j", "amount": 1000000000000 }, { "handle": "9wCqAEMT28Df4DJo3Bd2CGUcjVimXP68BHQYcP3XkRcW", "amount": 1000000000000 }, { "handle": "G9cKRvfMhhonRtfATTKj7WYj5oqAf9HeYcnUrQVc6TQs", "amount": 1000000000000 }, { "handle": "Br2ifT2Wp2HTNAAr1oh5a1VVmjKTYVmr1NvicVaawSSm", "amount": 1000000000000 }, { "handle": "6d7Dyxw8McRMKDUKMnYake33uTDm6avejNN7CcXFH2rj", "amount": 1000000000000 }, { "handle": "EM8Afi8NQuspiiYx2H6mAiWCN4LWshqVguFEZjPAgF1g", "amount": 1000000000000 }, { "handle": "EZJmgYvWY7hFJB8RLtszbY1ZHLSr4BLrPFQ7xZetmgj", "amount": 1000000000000 }, { "handle": "EoCwAXYnDM5Z8qTWGpMF6bKHuNB8u3SxvDqo8SpSPSKz", "amount": 1000000000000 }, { "handle": "GmRT4gWxnWinABe46RCS6oKP1J7KvkPkC5iXgwFPi5z2", "amount": 1000000000000 }, { "handle": "E9NJErbwyEELDaZpHp7hSeB9vvz5M33KuCwdpaJCX1m5", "amount": 1000000000000 }, { "handle": "CEHzmxCXTCALoM4QCSjTe12VeR5dqhkged8a6tp3GdGW", "amount": 1000000000000 }, { "handle": "5DaDT4oBDihmTPo33UkTrpKhg9xgSngdad8CCgKXUBHR", "amount": 1000000000000 }, { "handle": "AZ9oN6LBty1uWmG5jXaDfSDEw5kACSQ8dEQWr3y21tuz", "amount": 1000000000000 }, { "handle": "Dniqi61uWL88o6oadh6z2sRGNhujHEkf2pVGbqX4H6cW", "amount": 1000000000000 }, { "handle": "ARsQvPmVSbkRMgtshn6at67JFg4oACWEF7dMWtKKBaoe", "amount": 1000000000000 }, { "handle": "GXBsozABB3qeHN5MiCW5cHXg7D58ibxJcDcmDujrFSEf", "amount": 1000000000000 }, { "handle": "7MtmKtbXk45648sReRDzNbAtUEZDo9BRF3B7oLxy4rHm", "amount": 1000000000000 }, { "handle": "7KDa3WAMhnPHoUptbBGM7AAk2hZQpgokuVxmBuy3xcLU", "amount": 1000000000000 }, { "handle": "38MNAU15y4CN3ZNMxvzo7ZXPahxfWQ3sVpmc9iYatEWS", "amount": 1000000000000 }, { "handle": "55ppJmMaTp8UGt7aKjqTiYcfEu14dyhiK35qYyBM52cT", "amount": 1000000000000 }, { "handle": "6AQHUtgG8fVcVfE9jDHWyirxjLUtZcHXoRfZp2iohVCA", "amount": 1000000000000 }, { "handle": "8gJF3iWQE5UK6RiNUdu7FbBksRh2vexToc6ARPuc2LKx", "amount": 1000000000000 }, { "handle": "EJxGFBnMP48wDaW9FoTTcLsSZ7A267FFxJ3UXj5DYrf8", "amount": 1000000000000 }, { "handle": "J7Dd26ftZKpYmdVVH3fTc1WaNqC91LbwXPrgpZSbxBNV", "amount": 1000000000000 }, { "handle": "CiyCTPxBsSRinSgUm5rYbd9sQKNpGBbY6zA3R4Bptx51", "amount": 1000000000000 }, { "handle": "7mXSLzGKEazt8g3CttynA9WMAAcCbEReWX25ZdaLDBTi", "amount": 1000000000000 }, { "handle": "Aj3e84Rrr7qK2LJVcZgwGCS4veENq7orBWn8b5YN1zds", "amount": 1000000000000 }, { "handle": "2MfUyqq2rANkiWJcT5W9g9uJp1NBXV2yHTHzFvtjvMNF", "amount": 1000000000000 }, { "handle": "7NGFFqhHbTbrw6dqUoWG5YsHi8gEvgJJrSbpoxzuNwhL", "amount": 1000000000000 }, { "handle": "CmucEUXaY5HbR1kNmNf8xZpJbSTzVGW1H4f1aR5DhBhh", "amount": 1000000000000 }, { "handle": "58xkXRwm1mCr1LrX8vzDBS5JEY86UbzShGumQCDx9qMN", "amount": 1000000000000 }, { "handle": "eNTcMNG772tAiYSDEv8GrQSx4EBnmh14dGNSQgAdeFv", "amount": 1000000000000 }, { "handle": "AvoGyefzURigrA6xFM1LWVjZVLcfj9aaETK7T38aG8cU", "amount": 1000000000000 }, { "handle": "J699Js7kwcLqkPWqZ4WjsjPhP3RhU5oc8PbRucX4vJuS", "amount": 1000000000000 }, { "handle": "6CCqvpz5mK92S1pFYHWTFBUtmf3jDwpczENbJZcETWKj", "amount": 1000000000000 }, { "handle": "9CgckmF5EDFvtxPhS8xyG8RpazHqrYV559oQhAoL9PDQ", "amount": 1000000000000 }, { "handle": "4FEj1RgMgdnupb23MffJmUusezcpLhP86FpMYhcWfPje", "amount": 1000000000000 }, { "handle": "83pGk36KBqsDfdiLUsrjx12U2PGouttfGxboWyuRB9Td", "amount": 1000000000000 }, { "handle": "N1QqW5LULxiFVjbDAeDaFNYrGgHY6jUGNGgnh7x9zzN", "amount": 1000000000000 }, { "handle": "CzpXrKEuAUpZG95kS3dBLxFbQNoGZ9pkzhbkeUtBx31p", "amount": 1000000000000 }, { "handle": "5vWi7BWGuXkzzQWQpAmhmECyHREyJTsnn8FVpbPbNWDf", "amount": 1000000000000 }, { "handle": "DtwYZqm5LZ1N2rf5X2XUcJ75QxwLnvWHEgUhZPhRUZEW", "amount": 1000000000000 }, { "handle": "Dv77ckdxY7mMZ7vLrjH2haobvj7JzEGkBPGu1v6tsxSN", "amount": 1000000000000 }, { "handle": "63zGLEYKyv9U7QXhSeGP5cFRMFDurdrrCjeEAWadvnRm", "amount": 1000000000000 }, { "handle": "E3P4fDD27hJ2vcLcxbgRgoKTLkaia2qcp92K3E4GKSbZ", "amount": 1000000000000 }, { "handle": "A8iJmzCvczyXv87w8vRp5YkNDSDUQr8M2M9AFapCLYV6", "amount": 1000000000000 }, { "handle": "8259gpKCcCBi4WeH3dBdn1v4fuiQzdtXMeTAzYTzutjJ", "amount": 1000000000000 }, { "handle": "6cVCdK9ChrRjYEfNjK76uKBvLuMTxMNvyhy8L7Dik1mA", "amount": 1000000000000 }, { "handle": "6vgYxEra8HkMjQunVc9iCnh611eacEu53BNbpQiAEUCE", "amount": 1000000000000 }, { "handle": "5zCcZe51tVbt8xYN6rW9fB9vF8zv4t11w7V1mCcqhcbv", "amount": 1000000000000 }, { "handle": "HEsrEonoFUirR8Vj2cYEMuFxwHxZcw5dYN5wk79Li3iX", "amount": 1000000000000 }, { "handle": "AGqMm2y4B36ep9fKB6hzu9jStfUHiHD6rtep9XVUFcja", "amount": 1000000000000 }, { "handle": "Vf4qZBCB5ZqsbrRvXJ7smnLP9spJzCcJXGS2yEiNv3B", "amount": 1000000000000 }, { "handle": "BKFyJDiTo8FPwNUYRvdXdm5b51ak5kZa6D693diePAHX", "amount": 1000000000000 }, { "handle": "284WvyyB9J9ng6pUmM67hWptCnQAP3BNCV2JxyRsiL2B", "amount": 1000000000000 }, { "handle": "D2eHnAkF9GCeXrwbJCrVCnDAvEt4gVKstvzXgigHyzU4", "amount": 1000000000000 }, { "handle": "F3VvPnYDUYE1easpw1jCMuw4CQ1p4A7JKoPKSMyHbh8N", "amount": 1000000000000 }, { "handle": "9QC42ppxRa7KtBxupbg76M428wTA9tMCEJFM66MVpxcE", "amount": 1000000000000 }, { "handle": "CwYVcP1WY6cYfKyytkM1QvHCuNJwrSTgYz3dgDQaHJkm", "amount": 1000000000000 }, { "handle": "7fSdokjHUxnpaNJ9MeRSZZwfdn4EFLKnXKAwBnFTHj6U", "amount": 1000000000000 }, { "handle": "8i5Kj4bREh8NSteXHahy1BFjT6GfjZobuoWjriGV17vJ", "amount": 1000000000000 } ]

lwus commented 2 years ago

Are you on the gumdrop/cm-tokens branch? And are you using the CLI or the website?

cultureofwomen commented 2 years ago

@lwus

I cloned https://github.com/lwus/metaplex/tree/gumdrop/cm-tokens and then using the localhost website:

git clone https://github.com/lwus/metaplex.git
cd /metaplex/js/packages/gumdrop
yarn start
cultureofwomen commented 2 years ago

I was on the wrong branch previously so I got gumdrop/cm-tokens branch.

But now the website doesn't work so I used CLI and got this new error this time:

Hashes 7 [
  <Buffer d1 9d f9 3acd d5 02 6f 21 7a c4 68 78 6e c8 b4 be d4 0e e3 82 09 d7>
]
(node:21882) UnhandledPromiseRejectionWarning: TypeError: Blob.encode[amount] requires (length 8) Buffer as src
    at Blob.encode (/Users/ghty/Desktop/Anna/Dev/CoW-Token/gumdrop_custom/metaplex/js/node_modules/buffer-layout/lib/Layout.js:2330:13)
    at Structure.encode (/Users/ghty/Desktop/Anna/Dev/CoW-Token/gumdrop_custom/metaplex/js/node_modules/buffer-layout/lib/Layout.js:1272:26)
    at Function.createApproveInstruction (/Users/ghty/Desktop/Anna/Dev/CoW-Token/gumdrop_custom/metaplex/js/packages/cli/node_modules/@solana/spl-token/client/token.js:1584:16)
    at /Users/ghty/Desktop/Anna/Dev/CoW-Token/gumdrop_custom/metaplex/js/packages/cli/src/helpers/gumdrop/claimant.ts:601:13
    at step (/Users/ghty/Desktop/Anna/Dev/CoW-Token/gumdrop_custom/metaplex/js/packages/cli/src/helpers/gumdrop/claimant.ts:52:23)
    at Object.next (/Users/ghty/Desktop/Anna/Dev/CoW-Token/gumdrop_custom/metaplex/js/packages/cli/src/helpers/gumdrop/claimant.ts:33:53)
    at fulfilled (/Users/ghty/Desktop/Anna/Dev/CoW-Token/gumdrop_custom/metaplex/js/packages/cli/src/helpers/gumdrop/claimant.ts:24:58)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:21882) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:21882) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
lwus commented 2 years ago

Reproduced that error with your example and pushed a fix. Thanks for doing this CLI testing

Also potentially we will be deprecating the website for creation in the future.

cultureofwomen commented 2 years ago

@lwus Thanks for your support and building this, really appreciate it!

I was able to process one batch. But with the next batch I am getting the error below. I guess its because someone gave me a wrong SOL address? How do I detect if a SOL address is valid?

(node:26591) UnhandledPromiseRejectionWarning: Error: Invalid claimant wallet handle Error: Invalid public key input
    at /Users/frel/Desktop/Anna/Dev/CoW-Token/gumdrop_custom/metaplex/js/packages/cli/src/helpers/gumdrop/claimant.ts:501:15
    at step (/Users/frel/Desktop/Anna/Dev/CoW-Token/gumdrop_custom/metaplex/js/packages/cli/src/helpers/gumdrop/claimant.ts:52:23)
    at Object.next (/Users/frel/Desktop/Anna/Dev/CoW-Token/gumdrop_custom/metaplex/js/packages/cli/src/helpers/gumdrop/claimant.ts:33:53)
    at /Users/frel/Desktop/Anna/Dev/CoW-Token/gumdrop_custom/metaplex/js/packages/cli/src/helpers/gumdrop/claimant.ts:27:71
    at new Promise (<anonymous>)
    at __awaiter (/Users/frel/Desktop/Anna/Dev/CoW-Token/gumdrop_custom/metaplex/js/packages/cli/src/helpers/gumdrop/claimant.ts:23:12)
    at Object.buildGumdrop (/Users/frel/Desktop/Anna/Dev/CoW-Token/gumdrop_custom/metaplex/js/packages/cli/src/helpers/gumdrop/claimant.ts:503:12)
    at /Users/frel/Desktop/Anna/Dev/CoW-Token/gumdrop_custom/metaplex/js/packages/cli/src/gumdrop-cli.ts:270:32
    at step (/Users/frel/Desktop/Anna/Dev/CoW-Token/gumdrop_custom/metaplex/js/packages/cli/src/gumdrop-cli.ts:53:23)
    at Object.next (/Users/frel/Desktop/Anna/Dev/CoW-Token/gumdrop_custom/metaplex/js/packages/cli/src/gumdrop-cli.ts:34:53)
lwus commented 2 years ago

You can run through the pubkeys with a script that just tries to create them all but I also added some logging.

cultureofwomen commented 2 years ago

@lwus Yeah I did that and its all working smoothly now!

I was able to create over 22K drops. Thanks for all the help! :)

https://docs.google.com/spreadsheets/d/1c6U7GkczDwQtNAkL5ePceMYj3sDWKWOpw6kO8S5urQ0/edit