-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #330 from multiversx/sc-intents-factory
Integrate the SC Intents Factory in the SmartContract Class
- Loading branch information
Showing
7 changed files
with
192 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { assert } from "chai"; | ||
import { CodeMetadata } from "./codeMetadata"; | ||
|
||
describe("test code metadata", function () { | ||
it("should test code metadata from bytes", () => { | ||
const bytes = new Uint8Array([1, 0]); | ||
const codeMetadata = CodeMetadata.fromBytes(bytes); | ||
|
||
assert.equal(codeMetadata.toString(), "0100"); | ||
assert.deepEqual(codeMetadata.toJSON(), { | ||
upgradeable: true, | ||
readable: false, | ||
payable: false, | ||
payableBySc: false | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.