Completed Code
Follow the completed code all the way through.
Prerequisites
There are a few steps you have to complete before you can start the tutorial.- Complete the Setup Your Own Project
- Create License Terms and have a
licenseTermsId
. You can do that by following the previous page.
Attach License Terms
Now that we have created terms and have the associatedlicenseTermsId
, we can attach them to an existing IP Asset.
Let’s create a test file under test/2_AttachTerms.t.sol
to see it work and verify the results:
Contract AddressesWe have filled in the addresses from the Story contracts for you. However you can also find the addresses for them here: Deployed Smart Contracts
test/2_AttachTerms.t.sol
Test Your Code!
Runforge build
. If everything is successful, the command should successfully compile.
Now run the test by executing the following command:
Mint a License
Congratulations, you attached terms to an IPA!Completed Code
Follow the completed code all the way through.