Skip to content

Commit

Permalink
Use unicove.gm for mainnet/testnet and simple deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
aaroncox committed Jan 28, 2025
1 parent 284b9c3 commit 4f14fde
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ build/api/production:
testnet:
make -C contracts/api testnet

# MAINNET

mainnet:
make -C contracts/api mainnet

# UNIT TESTS

test/api: build/api/debug node_modules codegen
Expand Down
18 changes: 11 additions & 7 deletions contracts/api/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ BIN := ./node_modules/.bin

SRC_CONTRACT_NAME = api
MAINNET_NODE_URL = https://eos.greymass.com
MAINNET_CONTRACT_ACCOUNT = api
MAINNET_CONTRACT_ACCOUNT = unicove.gm
TESTNET_NODE_URL = https://jungle4.greymass.com
TESTNET_CONTRACT_ACCOUNT = api.gm
TESTNET_CONTRACT_ACCOUNT = unicove.gm

build: | build/dir
cdt-cpp -abigen -abigen_output=build/${SRC_CONTRACT_NAME}.abi -o build/${SRC_CONTRACT_NAME}.wasm src/${SRC_CONTRACT_NAME}.cpp -R src -I include -D DEBUG
Expand All @@ -29,11 +29,15 @@ testnet: build/debug
build/ ${SRC_CONTRACT_NAME}.wasm ${SRC_CONTRACT_NAME}.abi

mainnet: build/production
cleos -u $(MAINNET_NODE_URL) set contract \
--dont-broadcast --skip-sign --expiration 259200 --json-file msig.json \
${MAINNET_CONTRACT_ACCOUNT} build/ ${SRC_CONTRACT_NAME}.wasm ${SRC_CONTRACT_NAME}.abi
cleos -u $(MAINNET_NODE_URL) multisig propose_trx ${MAINNET_MSIG_PROPOSAL} ${MAINNET_MSIG_SIGNERS} \
msig.json ${MAINNET_MSIG_PROPOSER} -p ${MAINNET_MSIG_PERMISSION}
cleos -u $(MAINNET_NODE_URL) set contract $(MAINNET_CONTRACT_ACCOUNT) \
build/ ${SRC_CONTRACT_NAME}.wasm ${SRC_CONTRACT_NAME}.abi

# mainnet: build/production
# cleos -u $(MAINNET_NODE_URL) set contract \
# --dont-broadcast --skip-sign --expiration 259200 --json-file msig.json \
# ${MAINNET_CONTRACT_ACCOUNT} build/ ${SRC_CONTRACT_NAME}.wasm ${SRC_CONTRACT_NAME}.abi
# cleos -u $(MAINNET_NODE_URL) multisig propose_trx ${MAINNET_MSIG_PROPOSAL} ${MAINNET_MSIG_SIGNERS} \
# msig.json ${MAINNET_MSIG_PROPOSER} -p ${MAINNET_MSIG_PERMISSION}

test: build/debug node_modules build/contract.ts
bun test
Expand Down

0 comments on commit 4f14fde

Please sign in to comment.