Skip to content

Commit

Permalink
Bibos Day Contract Updates + Scripts Cleanup (#91)
Browse files Browse the repository at this point in the history
* clean up scripts, update contracts

* scripts.sh updates

* remove vault address
  • Loading branch information
mshrieve authored Aug 17, 2022
1 parent 0ece05a commit 0924bd4
Show file tree
Hide file tree
Showing 23 changed files with 148 additions and 246 deletions.
Empty file removed addresses.json
Empty file.
29 changes: 29 additions & 0 deletions deployment/deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/bash

# anvil rpc
RPC_URL=http://127.0.0.1:8545
# // anvil account 9
PRIVATE_KEY=0x2a871d0798f97d79848a013d4936a73bf4cc922c825d33c1cf7073dff6d409c6
PUBLIC_KEY=0xa0ee7a142d267c1f36714e4a8f75612f20a79720

DEPLOYMENTS_PATH=./deployment/deployments.json

write_deployment_address() {
echo $(jq '.'$1'="'$2'"' $DEPLOYMENTS_PATH) > $DEPLOYMENTS_PATH
}

get_return_value() {
echo "$2" | grep "{" | jq -r '.returns.'$1'.value'
}

# deploy bibos
SCRIPT_OUTPUT="$(forge script --private-key $PRIVATE_KEY --rpc-url $RPC_URL --broadcast --json src/scripts/deploy_bibos.sol:deploy_bibos)"
BIBOS_ADDRESS="$(get_return_value "bibos" "$SCRIPT_OUTPUT")"

# # erase deployments.json
echo "{}" > $DEPLOYMENTS_PATH

# # save the bibos address in deployments.json
write_deployment_address "Bibos" $BIBOS_ADDRESS

echo "$SCRIPT_OUTPUT"
60 changes: 0 additions & 60 deletions deployment/deploy_anvil.sh

This file was deleted.

62 changes: 0 additions & 62 deletions deployment/deploy_rinkeby.sh

This file was deleted.

28 changes: 0 additions & 28 deletions deployment/get_deployments.sh

This file was deleted.

12 changes: 12 additions & 0 deletions deployment/scripts.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

# anvil rpc
RPC_URL=http://127.0.0.1:8545
# // anvil account 9
PRIVATE_KEY=0x2a871d0798f97d79848a013d4936a73bf4cc922c825d33c1cf7073dff6d409c6
PUBLIC_KEY=0xa0ee7a142d267c1f36714e4a8f75612f20a79720


# forge script --private-key $PRIVATE_KEY --rpc-url $RPC_URL --broadcast --json src/scripts/deploy_bibos.sol:deploy_bibos
# cast send --private-key $PRIVATE_KEY --rpc-url $RPC_URL $BIBOS_ADDRESS "withdraw(address)" "$TO"
# cast send --private-key $PRIVATE_KEY --rpc-url $RPC_URL --value "0.1ether" $BIBOS_ADDRESS "mint()"
4 changes: 0 additions & 4 deletions deployment/test.sh

This file was deleted.

11 changes: 11 additions & 0 deletions deployment/verify_contracts.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

forge verify-contract --chain-id 1 --compiler-version "0.8.13+commit.abaa5c0e" \
--libraries "src/libraries/Cheeks.sol:Cheeks:0x5a56533924d6694c617172592cfa7d8c63de4b4f" \
--libraries "src/libraries/Data.sol:Data:0x62897c2906035e70470d0b0a37bf31fdadf7bf67" \
--libraries "src/libraries/Eyes.sol:Eyes:0xfd61aff6cc3abc7339946f233f182dd17ef97b12" \
--libraries "src/libraries/Eyes2.sol:Eyes2:0xf7fd823e7a599e11150795e4b1c71240001188f9" \
--libraries "src/libraries/Glints.sol:Glints:0x2073341d0ac112a0bc159482d7619929d4ba3456" \
--libraries "src/libraries/Motes.sol:Motes:0x176a00344e819430136be71b66a0e7853885342f" \
--libraries "src/libraries/Mouth.sol:Mouth:0x40ccf25fc4c7e37a7aaaf58dbaf6b1f3996e478c" \
"0xf528e3381372c43f5e8a55b3e6c252e32f1a26e4" src/Bibos.sol:Bibos $ETHERSCAN_API_KEY
12 changes: 12 additions & 0 deletions deployments.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"mainnet": {
"Bibos": "0xf528e3381372c43f5e8a55b3e6c252e32f1a26e4",
"Cheeks": "0x5a56533924d6694c617172592cfa7d8c63de4b4f",
"Data": "0x62897c2906035e70470d0b0a37bf31fdadf7bf67",
"Eyes": "0xfd61aff6cc3abc7339946f233f182dd17ef97b12",
"Eyes2": "0xf7fd823e7a599e11150795e4b1c71240001188f9",
"Glints": "0x2073341d0ac112a0bc159482d7619929d4ba3456",
"Motes": "0x176a00344e819430136be71b66a0e7853885342f",
"Mouth": "0x40ccf25fc4c7e37a7aaaf58dbaf6b1f3996e478c"
}
}
2 changes: 1 addition & 1 deletion lib/solmate
21 changes: 0 additions & 21 deletions scripts/compare_points.sh

This file was deleted.

3 changes: 1 addition & 2 deletions scripts/get_bytecode_size.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ PUBLIC_KEY=0xa0ee7a142d267c1f36714e4a8f75612f20a79720
# $1 is the name of the contract
CREATE_OUTPUT=$(forge create --private-key 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 $1 --json)
DEPLOYED_TO=$(echo $CREATE_OUTPUT | jq -r '.deployedTo')
# SCRIPT_OUTPUT="$(forge script src/scripts/bytecode_size.sol --rpc-url $RPC_URL -s "get_bytecode_size(address)" $DEPLOYED_TO --json --silent)"
# echo $SCRIPT_OUTPUT


forge script src/scripts/bytecode_size.sol --silent --rpc-url $RPC_URL -s "get_bytecode_size(address)" $DEPLOYED_TO --json

4 changes: 0 additions & 4 deletions scripts/local_render.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
#!/usr/bin/env bash
# Notice: run from root directory.



extract_json_output() {
echo "$1" | grep "{"
}



SCRIPT_OUTPUT="$(forge script local_render --json)"
JSON_OUTPUT="$(extract_json_output "$SCRIPT_OUTPUT")"

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/libraries/Cheeks.sol
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ library Cheeks {
RENDER
//////////////////////////////////////////////////////////////*/

function render(bytes32 _seed) internal pure returns (string memory) {
function render(bytes32 _seed) external pure returns (string memory) {
CheekType cheekType = Traits.cheekType(_seed);
if (cheekType == CheekType.CIRCULAR) return _circular();
if (cheekType == CheekType.FRECKLES) return _freckles();
Expand Down
Loading

0 comments on commit 0924bd4

Please sign in to comment.