From b76215cb3f69d890c3b0a630f7e9276200af01b8 Mon Sep 17 00:00:00 2001 From: bigq Date: Tue, 18 Jul 2023 20:37:50 +0000 Subject: [PATCH] GITBOOK-504: remove APP_ID as a constant to avoid conflicts with already existing immutable in contract --- .../sismo-connect-configuration.md | 10 +++++----- .../tutorials/deploy-your-contracts.md | 8 ++++---- build-with-sismo-connect/tutorials/tuto.md | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/build-with-sismo-connect/technical-documentation/sismo-connect-configuration.md b/build-with-sismo-connect/technical-documentation/sismo-connect-configuration.md index 0fd05fa..f34d20b 100644 --- a/build-with-sismo-connect/technical-documentation/sismo-connect-configuration.md +++ b/build-with-sismo-connect/technical-documentation/sismo-connect-configuration.md @@ -105,10 +105,10 @@ In your smart contract, the most basic Sismo Connect Config looks like this: import "sismo-connect-solidity/SismoConnectLib.sol"; // <--- add a Sismo Connect import contract MyContract is SismoConnect { - bytes16 public constant APP_ID = 0xf4977993e52606cfd67b7a1cde717069; + bytes16 private _appId = 0xf4977993e52606cfd67b7a1cde717069; constructor() - SismoConnect(buildConfig(APP_ID)) // <--- Sismo Connect constructor + SismoConnect(buildConfig(_appId)) // <--- Sismo Connect constructor {} } ``` @@ -222,11 +222,11 @@ In your smart contract, the most basic Sismo Connect Config looks like this: import "sismo-connect-solidity/SismoConnectLib.sol"; // <--- add a Sismo Connect import contract MyContract is SismoConnect { - bytes16 public constant APP_ID = 0xf4977993e52606cfd67b7a1cde717069; - bool isImpersonationMode = true; + bytes16 private _appId = 0xf4977993e52606cfd67b7a1cde717069; + bool private _isImpersonationMode = true; constructor() - SismoConnect(buildConfig(APP_ID, isImpersonationMode)) + SismoConnect(buildConfig(_appId, _isImpersonationMode)) {} } ``` diff --git a/build-with-sismo-connect/tutorials/deploy-your-contracts.md b/build-with-sismo-connect/tutorials/deploy-your-contracts.md index 7e02436..62511c7 100644 --- a/build-with-sismo-connect/tutorials/deploy-your-contracts.md +++ b/build-with-sismo-connect/tutorials/deploy-your-contracts.md @@ -77,14 +77,14 @@ export const sismoConnectConfig: SismoConnectConfig = { import "sismo-connect-solidity/SismoConnectLib.sol"; contract A is SismoConnect { - // add your appId as a constant - bytes16 public constant APP_ID = 0xf4977993e52606cfd67b7a1cde717069; + // add your appId + bytes16 private _appId = 0xf4977993e52606cfd67b7a1cde717069; // use impersonated mode for testing - bool public constant IS_IMPERSONATION_MODE = true; + bool private _isImpersonationMode = true; constructor() // use buildConfig helper to easily build a Sismo Connect config in Solidity - SismoConnect(buildConfig(APP_ID, IS_IMPERSONATION_MODE)) + SismoConnect(buildConfig(_appId, _isImpersonationMode)) {} } ``` diff --git a/build-with-sismo-connect/tutorials/tuto.md b/build-with-sismo-connect/tutorials/tuto.md index c5d48f0..7a2538c 100644 --- a/build-with-sismo-connect/tutorials/tuto.md +++ b/build-with-sismo-connect/tutorials/tuto.md @@ -216,7 +216,7 @@ pragma solidity ^0.8.17; import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol"; // Sismo Connect import -import "sismo-connect-solidity/SismoLib.sol"; +import "sismo-connect-solidity/SismoConnectLib.sol"; contract Airdrop is ERC20, SismoConnect { // <--- add a Sismo Connect inheritance // add your appId