Skip to content

Commit

Permalink
docs: improve
Browse files Browse the repository at this point in the history
  • Loading branch information
ZeroEkkusu committed Aug 21, 2024
1 parent c34379f commit 50d62a1
Showing 1 changed file with 17 additions and 8 deletions.
25 changes: 17 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
# SOLX

Write Solidity AND **any other programming language** <ins>at the same time</ins>!
Write Solidity AND **any other programming language** <ins>at the same time</ins> in Forge tests and scripts!

<img src="./demo.gif"></img>

## Usage

> [!IMPORTANT]
> Proof of concept. For research purposes only.
> [!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 <ins>cannot be used for actual smart contracts</ins>.
<details>
<summary><b>I have read and understood the above warning. Show me the usage instructions.</b></summary>

<br>

**Clone**

Expand Down Expand Up @@ -43,9 +49,10 @@ forge test

**Experiment**

👉 Try it out: [`test/Example.solx`](./test/Example.solx)
> [!NOTE]
> Try it here: [`test/Example.solx`](./test/Example.solx)
Specify variables to sync between Solidity and TypeScript:
Sync variables between Solidity and TypeScript:

```solidity
uint256 a;
Expand All @@ -55,7 +62,7 @@ a++;
assertEq(a, 1);
```

Specify variables to clone from TypeScript:
Clone variables from TypeScript:

```solidity
uint256 a = 1;
Expand All @@ -65,16 +72,18 @@ const b = 1;
assertEq(a, b);
```

Use `console.log` in TypeScript:
`console.log` in TypeScript:

```solidity
// @typescript-start ()
console.log('👀');
console.log("solx");
// @typescript-end ()
```

Only TypeScript is supported currently.

</details>

## License
Licensed under either of
Expand Down

0 comments on commit 50d62a1

Please sign in to comment.