You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
turbolent
changed the title
[Cadence Testing Framework] Unable to use RandomnessBeacon contract in the cadence testing framework
[Test] Unable to use RandomnessBeacon contract in the cadence testing framework
Dec 29, 2023
turbolent
changed the title
[Test] Unable to use RandomnessBeacon contract in the cadence testing framework
[Test] Unable to use RandomBeaconHistory contract
Dec 29, 2023
Current Behavior
The use of the
RandomBeaconHistory
in the Cadence testing framework is broken, I get the following error when running a test on a repo of ours:Full stack trace
- FAIL: testDrawFromRaffle Execution failed: error: assertion failed: given value is: I.Test.Test.TransactionResult(status: I.Test.Test.ResultStatus(rawValue: 1), error: I.Test.Test.Error(message: "[Error Code: 1101] error caused by: 1 error occurred:\n\t* transaction execute failed: [Error Code: 1101] cadence runtime error: Execution failed:\n --> 1add2b24ceb669bec953141646beef36854a11de994050782405416e5f1cdd90:10:8\n |\n10 | manager.revealDrawing(manager: ref, raffleID: id, receiptID: receiptID)\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n --> 0000000000000007.FlowtyRaffles:319:12\n |\n319 | manager._revealDrawing(raffleID: raffleID, receiptID: receiptID, drawer: ref)\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n --> 0000000000000007.FlowtyRaffles:327:32\n |\n327 | let drawingResult = raffle.revealDrawing(id: receiptID)\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n --> 0000000000000007.FlowtyRaffles:183:51\n |\n183 | let res: FlowtyRaffles.DrawingResult = receipt.reveal(ref)\n | ^^^^^^^^^^^^^^^^^^^\n\n --> 0000000000000007.FlowtyRaffles:107:23\n |\n107 | let rand = FlowtyRaffles.randUInt64(atBlockHeight: self.commitBlock, salt: self.uuid)\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n --> 0000000000000007.FlowtyRaffles:347:33\n |\n347 | let sourceOfRandomness = RandomBeaconHistory.sourceOfRandomnessAtBlockHeight(blockHeight: atBlockHeight)\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nerror: pre-condition failed: Source of randomness not yet recorded\n --> 0000000000000001.RandomBeaconHistory:96:12\n |\n96 | blockHeight < getCurrentBlock().height: \"Source of randomness not yet recorded\"\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n\n")) --> test_helpers.cdc:60:4
The important Part:
Expected Behavior
Randomness Beacon should work
Steps To Reproduce
PR to reproduce:
Flowtyio/flow-raffle#17
pull its branch down and run
Environment
The text was updated successfully, but these errors were encountered: