Everything in this document should be executed from the root directory of the following git repository.
https://github.com/Bisonai/request-response-consumer
yarn install
npx mnemonics
MNEMONIC=<YOUR MNEMONIC FROM STEP 1>
PROVIDER=https://api.baobab.klaytn.net:8651
npx hardhat address --mnemonic "<YOUR MNEMONIC FROM STEP 1>"
Insert your address from previous step and request $KLAY.
https://baobab.wallet.klaytn.foundation/faucet
function requestData(
Orakl.Request memory req,
uint32 callbackGasLimit,
uint8 numSubmission,
address refundRecipient
) external payable returns (uint256);
function requestData(
Orakl.Request memory req,
uint32 callbackGasLimit,
uint64 accId,
uint8 numSubmission
) external returns (uint256);
yarn compile
npx hardhat deploy --network baobab
npx hardhat run scripts/read-response.ts --network baobab
npx hardhat run scripts/request-data-direct.ts --network baobab
npx hardhat createAccount --network baobab
npx hardhat deposit \
--account-id $ACCOUNT \
--amount $AMOUNT \
--network baobab
npx hardhat addConsumer \
--consumer $CONSUMERADDRESS \
--account-id $ACCOUNT \
--network baobab
npx hardhat run scripts/read-response.ts --network baobab
npx hardhat run scripts/request-data.ts --network baobab