Skip to content

Instantly share code, notes, and snippets.

@lwillmeth
Last active January 28, 2022 17:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lwillmeth/8050be839f6baa3e31dbc16500b63d1c to your computer and use it in GitHub Desktop.
Save lwillmeth/8050be839f6baa3e31dbc16500b63d1c to your computer and use it in GitHub Desktop.
"Intrinsic gas too low"
/*
This contract compiles but npx truffle test fails: Error: while migrating DemoERC777: Returned error: intrinsic gas too low
*/
// contracts/demo.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.11;
import "@openzeppelin/contracts/token/ERC777/ERC777.sol";
contract DemoERC777 is ERC777 {
constructor(address[] memory defaultOperators_)
ERC777("Demo ERC777 Token", "DEMO", defaultOperators_) {
}
}
// migrations/2_deploy_demo.js
const DemoERC777 = artifacts.require('DemoERC777');
module.exports = function(deployer, network, accounts) {
const [creator, ...others] = accounts;
deployer.deploy(DemoERC777, []);
};
// test/demo.js
const DemoERC777 = artifacts.require("DemoERC777");
contract("DemoERC777", function (/* accounts */) {
it("should assert true", async function () {
await DemoERC777.deployed();
return assert.isTrue(true);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment