Step 1: Deploying the library on Remix IDE
Step 2: Deploying the smart contract by giving a user defined Data Array on Remix IDE
Step 3: Calling the getArray function to check our input
Step 4: Calling the sortArray function to sort our input
Step 5: Calling the removeDuplicatesFromArray function to remove the duplicates
BONUS Step: Fetching elements from the dataArray based on their indexes.
Step 1: Deploying the Receiver Contract on Remix IDE
Step 2: Deploying the Caller smart contract by giving the receiver contract address as the input
Step 3: Calling the stateVariable function to get the value of the variable on the Receiver contract.
Step 4: Updating the value of the stateVariable using the updateState on the Receiver contract.
Step 5: Calling the receiver address function on the Caller Contract to verify the address of the receiver contract
Step 6: Calling the updateState function on the Caller Contract and checking the address of the receiver contract which has been updated because of the delegate call.
Image 1: All three unit tests passed.
Image 2: Simulation test passed.
Step 1: Deploying the contract with the correct subscription ID.
Step 2: Adding the address of the deployed contract into the trusted consumer list.
Step 3: Check the Last Request ID, and copy it.
Step 4: Paste the requestID in the getRequestState tab and getRequestState. You will see a bool: fulfilled true
indicating the fulfilled request. You will also see the 2 random numbers generated.
Step 5: Request again for random numbers. Check history to note the pending transaction.