We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to set tuples aka #605
Please include information like:
full output of the error you received test_a remains as 100
what command you ran checking events emitted using truffle truffle test
the code that caused the failure
Creation: event({ _test_a: uint256 }) test_a : uint256 test_b : uint256 test_c : uint256 test_x : uint256 @public def __init__(): self.test_a = 100 @public def test1() -> (uint256, uint256): log.Creation(self.test_x) return (1,2) @public def test(): (self.test_b, self.test_a) = self.test1() log.Creation(self.test_a) log.Creation(self.test_b)
Test Code:
const test = artifacts.require("test"); const assert = require("chai").assert; const truffleAssert = require('truffle-assertions'); contract("test", (accounts) => { let test1; const fundingAccount = accounts[0]; beforeEach(async () => { test1 = await test.new({from: fundingAccount}); }); it("should receive event", async() => { let tx = await test1.test(); truffleAssert.eventEmitted(tx, 'Creation', (ev) => { return ev._test_a == 2; }); }); });
I am not sure whether I did it wrong but the goal would be to set 2 variables at once.
The text was updated successfully, but these errors were encountered:
Referenced #1113 .
Unable to work ONLY when setting global variables. In-function variables are able to be changed.
##...code before @public def test(): c : uint256 d : uint256 e : uint256 d , e = self.test1() ##more code after ....
Is able to work but my previous post is still unable to work
Sorry, something went wrong.
Fix assignment to heterogeneously stored tuples
256672c
Fixes vyperlang#1160
No branches or pull requests
Version Information
What's your issue about?
Unable to set tuples aka #605
Please include information like:
full output of the error you received
test_a remains as 100
what command you ran
checking events emitted using truffle
truffle test
the code that caused the failure
Test Code:
I am not sure whether I did it wrong but the goal would be to set 2 variables at once.
Cute Animal Picture
The text was updated successfully, but these errors were encountered: