This repo provides an SDK for developers to use when interacting with and building on Element smart contracts.
npm install
npm run load-contracts
npm run generate-interfaces
npm run build
To use the Element SDK you need to configure some env variables. For linux and mac run the following:
- Copy
elf.default.env
cp elf.default.env elf.env
- Update elf.env with your private key and alchemy api key
export MAINNET_PROVIDER_URL=[MAINNET_PROVIDER_URL_HERE]
export GOERLI_PROVIDER_URL=[GOERLI_PROVIDER_URL_HERE]
export PRIVATE_KEY=[PRIVATE_KEY_HERE]
- Source the env file
source elf.env
npx hardhat run examples/spotPrice.ts --network goerli