Skip to content

Commit

Permalink
latest working with anvil
Browse files Browse the repository at this point in the history
  • Loading branch information
lifehaverdev committed Oct 24, 2023
1 parent f680d56 commit 48fea6f
Show file tree
Hide file tree
Showing 1,127 changed files with 228,881 additions and 245 deletions.
45 changes: 45 additions & 0 deletions mine.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
const http = require('http');

function mine() {
const postData = JSON.stringify({
jsonrpc: '2.0',
method: 'evm_mine',
// method: 'anvil_reset',
params: [],
id: 1
});

const options = {
hostname: '127.0.0.1',
port: 8545,
path: '/',
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Content-Length': postData.length
}
};

const req = http.request(options, (res) => {
let data = '';

res.on('data', (chunk) => {
data += chunk;
});

res.on('end', () => {
console.log('Response:', data);
});
});

req.on('error', (error) => {
console.error('Error:', error);
});

req.write(postData);
req.end();
}

mine(); // Call the mine function

//0xa606d968e0e1e9b83cf9d56c47073b0dfd0ecc23a26cf72e8f48d523436ba9cf
1 change: 1 addition & 0 deletions node_modules/.bin/node-gyp-build

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/node-gyp-build-optional

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/node-gyp-build-test

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/rlp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/sha.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 48fea6f

Please sign in to comment.