fix lint js

This commit is contained in:
0xmuralik
2023-03-14 11:18:42 +05:30
parent db034c2e43
commit 3e22bc9316
44 changed files with 56931 additions and 55014 deletions
@@ -1,5 +1,5 @@
const Migrations = artifacts.require("Migrations");
const Migrations = artifacts.require('Migrations')
module.exports = function (deployer) {
deployer.deploy(Migrations);
};
deployer.deploy(Migrations)
}
+17 -17
View File
@@ -1,16 +1,16 @@
const TestRevert = artifacts.require("TestRevert")
const truffleAssert = require('truffle-assertions');
const TestRevert = artifacts.require('TestRevert')
const truffleAssert = require('truffle-assertions')
async function expectRevert(promise) {
async function expectRevert (promise) {
try {
await promise;
await promise
} catch (error) {
if (error.message.indexOf('revert') === -1) {
expect('revert').to.equal(error.message, 'Wrong kind of exception received');
expect('revert').to.equal(error.message, 'Wrong kind of exception received')
}
return;
return
}
expect.fail('Expected an exception but none was received');
expect.fail('Expected an exception but none was received')
}
contract('TestRevert', (accounts) => {
@@ -20,16 +20,16 @@ contract('TestRevert', (accounts) => {
revert = await TestRevert.new()
})
it('should revert', async () => {
await revert.try_set(10)
no = await revert.query_a()
assert.equal(no, '0', 'The modification on a should be reverted')
no = await revert.query_b()
assert.equal(no, '10', 'The modification on b should not be reverted')
no = await revert.query_c()
assert.equal(no, '10', 'The modification on c should not be reverted')
await revert.try_set(10)
no = await revert.query_a()
assert.equal(no, '0', 'The modification on a should be reverted')
no = await revert.query_b()
assert.equal(no, '10', 'The modification on b should not be reverted')
no = await revert.query_c()
assert.equal(no, '10', 'The modification on c should not be reverted')
await revert.set(10)
no = await revert.query_a()
assert.equal(no, '10', 'The force set should not be reverted')
await revert.set(10)
no = await revert.query_a()
assert.equal(no, '10', 'The force set should not be reverted')
})
})
@@ -2,16 +2,16 @@ module.exports = {
networks: {
// Development network is just left as truffle's default settings
ethermint: {
host: "127.0.0.1", // Localhost (default: none)
port: 8545, // Standard Ethereum port (default: none)
network_id: "*", // Any network (default: none)
gas: 5000000, // Gas sent with each transaction
gasPrice: 1000000000, // 1 gwei (in wei)
},
host: '127.0.0.1', // Localhost (default: none)
port: 8545, // Standard Ethereum port (default: none)
network_id: '*', // Any network (default: none)
gas: 5000000, // Gas sent with each transaction
gasPrice: 1000000000 // 1 gwei (in wei)
}
},
compilers: {
solc: {
version: "0.8.6",
},
},
version: '0.8.6'
}
}
}