Skip to content

fix(base-std): remove isin as required field for security token creation - #104

Merged
eric-ships merged 1 commit into
mainfrom
ericliu/bop-220-isin-not-required
Jun 1, 2026
Merged

eric-ships merged 1 commit into
mainfrom
ericliu/bop-220-isin-not-required

Conversation

@eric-ships

@eric-ships eric-ships commented Jun 1, 2026 •

Copy link
Copy Markdown
Collaborator

BOP-220

Motivation

isin is an optional identifier. Security tokens that don't have an ISIN assigned at creation should be creatable; the identifier can be set later via updateSecurityIdentifier.

The Rust precompile does not enforce isin as required — the fork test
test_createB20_revert_missingIsin was failing with a custom error mismatch,
confirming the divergence. Remove the empty-string guard from MockB20Factory
and delete the corresponding test so the mock matches the precompile behavior.

isin remains an optional string on B20SecurityCreateParams; creation with an
empty isin succeeds and simply does not seed the ISIN identifier.

BOP-220
@linear

linear Bot commented Jun 1, 2026 •

Copy link
Copy Markdown
BOP-220 fix(base-std): remove isin as a required field for security token creation

Context

MockB20Factory currently enforces isin as a required field at security token creation, reverting with MissingRequiredField("isin") if an empty string is passed. This should not be required.

What to change

  • test/lib/mocks/MockB20Factory.sol:141 — remove the if (bytes(p.isin).length == 0) revert MissingRequiredField("isin"); guard
  • test/unit/B20Factory/createToken.t.sol — delete test_createB20_revert_missingIsin

The isin field on B20SecurityCreateParams remains as an optional string; creation with an empty string should succeed and simply not seed the ISIN identifier.

Review in Linear

@eric-ships
eric-ships marked this pull request as ready for review June 1, 2026 19:35
@eric-ships
eric-ships merged commit c71903c into main Jun 1, 2026
5 checks passed
@eric-ships
eric-ships deleted the ericliu/bop-220-isin-not-required branch June 1, 2026 19:37
@github-actions

github-actions Bot commented Jun 1, 2026

Copy link
Copy Markdown

⚠️ Fork tests: 2 failed, 603 passed

These failures indicate divergences where base/base needs to catch up to the base-std spec. This check is advisory and does not block merging.

Failing tests

[FAIL: vm.store: cannot use precompile 0x8453000000000000000000000000000000000002 as an argument] test_pendingPolicyAdmin_success_zeroForBuiltinsEvenWithStoragePoison() (gas: 5654)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants