Skip to content

Commit

Permalink
Start to release deployment code in preparation for some end to end t…
Browse files Browse the repository at this point in the history
…esting
  • Loading branch information
af-afk committed Sep 9, 2024
1 parent c5a0e60 commit 805d840
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 4 deletions.
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@ CARGO_BUILD_STYLUS := \

.PHONY: build clean

build: factory.wasm trading.wasm
OUT_SHARE := out/Share.sol/Share.json

build: ${OUT_SHARE} factory.wasm trading.wasm

${OUT_SHARE}: $(shell find src -name '*.sol')
@forge build

factory.wasm: $(shell find src -type f -name '*.rs')
@rm -f factory.wasm
Expand Down
8 changes: 8 additions & 0 deletions deploy-erc20-impl.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh -ue

forge create Share \
--json \
--rpc-url="$SPN_SUPERPOSITION_URL" \
--private-key="$SPN_SUPERPOSITION_KEY" \
$@ \
| jq -r .deployedTo
4 changes: 4 additions & 0 deletions deploy.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ err() {

# Deploy the ERC20 implementation...

export SPN_ERC20_IMPL="${SPN_ERC20_IMPL:-$(./deploy-erc20-impl.sh)}"

echo "export SPN_ERC20_IMPL=$SPN_ERC20_IMPL" >&2

# Deploy the Trading implemenation...

# Deploy the factory
5 changes: 2 additions & 3 deletions src/Share.sol
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@ import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20PermitUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";

contract Shares is
contract Share is
Initializable,
ERC20Upgradeable,
OwnableUpgradeable,
ERC20PermitUpgradeable,
ERC20VotesUpgradeable
ERC20PermitUpgradeable
{
/// @custom:oz-upgrades-unsafe-allow constructor
constructor() {
Expand Down
Empty file added test/end-to-end.ts
Empty file.

0 comments on commit 805d840

Please sign in to comment.