Hi.
Contract call always throws ClientError: output already exists
during dryRun
and I’m unable to find an issue. Rust version works like a charm . Contract getters also works flawlessly via typescript SDK. I’m out of ideas to be honest.
This is for beta-2. I tried different fuels-ts versions (0.21, 0.26, 0.29) with no luck.
The only thing I noticed so far is that encodedTransaction
is suspiciously large for Typescript (4728 bytes vs 2364 bytes emitted by the Rust SDK).
Also, I believe that the same code snipped worked without issues few months ago.
Will appreciate any help.
The code snippet:
const ASSET = { value: '0x0000000000000000000000000000000000000000000000000000000000000000' };
const CONTRACT = "0x11aadad33b006b21390e1452cd6354b6aa71bfd997ce0977936eb60637a96a0e";
// some random value
const SEED = "0x3212e7f73bb27139133be858aab231776abaa8f2e68d449fc4d55ed901010101";
// the wallet is funded
let w2 = Wallet.fromPrivateKey(KEY, "https://node-beta-2.fuel.network/graphql");
let c2 = require('./lib/contracts');
let i2 = c2.VrfImplAbi__factory.connect(CONTRACT, wallet);
let fee = (await i2.functions.get_fee(ASSET).get()).value;
// following call throws
let result = i2.functions.request(SEED)
.txParams({ gasPrice: 1 })
.callParams({ forward: { amount: fee, assetId: ASSET.value}})
.call();
9 Likes
sarah
January 12, 2023, 4:00pm
2
Hi @blackbeam , thanks for sharing this! Do you have a repo you can share as well?
4 Likes
sarah
January 13, 2023, 5:30pm
4
Thank you! We will investigate this and let you know what we find soon.
1 Like
sarah
January 16, 2023, 7:29pm
5
One thing that would be very helpful in troubleshooting would be the dry-run request being submitted by the TS and Rust SDKs (or at least the submitted transaction payload from the TS-SDK that fails). You should be able to extract this from the networking tab. Is that something you can share ?
@sarah , here they are.
Fun fact – while trying to get the fresh TS request it was executed successfully but just once (in the same 5 days old NodeJs session).
Failed TS request
{
query: 'mutation dryRun($encodedTransaction: HexString!, $utxoValidation: Boolean) {\n' +
' dryRun(tx: $encodedTransaction, utxoValidation: $utxoValidation) {\n' +
' ...receiptFragment\n' +
' }\n' +
'}\n' +
'\n' +
'fragment receiptFragment on Receipt {\n' +
' data\n' +
' rawPayload\n' +
'}',
variables: {
encodedTransaction: '0x000000000000000000000000000000010000000005f5e10000000000000000000000000000000d2c00000000000002f0000000000000000200000000000000020000000000000001000000000000000000000000000000000000000000000000000000000000000090000004470000000000000000000cd45dfcc00110fff3001a5c5000910005b861440006724002d0164114005b40100d360000006158000c61440001504175305f5d10a6504175305d4570a6504171385f5d1027504171385d417027134100007340001a9000001f1a445000910000085d43f0005f4500009000002b504171385d4170271341004073400024900000291a445000910000085d43f0015f4500009000002b360000001a44000050417528504175286041100850457528504170085041700860411008504170085d4100001341000073400037900000396144000c9000003b360000001a440000504174305f5d1086504174305d4570865d43f00210450440504174485f5d108961440001504175405f5d10a8504175405d4570a8504171405f5d1028504171405d417028134100007340004f900000541a445000910000085d43f0005f45000090000060504171405d41702813410040734000599000005e1a445000910000085d43f0015f45000090000060360000001a44000050417538504175386041100850457538504170005041700060411008504170005d410000134100007340006c9000006e6144000690000078504170005d410000134100407340007390000076360000001a44000090000078360000001a4400005d43f00220451400504173805f5d1070504174485d497089504173805d4170701a445000910000105f4520005f450001504175a8504175a8604110105d47f00326440000504470015041726050417260604110a026000000504070011a445000910000105f4500005f440001504174785041747860411010504173505f5c006a5d47f0025d43f00412451400504173005f5d1060504173505d45706a504173005d41706016411400734000a4900000b150496000504173505d41706a5545009010452440504170785041707860411090504170785d41000013410040734001249000031f504972601a445000910000a050411000604120a05041748850417488604110a026000000504070011a445000910000105f4500005f44000150417198504171986041101050517198505574885d454001504174085f5d10815d4540015d43f00310450440504173c85f5d10795d4140005d4d4001504573c85d457079154914c0734800d3900000e12644000050487001504573a85f5d207515453000734400da900000de504573a85d457075284504c0900000de504173a85d417075900000e15f510000504173c85d4170795f5100015d454000504174085d417081104504405d43f0032845540050557198505174785d41400113410000734000f1900000f35d4150019000011c5d455001504174105f5d10825d4550015d41400110450440504173d05f5d107a5d4150005d4d5001504573d05d45707a154914c073480102900001102644000050487001504573b05f5d207615453000734401099000010d504573b05d457076284504c09000010d504173b05d417076900001105f550000504173d05d41707a5f5500015d4940005d455000504174105d417082104504405d414001284524005d417082504171985d450000504171985d41000125450000504574885d43f003254500005041707850450008504171a8504171a860411088504171a850450028504171085041710860411018504171085d41000013410000734001339000013f504171085d450002504175485f5d10a9504175485d4970a91a445000910000185d43f0005f4500005f4520029000017b504171085d41000013410040734001449000016050417108504100085d450000504173e85f5d107d50417108504100085d450001504173785f5d106f504175a85d450000504173e85d41707d10450440504173785d41706f1a485000910000105f4910005f4900011a445000910000185d43f0015f45000050411008604120109000017b50417108504100085d450000504173f05f5d107e50417108504100085d450001504173905f5d1072504175a85d450000504173f05d41707e10450440504173905d4170721a485000910000105f4910005f4900011a445000910000185d43f0015f4500005041100860412010504173085041730860411018504171a850550000504171a85d51000450457308504171a8504d0040504170105041701060411018504170105d410000134100007340018d90000194504170105d450002504175505f5d10aa504175505d4570aa900001a8504170105d4100001341004073400199900001a150417010504100085d450000504174385f5d1087504174385d457087900001a850417010504100085d450000504174505f5d108a504174505d45708a504173205f5d1064504173205d4970641a4450009100003050411000604150205f4540045f45200550417230504172306041103050453000504170285041702860411010504170285d41000013410040734001be900001c5504170285d450001504171485f5d1029504171485d457029900001cd504170285d41000013410000734001ca900001cc1a440000900001cd1a440000504171505f5d102a50453010504170385041703860411028504170385d41000013410040734001d8900001df504170385045000850417358504173586041102050497358900001f1504170385d41000013410000734001e4900001eb1a485000910000205d47f00a104513005041200060411020900001f11a485000910000205d47f00a10451300504120006041102050417158504171586041202050453038504170605041706060411010504170605d41000013410040734001fd90000204504170605d450001504173405f5d1068504173405d4570689000020c504170605d41000013410000734002099000020b1a44a0009000020c1a44a000504173485f5d1069504d7230504171505d49702a50457158504173485d4170692d4d24501a44e000504170705f5d100e504170705d41700e134100007340021d900002281a44d000504175785f5d10af504175785d4570af1a485000910000185d43f0005f4900005f4910029000023d504170705d45700e504173885f5d10711a44d000504174585f5d108b504174585d49708b504173885d4170711a445000910000105f4520005f4500011a485000910000185d43f0015f490000504120086041101050417460504174606041201850457460504171205041712060411018504171205d410000134100007340024990000255504171205d450002504175a05f5d10b4504175a05d4970b41a445000910000185d43f0005f4500005f45200290000309504171205d410000134100407340025a900002b250417120504100085d450000504174285f5d108550417120504100085d450001504173985f5d1073504174285d497085504173985d4170731a445000910000105f4520005f45000150417178504171786041101050557478505171785d4140011341000073400275900002775d455001900002a15d455001504174185f5d10835d4550015d41400110450440504173d85f5d107b5d4150005d4d5001504573d85d45707b154914c073480286900002942644000050487001504573b85f5d2077154530007344028d90000291504573b85d457077284504c090000291504173b85d417077900002945f550000504173d85d41707b5f5500015d4940005d455000504174185d417083104504405d41400128452400504174185d457083504173f85f5d107f504173f85d45707f504173985d4170731a485000910000105f4910005f4900011a445000910000185d43f0015f45000050411008604120109000030950417120504100085d450000504174405f5d108850417120504100085d450001504173a05f5d1074504174405d497088504173a05d4170741a445000910000105f4520005f45000150417188504171886041101050557478505171885d41400113410000734002cd900002cf5d455001900002f95d455001504174205f5d10845d4550015d41400110450440504173e05f5d107c5d4150005d4d5001504573e05d45707c154914c0734802de900002ec2644000050487001504573c05f5d207815453000734402e5900002e9504573c05d457078284504c0900002e9504173c05d417078900002ec5f550000504173e05d41707c5f5500015d4940005d455000504174205d417084104504405d41400128452400504174205d457084504174005f5d1080504174005d457080504173a05d4170741a485000910000105f4910005f4900011a445000910000185d43f0015f4500005041100860412010504173285041732860411018504973281a445000910000205d43f0015f450000504110086041201850417558504175586041102050457260504173505d41706a5549002010491480504575585d43f009284914009000032e504175801a445000910000205d43f0005f450000504175806041102050457260504173505d41706a5549002010491480504575805d43f0092849140050417350504173505d41706a104014005f5d006a9000009d470000000000000000000000000000000000000100000000000002d000000000000000a00000000000000090000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000cfc00000000000000000000000111aadad33b006b21390e1452cd6354b6aa71bfd997ce0977936eb60637a96a0e00000000ef0b29b70000000000000001000000000000000000000000000000200000000000000001000000000000006400000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003211e7f73bb27139133be858aab231776abaa8f2e68d449fc4d55ed901010101000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011aadad33b006b21390e1452cd6354b6aa71bfd997ce0977936eb60637a96a0e00000000000000003dc7803171f77aa23e59a69d10289d5756720ea3939a2162b96f2a2a750f76e800000000000000016124933beb6132f9421880d2cb9190694ec6b5783ebff440ecd7d6a4801615a4000000001dcd63070000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000036124933beb6132f9421880d2cb9190694ec6b5783ebff440ecd7d6a4801615a4000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',
utxoValidation: false
}
}
Successful Rust request
{
"query": "mutation($tx: HexString!, $utxoValidation: Boolean) {\n dryRun(tx: $tx, utxoValidation: $utxoValidation) {\n param1\n param2\n amount\n assetId\n gas\n digest\n contract {\n id\n }\n is\n pc\n ptr\n ra\n rb\n rc\n rd\n reason\n receiptType\n to {\n id\n }\n toAddress\n val\n len\n result\n gasUsed\n data\n messageId\n sender\n recipient\n nonce\n contractId\n }\n}\n\n",
"variables": {
"tx":"0x0000000000000000000000000000000100000000000f42400000000000000000000000000000002000000000000000800000000000000002000000000000000200000000000000010000000000000000000000000000000000000000000000000000000000000000724028b8724428b05d451000724828a85d492000724c28882d4124d1240400000000000000000000000000000000000000000000000000000000000000000000000000000000006400000000000f424011aadad33b006b21390e1452cd6354b6aa71bfd997ce0977936eb60637a96a0e00000000ef0b29b700000000000028e82db6cf6b41b6d4e7e54bff56c44e27014678ed99efe5694f59401d59926d90a4000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011aadad33b006b21390e1452cd6354b6aa71bfd997ce0977936eb60637a96a0e000000000000000053f082290cda812cc7b85efdcd86292f27d3bf86fabd3a2961cb1bc839bddbd30000000000000001a815c800251001b174939dc282a7123578deecb5e106da84d146142a93215c04000000012a05f19b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003a815c800251001b174939dc282a7123578deecb5e106da84d146142a93215c04000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040f19737ebcadd073cc0fe1c19f7458df8ee748a4087db0bec15000f1841e49ee2d08ed6c71204b02a9d095a21d58615a8623dcd4a7b43edc71c0bb5a2b0051e1d",
"utxoValidation": false
}
}
1 Like
Was there ever any solution found for this? I’m getting the same error. @sarah
sarah
May 23, 2023, 2:13pm
8
Hi @maurice , I’m not sure. Can you create a new forum post with reproduction steps?
Hi @sarah , for me this came from a race condition because of a missing await
. From my side it’s solved.
1 Like
system
Closed
June 14, 2023, 4:17am
10
This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.