mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-02-27 01:03:08 +00:00
Add check before installing anvil
This commit is contained in:
parent
b2a8d28a7a
commit
48668aa36e
@ -2,13 +2,14 @@
|
||||
|
||||
# Install Anvil
|
||||
|
||||
if ! command -v anvil &> /dev/null; then
|
||||
BASE_DIR="${XDG_CONFIG_HOME:-$HOME}"
|
||||
FOUNDRY_DIR="${FOUNDRY_DIR-"$BASE_DIR/.foundry"}"
|
||||
FOUNDRY_BIN_DIR="$FOUNDRY_DIR/bin"
|
||||
|
||||
BASE_DIR="${XDG_CONFIG_HOME:-$HOME}"
|
||||
FOUNDRY_DIR="${FOUNDRY_DIR-"$BASE_DIR/.foundry"}"
|
||||
FOUNDRY_BIN_DIR="$FOUNDRY_DIR/bin"
|
||||
|
||||
curl -L https://foundry.paradigm.xyz | bash
|
||||
# Extract the source path from the download result
|
||||
echo "foundryup_path: $FOUNDRY_BIN_DIR"
|
||||
# run foundryup
|
||||
$FOUNDRY_BIN_DIR/foundryup
|
||||
curl -L https://foundry.paradigm.xyz | bash
|
||||
# Extract the source path from the download result
|
||||
echo "foundryup_path: $FOUNDRY_BIN_DIR"
|
||||
# run foundryup
|
||||
$FOUNDRY_BIN_DIR/foundryup
|
||||
fi
|
||||
@ -85,7 +85,6 @@ proc doRlnKeystoreGenerator*(conf: RlnKeystoreGeneratorConf) =
|
||||
quit(1)
|
||||
|
||||
# 5. register on-chain
|
||||
debug "credential idcommit", idCommitment = credential.idCommitment.inHex()
|
||||
try:
|
||||
waitFor groupManager.register(credential, conf.userMessageLimit)
|
||||
except Exception, CatchableError:
|
||||
|
||||
@ -577,7 +577,6 @@ method init*(g: OnchainGroupManager): Future[GroupManagerResult[void]] {.async.}
|
||||
let ethRpc: Web3 = (await establishConnection(g)).valueOr:
|
||||
return err("failed to connect to Ethereum clients: " & $error)
|
||||
|
||||
debug "fetching chainId"
|
||||
var fetchedChainId: UInt256
|
||||
g.retryWrapper(fetchedChainId, "Failed to get the chain id"):
|
||||
await ethRpc.provider.eth_chainId()
|
||||
@ -605,8 +604,6 @@ method init*(g: OnchainGroupManager): Future[GroupManagerResult[void]] {.async.}
|
||||
|
||||
let contractAddress = web3.fromHex(web3.Address, g.ethContractAddress)
|
||||
let wakuRlnContract = ethRpc.contractSender(WakuRlnContract, contractAddress)
|
||||
debug "contract address",
|
||||
contractAddress = contractAddress, ethContractAddress = g.ethContractAddress
|
||||
|
||||
g.ethRpc = some(ethRpc)
|
||||
g.wakuRlnContract = some(wakuRlnContract)
|
||||
@ -668,7 +665,6 @@ method init*(g: OnchainGroupManager): Future[GroupManagerResult[void]] {.async.}
|
||||
tx.chainId = Opt.some(g.chainId)
|
||||
|
||||
let resultBytes = await g.ethRpc.get().provider.eth_call(tx, "latest")
|
||||
debug "resultBytes", resultBytes = resultBytes, len = resultBytes.len
|
||||
if resultBytes.len == 0:
|
||||
return err("No result returned for function call: " & $functionSignature)
|
||||
let membershipExists = resultBytes.len == 32 and resultBytes[^1] == 1'u8
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user