Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/veeeetzzzz/evil-smart-contracts
A collection of nefariously built smart contracts - for educational purposes only.
https://github.com/veeeetzzzz/evil-smart-contracts
ethereum smart-contracts solidity
Last synced: 12 days ago
JSON representation
A collection of nefariously built smart contracts - for educational purposes only.
- Host: GitHub
- URL: https://github.com/veeeetzzzz/evil-smart-contracts
- Owner: Veeeetzzzz
- Created: 2022-12-05T16:56:42.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-05-06T14:46:01.000Z (over 1 year ago)
- Last Synced: 2024-11-12T05:35:37.292Z (2 months ago)
- Topics: ethereum, smart-contracts, solidity
- Language: Solidity
- Homepage:
- Size: 4.88 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Evil Smart Contracts
A collection of nefariously built smart contracts - for educational purposes only.
## Prerequisites
- [Node.js](https://nodejs.org/en/download/) (v14.x recommended)
- [Truffle](https://www.trufflesuite.com/truffle) (v5.x recommended)
- [Ganache](https://www.trufflesuite.com/ganache) or a running Ethereum node (optional)
- [MetaMask](https://metamask.io/) or other Ethereum wallet (optional)## Setup
1. Clone the repository:
`git clone https://github.com/Veeeetzzzz/evil-smart-contracts.git`
`cd evil-smart-contracts`
2. Install dependencies:
`npm install`
3. Compile the contract:
`truffle compile`
This command will compile the `.sol` file in the `contracts/` directory.
## Deployment
1. Set up your network configuration in `truffle-config.js`:
```javascript
networks: {
development: {
host: "127.0.0.1",
port: 7545, // Change this to your Ethereum node's port
network_id: "*" // Match any network id
}
}
```
# Interact with the contractYou can use Truffle Console to interact with your deployed contract:
`truffle console --network development`
Replace development with the appropriate network name if you're interacting with a contract deployed on a testnet or mainnet.
In the console, you can interact with your contract using its ABI and deployed address.
For example, if your contract is named MyContract, you can load the deployed instance:
`const myContract = await MyContract.deployed()`
And then call the functions of the contract:
`await myContract.myFunction()`
Replace myFunction with the name of the function you want to call.