Last active
January 28, 2022 17:11
-
-
Save lwillmeth/8050be839f6baa3e31dbc16500b63d1c to your computer and use it in GitHub Desktop.
"Intrinsic gas too low"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
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