-
-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
♻️ chore: Remove docs that were committed on accident (#566)
## Description Docs were committed on accident ## Testing Explain the quality checks that have been done on the code changes ## Additional Information - [ ] I read the [contributing docs](../docs/contributing.md) (if this is your first contribution) Your ENS/address: --------- Co-authored-by: Will Cory <[email protected]>
- Loading branch information
1 parent
738e2fe
commit c5c64e5
Showing
24 changed files
with
589 additions
and
6 deletions.
There are no files selected for viewing
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 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 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 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 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 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
TypeDoc added this file to prevent GitHub Pages from using Jekyll. You can turn off this behavior by setting the `githubPages` option to false. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
@evmts/bun-plugin / [Exports](/reference/bun-plugin/modules.md) | ||
|
||
# @evmts/plugin-bun | ||
|
||
A bun plugin for importing solidity files. | ||
|
||
### Installation | ||
|
||
Install build dependencies | ||
|
||
```typescript | ||
bun install -D bun-types @evmts/bun-plugin @evmts/ts-plugin @evmts/core solc | ||
``` | ||
|
||
### Setup | ||
|
||
first create a `plugins.ts` file | ||
|
||
```typescript | ||
import { evmtsBunPlugin } from "@evmts/bun-plugin"; | ||
import { plugin } from 'bun' | ||
|
||
plugin(evmtsBunPlugin()) | ||
``` | ||
|
||
Next load your `plugin.ts` file in your `bunfig.toml` | ||
|
||
```toml | ||
preload = ["./plugins.ts"] | ||
|
||
# add to [test] to use plugin in bun test too | ||
[test] | ||
preload = ["./plugins.ts"] | ||
``` | ||
|
||
### Usage | ||
|
||
Once set up you can import solidity files directly from node modules such as `openzepplin/contracts` or your source code. You can use with viem ethersjs or any other library. | ||
|
||
```typescript | ||
import { http, createPublicClient } from 'viem' | ||
import { optimismGoerli } from 'viem/chains' | ||
import { ExampleContract } from './ExampleContract.sol' | ||
|
||
export const publicClient = createPublicClient({ | ||
chain: optimismGoerli, | ||
transport: http('https://goerli.optimism.io'), | ||
}) | ||
|
||
const owner = '0x8f0ebdaa1cf7106be861753b0f9f5c0250fe0819' | ||
|
||
publicClient.readContract( | ||
ExampleContract.read({ chainId: optimismGoerli.id }).balanceOf(owner) | ||
).then(console.log) | ||
|
||
``` | ||
## License 📄 | ||
|
||
<a href="./LICENSE"><img src="https://user-images.githubusercontent.com/35039927/231030761-66f5ce58-a4e9-4695-b1fe-255b1bceac92.png" width="200" /></a> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
[@evmts/bun-plugin](/reference/bun-plugin/README.md) / Exports | ||
|
||
# @evmts/bun-plugin | ||
|
||
## Table of contents | ||
|
||
### Functions | ||
|
||
- [evmtsBunPlugin](/reference/bun-plugin/modules.md#evmtsbunplugin) | ||
|
||
## Functions | ||
|
||
### evmtsBunPlugin | ||
|
||
▸ **evmtsBunPlugin**(): `BunPlugin` | ||
|
||
@evmts/bun-plugin is a bun plugin that allows you to import solidity files into your typescript files | ||
and have them compiled to typescript on the fly. | ||
|
||
#### Returns | ||
|
||
`BunPlugin` | ||
|
||
**`Example`** | ||
|
||
```ts plugin.ts | ||
import { evmtsBunPlugin } from '@evmts/esbuild-plugin' | ||
import { plugin } from 'bun' | ||
|
||
plugin(evmtsBunPlugin()) | ||
``` | ||
|
||
```ts bunfig.toml | ||
preload = ["./plugins.ts"] | ||
``` | ||
|
||
#### Defined in | ||
|
||
[plugin.js:21](https://github.com/evmts/evmts-monorepo/blob/main/bundlers/bun/src/plugin.js#L21) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
TypeDoc added this file to prevent GitHub Pages from using Jekyll. You can turn off this behavior by setting the `githubPages` option to false. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
@evmts/esbuild-plugin / [Exports](/reference/esbuild-plugin/modules.md) | ||
|
||
# @evmts/plugin | ||
|
||
A webpack plugin for importing solidity files. | ||
|
||
## Installation | ||
|
||
```bash | ||
pnpm i @evmts/webpack-plugin | ||
``` | ||
|
||
## Usage | ||
|
||
Install webpack plugin | ||
|
||
```bash | ||
npm i @evmts/webpack-plugin | ||
``` | ||
|
||
Add to your webpack config | ||
|
||
```typescript | ||
import {ForgePlugin} from '@evmts/webpack-plugin' | ||
|
||
export default { | ||
// ... other configuration settings | ||
plugins: [ | ||
// ... other plugins | ||
new ForgePlugin({ | ||
project: './contracts' | ||
}), | ||
], | ||
}; | ||
``` | ||
|
||
## ConfigOptions | ||
|
||
## Usage in @evmts/core | ||
|
||
## Usage in other libraries | ||
|
||
## Autocompletion and Typesafety | ||
|
||
## License 📄 | ||
|
||
<a href="./LICENSE"><img src="https://user-images.githubusercontent.com/35039927/231030761-66f5ce58-a4e9-4695-b1fe-255b1bceac92.png" width="200" /></a> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
[@evmts/esbuild-plugin](/reference/esbuild-plugin/README.md) / Exports | ||
|
||
# @evmts/esbuild-plugin | ||
|
||
## Table of contents | ||
|
||
### Functions | ||
|
||
- [esbuildPluginEvmts](/reference/esbuild-plugin/modules.md#esbuildpluginevmts) | ||
|
||
## Functions | ||
|
||
### esbuildPluginEvmts | ||
|
||
▸ **esbuildPluginEvmts**(`options?`): `Plugin` | ||
|
||
#### Parameters | ||
|
||
| Name | Type | | ||
| :------ | :------ | | ||
| `options?` | `Object` | | ||
| `options.compiler?` | ``"solc"`` \| ``"foundry"`` | | ||
|
||
#### Returns | ||
|
||
`Plugin` | ||
|
||
#### Defined in | ||
|
||
bundler/types/src/unplugin.d.ts:13 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
TypeDoc added this file to prevent GitHub Pages from using Jekyll. You can turn off this behavior by setting the `githubPages` option to false. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
@evmts/rollup-plugin / [Exports](/reference/rollup-plugin/modules.md) | ||
|
||
# @evmts/plugin | ||
|
||
A rollup plugin for importing solidity files. | ||
|
||
Currently @evmts/plugin only works in forge projects but work to make it support [all wagmi plugins](https://wagmi.sh/cli/plugins) is underway | ||
|
||
## Instalation | ||
|
||
```bash | ||
pnpm i @evmts/rollup-plugin | ||
``` | ||
|
||
## Vite usage | ||
|
||
Install rollup plugin | ||
|
||
```bash | ||
npm i @evmts/rollup-plugin | ||
``` | ||
|
||
Add to your vite config | ||
|
||
```typescript | ||
import { evmtsPluginrollup } from '@evmts/rollup-plugin` | ||
import { defineConfig } from 'vite' | ||
|
||
export default defineConfig({ | ||
plugins: [evmtsPluginRollup()] | ||
}) | ||
``` | ||
|
||
## Rollup usage | ||
|
||
```typescript | ||
const { evmtsPlugin } = require('@evmts/plugin'); | ||
|
||
module.exports = { | ||
... | ||
plugins: [evmtsPlugin()] | ||
}; | ||
``` | ||
|
||
## ConfigOptions | ||
|
||
To configure pass in the forge executable and the root folder that your foundery.toml is in | ||
|
||
```typescript | ||
plugins: [ | ||
evmtsPlugin({ | ||
forgeExecutable: "forge", | ||
projectRoot: __dirname, | ||
}), | ||
]; | ||
``` | ||
|
||
## How it works | ||
|
||
Under the hood this plugin will transform solidity imports | ||
|
||
When the plugin sees a solidity import it will make the following changes | ||
|
||
1. Update the import to import a .ts file | ||
|
||
```typescript | ||
- import scripts from './MyScript.sol' | ||
+ import scripts from './MyScript.sol.ts' | ||
``` | ||
|
||
Insert a new typescript file MyScript.sol.ts as an artifact | ||
|
||
```typescript | ||
// MyScript.sol.ts | ||
export default { | ||
name, | ||
artifactPath, | ||
contractPath, | ||
address, | ||
abi, | ||
}; | ||
``` | ||
|
||
The typescript can then go ahead and use the artifacts however it pleases | ||
|
||
## Usage in @evmts/core | ||
|
||
See full [evms-core](https://github.com/evmts/evmts-monorepo-monorepo/tree/main/docs/evmts) for how it's used in evmts. This plugin can be used in other repos as well. | ||
|
||
## Usage in other libraries | ||
|
||
Currently only `@evmts/core` is using this but this could easily be adapted or extended for other libraries. | ||
|
||
## Autocompletion and Typesafety | ||
|
||
For typesafety and autocompletion in your editor add [@evmts/ts-plugin](../ts-plugin) to your tsconfig.json. | ||
|
||
**Custom Ts plugins are for developer experience only** | ||
|
||
The typescript compiler does not use custom ts plugins at compile time only in your editor. You will get red squiggly lines telling you something is wrong but it will still compile. | ||
|
||
## License 📄 | ||
|
||
<a href="./LICENSE"><img src="https://user-images.githubusercontent.com/35039927/231030761-66f5ce58-a4e9-4695-b1fe-255b1bceac92.png" width="200" /></a> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
[@evmts/rollup-plugin](/reference/rollup-plugin/README.md) / Exports | ||
|
||
# @evmts/rollup-plugin | ||
|
||
## Table of contents | ||
|
||
### Functions | ||
|
||
- [rollupPluginEvmts](/reference/rollup-plugin/modules.md#rolluppluginevmts) | ||
|
||
## Functions | ||
|
||
### rollupPluginEvmts | ||
|
||
▸ **rollupPluginEvmts**(`options?`): `Plugin`<`any`\> | ||
|
||
#### Parameters | ||
|
||
| Name | Type | | ||
| :------ | :------ | | ||
| `options?` | `Object` | | ||
| `options.compiler?` | ``"solc"`` \| ``"foundry"`` | | ||
|
||
#### Returns | ||
|
||
`Plugin`<`any`\> | ||
|
||
#### Defined in | ||
|
||
bundler/types/src/unplugin.d.ts:10 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
TypeDoc added this file to prevent GitHub Pages from using Jekyll. You can turn off this behavior by setting the `githubPages` option to false. |
Oops, something went wrong.