Skip to content

Commit

Permalink
style: branding (foundry-rs#1357)
Browse files Browse the repository at this point in the history
* style: add logo to readme

* chore: move template assets to cli crate
  • Loading branch information
onbjerg authored Apr 18, 2022
1 parent ceaecc6 commit f21a775
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 10 deletions.
File renamed without changes
File renamed without changes
Binary file added .github/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# <h1 align="center">Foundry</h1>
<img src=".github/logo.png" alt="Foundry logo" align="right" width="120" />

## Foundry

![Github Actions][gha-badge] [![Telegram Chat][tg-badge]][tg-url] [![Telegram Support][tg-support-badge]][tg-support-url]

Expand All @@ -22,7 +24,7 @@ Foundry consists of:

**Need help getting started with Foundry? Read the [📖 Foundry Book][foundry-book] (WIP)!**

![Demo](./assets/demo.gif)
![Demo](.github/demo.gif)

## Installation

Expand Down Expand Up @@ -109,7 +111,7 @@ See the benchmarks below. More benchmarks can be found in the [v0.2.0 announceme

**Compilation Benchmarks**

<img alt="Compilation benchmarks" src="./assets/compilation-benchmark.png" height="420px" />
<img alt="Compilation benchmarks" src=".github/compilation-benchmark.png" height="420px" />

**Takeaway: Forge compilation is consistently faster by a factor of 1.7-11.3x, depending on the amount of caching involved.**

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
11 changes: 4 additions & 7 deletions cli/src/cmd/forge/init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,10 @@ impl Cmd for InitArgs {

// write the contract file
let contract_path = src.join("Contract.sol");
std::fs::write(contract_path, include_str!("../../../../assets/ContractTemplate.sol"))?;
std::fs::write(contract_path, include_str!("../../../assets/ContractTemplate.sol"))?;
// write the tests
let contract_path = test.join("Contract.t.sol");
std::fs::write(
contract_path,
include_str!("../../../../assets/ContractTemplate.t.sol"),
)?;
std::fs::write(contract_path, include_str!("../../../assets/ContractTemplate.t.sol"))?;

let dest = root.join(Config::FILE_NAME);
if !dest.exists() {
Expand Down Expand Up @@ -158,7 +155,7 @@ fn init_git_repo(root: &Path, no_commit: bool) -> eyre::Result<()> {

if !is_git.success() {
let gitignore_path = root.join(".gitignore");
std::fs::write(gitignore_path, include_str!("../../../../assets/.gitignoreTemplate"))?;
std::fs::write(gitignore_path, include_str!("../../../assets/.gitignoreTemplate"))?;

// git init
Command::new("git")
Expand All @@ -173,7 +170,7 @@ fn init_git_repo(root: &Path, no_commit: bool) -> eyre::Result<()> {
let gh = root.join(".github").join("workflows");
std::fs::create_dir_all(&gh)?;
let workflow_path = gh.join("test.yml");
std::fs::write(workflow_path, include_str!("../../../../assets/workflowTemplate.yml"))?;
std::fs::write(workflow_path, include_str!("../../../assets/workflowTemplate.yml"))?;

if !no_commit {
Command::new("git").args(&["add", "."]).current_dir(&root).spawn()?.wait()?;
Expand Down

0 comments on commit f21a775

Please sign in to comment.