Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zeroekkusu/solx
Solidity × 𝙖𝙣𝙮 𝙡𝙖𝙣𝙜𝙪𝙖𝙜𝙚 transpiler for Foundry tests & scripts.
https://github.com/zeroekkusu/solx
foundry solidity transpiler
Last synced: 21 days ago
JSON representation
Solidity × 𝙖𝙣𝙮 𝙡𝙖𝙣𝙜𝙪𝙖𝙜𝙚 transpiler for Foundry tests & scripts.
- Host: GitHub
- URL: https://github.com/zeroekkusu/solx
- Owner: ZeroEkkusu
- License: apache-2.0
- Created: 2024-08-19T16:28:02.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-08-26T10:10:25.000Z (5 months ago)
- Last Synced: 2024-10-12T00:26:36.526Z (3 months ago)
- Topics: foundry, solidity, transpiler
- Language: TypeScript
- Homepage:
- Size: 321 KB
- Stars: 54
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
# SOLX
Write Solidity AND **any other programming language** at the same time in Foundry tests and scripts!
## Usage
> [!CAUTION]
> This is an experimental proof of concept. Do not use in development or production environments.
> SOLX is designed to work exclusively in Foundry's local EVM and cannot be used for actual smart contracts.I have read and understood the above warning. Show me the usage instructions.
**Clone**
```shell
git clone https://github.com/ZeroEkkusu/solx
```**Install**
```shell
soldeer install & bun install
```**Hook**
```
source solx/hooks.sh
```**Build**
```shell
forge build
```**Test**
```shell
forge test
```**Experiment**
[Playground ↗](./test/Example.solx)
Sync variables between Solidity and TypeScript:
```solidity
uint256 a;
// @typescript-start (uint256 a)
a++;
// @typescript-end ()
assertEq(a, 1);
```Clone variables from TypeScript:
```solidity
uint256 a = 1;
// @typescript-start ()
const b = 1;
// @typescript-end (uint256 b)
assertEq(a, b);
````console.log` in TypeScript:
```solidity
// @typescript-start ()
console.log("solx");
// @typescript-end ()
```Only TypeScript is supported currently.
## License
Licensed under either of- Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
---
© 2024 Zero Ekkusu