Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save brynbellomy/af8bd641bf30441cabb948599a73b2ee to your computer and use it in GitHub Desktop.
Save brynbellomy/af8bd641bf30441cabb948599a73b2ee to your computer and use it in GitHub Desktop.
medium-return-struct-public-func-2.js
// we're assuming we have a typical Truffle setup here
const Project = artifacts.require('./Project.sol');
const project = await Project.deployed()
const person = await project.people('0xdeadbeef')
console.log('person =', person);
// this should print something like this:
// person = [ 'Bryn', 123 ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment